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
?.-*) 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
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 '
git remote remove "$remote" 2>/dev/null ||:
git remote add "$remote" $innerwd
git fetch --no-tags -p "$remote" \
- +"HEAD:refs/remotes/$remote/HEAD"
+ +"HEAD:refs/remotes/$remote/TT-HEAD"
cd $innerwd
GIT_AUTHOR_DATE=$(git log -n1 --pretty=format:'%ai')
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/*" \