ref: 071991480396986f294993a26bc866d69521b54d
dir: /cmd/git/git.rc/
#!/bin/rc pwd=`{pwd} rm -fr repo mkdir -p repo/upstream echo @@ version1 @@ @{cd repo/upstream git/init echo version1 > file.txt git/add file.txt git/commit -m version1 file.txt } @{cd repo git/clone $pwd/repo/upstream downstream } diff -c repo/upstream/file.txt repo/downstream/file.txt echo @@ version2 @@ @{cd repo/upstream echo version2 > file.txt git/commit -m version2 file.txt } @{cd repo/downstream git/pull } diff -c repo/upstream/file.txt repo/downstream/file.txt echo @@ version3 @@ @{cd repo/upstream echo version3 > file2.txt git/add file2.txt git/commit -m version3 file2.txt } @{cd repo/downstream git/pull } diff -c repo/upstream/file.txt repo/downstream/file.txt diff -c repo/upstream/file2.txt repo/downstream/file2.txt echo @@ version4 @@ @{cd repo/upstream echo version4 > file.txt git/rm file2.txt rm file2.txt git/commit -m version4 file.txt file2.txt } @{cd repo/downstream git/pull } diff -c repo/upstream/file.txt repo/downstream/file.txt ! test -e repo/upstream/file2.txt ! test -e repo/downstream/file2.txt