From 2c21922ad1795e1d305dac6bdb977f2e50eb809e Mon Sep 17 00:00:00 2001 From: Frej Drejhammar Date: Sun, 6 Jul 2014 14:59:28 +0200 Subject: [PATCH] Only dump heads in head cache If there is a tag with the same name as a tag, "git rev-parse " can give the hash of the tag instead of the branch. "git rev-parse refs/heads/" must be used to make sure we only find branches. --- hg-fast-export.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hg-fast-export.sh b/hg-fast-export.sh index 9c1077c..c052e1b 100755 --- a/hg-fast-export.sh +++ b/hg-fast-export.sh @@ -131,7 +131,7 @@ cat "$GIT_DIR/$PFX-$SFX_MARKS.old" "$GIT_DIR/$PFX-$SFX_MARKS.tmp" \ # save SHA1s of current heads for incremental imports # and connectivity (plus sanity checking) for head in `git branch | sed 's#^..##'` ; do - id="`git rev-parse $head`" + id="`git rev-parse refs/heads/$head`" echo ":$head $id" done > "$GIT_DIR/$PFX-$SFX_HEADS" -- 2.11.4.GIT