Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-29 03:15:04 +0300
committerJunio C Hamano <gitster@pobox.com>2007-11-29 03:41:18 +0300
commit38762c47d6442dc0ce0f45533f9151877c485337 (patch)
tree23b98d604a03c5715938cec97fe3fed1bde08bc9 /git-rebase.sh
parent1e72a40de99be24809eba5abdab4c0b00846b9b5 (diff)
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-rebase.sh')
-rwxr-xr-xgit-rebase.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index b0c8ac1c8d..c9b284c751 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -60,7 +60,7 @@ continue_merge () {
fi
cmt=`cat "$dotest/current"`
- if ! git diff-index --quiet HEAD
+ if ! git diff-index --quiet HEAD --
then
if ! git-commit -C "$cmt"
then
@@ -253,7 +253,7 @@ fi
# The tree must be really really clean.
git update-index --refresh || exit
-diff=$(git diff-index --cached --name-status -r HEAD)
+diff=$(git diff-index --cached --name-status -r HEAD --)
case "$diff" in
?*) echo "cannot rebase: your index is not up-to-date"
echo "$diff"