diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-28 16:15:04 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-28 16:41:18 -0800 |
commit | 38762c47d6442dc0ce0f45533f9151877c485337 (patch) | |
tree | 23b98d604a03c5715938cec97fe3fed1bde08bc9 /git-filter-branch.sh | |
parent | Improve description of git-branch -d and -D in man page. (diff) | |
download | tgif-38762c47d6442dc0ce0f45533f9151877c485337.tar.xz |
scripts: do not get confused with HEAD in work tree
When you have a file called HEAD in your work tree, many commands that
our scripts feed "HEAD" to would complain about the rev vs path
ambiguity. A solution is to form command line more carefully by
appending -- to them, which makes it clear that we mean HEAD rev not
HEAD file.
This patch would apply to maint.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-filter-branch.sh')
-rwxr-xr-x | git-filter-branch.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-filter-branch.sh b/git-filter-branch.sh index ffcc408ee5..dbab1a9a4a 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -95,7 +95,7 @@ USAGE="[--env-filter <command>] [--tree-filter <command>] \ . git-sh-setup git diff-files --quiet && - git diff-index --cached --quiet HEAD || + git diff-index --cached --quiet HEAD -- || die "Cannot rewrite branch(es) with a dirty working directory." tempdir=.git-rewrite |