X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Ftartree-edit;h=40bd6e9620974f376a4cbcd57c9aaec782df7964;hp=f4717faed18a60f37270efb906eaa572d97745d2;hb=8963f3d0cf1aa5478af5875a958a5129c0aff277;hpb=79d3cafc9d910e79d3d0e7f156d03089a5738b47 diff --git a/tests/tartree-edit b/tests/tartree-edit index f4717fae..40bd6e96 100755 --- a/tests/tartree-edit +++ b/tests/tartree-edit @@ -5,7 +5,7 @@ fail () { echo >&2 "$0: $*"; exit 1; } play=.git/tartree-edit-work git_manip_play () { - local wd=$(pwd) + local wd; wd=$(pwd) case "$wd" in *.edit) fail "bad idea to run gitfetchinfo into a .edit tree!" ;; esac @@ -67,7 +67,9 @@ case "$#.$1" in ?.-*) fail "no options understood" ;; *) fail "usage: tartree-edit edit|done DIRECTORY|TARBALL - tartree-edit gitfetchinfo DIRECTORY|TARBALL REMOTE" ;; + tartree-edit gitfetchinfo DIRECTORY|TARBALL REMOTE + tartree-edit gitfetchinfo-merge REMOTE-A REMOTE-B" ;; + # we don't document gitfetchinfo-diff because it's rather poor esac case "$arg" in @@ -125,7 +127,7 @@ tryat_gitfetchinfo () { exec 3<&- fi - local innerwd="$(echo $play/*)" + local innerwd; innerwd="$(echo $play/*)" git for-each-ref --format='%(refname)' refs/remotes >$play/l perl -w -ne ' @@ -159,9 +161,9 @@ tryat_gitfetchinfo () { GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE export GIT_COMMITTER_DATE GIT_AUTHOR_DATE git checkout -b WORKTREE - gitfetchinfo_perhaps_commit INDEX + gitfetchinfo_perhaps_commit 'UNCOMMITTED INDEX' git add -Af . - gitfetchinfo_perhaps_commit WORKTREE + gitfetchinfo_perhaps_commit 'UNCOMMITTED WORKING TREE' cd ../../.. git fetch --no-tags "$remote" --refmap \ +"refs/*:refs/remotes/$remote/*" \