From: Junio C Hamano Date: Thu, 29 Nov 2007 01:06:57 +0000 (-0800) Subject: Merge branch 'maint' X-Git-Tag: v1.5.4-rc0~136 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d25430c5f88c7e7b4ce24c1b08e409f4345c4eb9;p=git.git Merge branch 'maint' * maint: scripts: do not get confused with HEAD in work tree Improve description of git-branch -d and -D in man page. --- d25430c5f88c7e7b4ce24c1b08e409f4345c4eb9 diff --cc contrib/examples/git-merge-ours.sh index c81a790aa,000000000..29dba4ba3 mode 100755,000000..100755 --- a/contrib/examples/git-merge-ours.sh +++ b/contrib/examples/git-merge-ours.sh @@@ -1,14 -1,0 +1,14 @@@ +#!/bin/sh +# +# Copyright (c) 2005 Junio C Hamano +# +# Pretend we resolved the heads, but declare our tree trumps everybody else. +# + +# We need to exit with 2 if the index does not match our HEAD tree, +# because the current index is what we will be committing as the +# merge result. + - git diff-index --quiet --cached HEAD || exit 2 ++git diff-index --quiet --cached HEAD -- || exit 2 + +exit 0 diff --cc git-rebase--interactive.sh index bf44b6af5,ff38a22ed..e9cd6fd99 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@@ -356,10 -331,8 +356,10 @@@ d git rev-parse --verify HEAD > /dev/null && git update-index --refresh && git diff-files --quiet && - ! git diff-index --cached --quiet HEAD && + ! git diff-index --cached --quiet HEAD -- && - . "$DOTEST"/author-script && + . "$DOTEST"/author-script && { + test ! -f "$DOTEST"/amend || git reset --soft HEAD^ + } && export GIT_AUTHOR_NAME GIT_AUTHOR_NAME GIT_AUTHOR_DATE && git commit -F "$DOTEST"/message -e