author | Junio C Hamano <gitster@pobox.com> | |
Thu, 29 Nov 2007 01:06:57 +0000 (17:06 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 29 Nov 2007 01:06:57 +0000 (17:06 -0800) |
* maint:
scripts: do not get confused with HEAD in work tree
Improve description of git-branch -d and -D in man page.
scripts: do not get confused with HEAD in work tree
Improve description of git-branch -d and -D in man page.
1 | 2 | |||
---|---|---|---|---|
Documentation/git-branch.txt | patch | | diff1 | | diff2 | | blob | history |
contrib/examples/git-merge-ours.sh | patch | | diff1 | | | | blob | history |
git-am.sh | patch | | diff1 | | diff2 | | blob | history |
git-filter-branch.sh | patch | | diff1 | | diff2 | | blob | history |
git-rebase--interactive.sh | patch | | diff1 | | diff2 | | blob | history |
git-rebase.sh | patch | | diff1 | | diff2 | | blob | history |
git-stash.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/git-branch.txt
Simple merge
diff --cc contrib/examples/git-merge-ours.sh
index c81a790aa60ea08144dd0899d1aee2ec334a1825,0000000000000000000000000000000000000000..29dba4ba3a57c15bd430bd23c1cebe78e6dc03be
mode 100755,000000..100755
mode 100755,000000..100755
--- /dev/null
- git diff-index --quiet --cached HEAD || exit 2
+#!/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
+
+exit 0
diff --cc git-am.sh
Simple merge
diff --cc git-filter-branch.sh
Simple merge
diff --cc git-rebase--interactive.sh
index bf44b6af58574273df9e7f549136a735f6e549fe,ff38a22edfa60a759c5e68d9e6968d11531e72d1..e9cd6fd999695daa1c5ba49835f53041d4131f3a
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
diff --cc git-rebase.sh
Simple merge
diff --cc git-stash.sh
Simple merge