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.lorimer.id.au/gitweb.git/diff_plain/d25430c5f88c7e7b4ce24c1b08e409f4345c4eb9?ds=inline;hp=-c 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 --combined Documentation/git-branch.txt index 5ce905de86,d64ad25028..f87b6968b4 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@@ -45,17 -45,22 +45,22 @@@ to happen With a `-d` or `-D` option, `` will be deleted. You may specify more than one branch for deletion. If the branch currently - has a reflog then the reflog will also be deleted. Use -r together with -d - to delete remote-tracking branches. + has a reflog then the reflog will also be deleted. + + Use -r together with -d to delete remote-tracking branches. Note, that it + only makes sense to delete remote-tracking branches if they no longer exist + in remote repository or if gitlink:git-fetch[1] was configured not to fetch + them again. See also 'prune' subcommand of gitlink:git-remote[1] for way to + clean up all obsolete remote-tracking branches. OPTIONS ------- -d:: - Delete a branch. The branch must be fully merged. + Delete a branch. The branch must be fully merged in HEAD. -D:: - Delete a branch irrespective of its index status. + Delete a branch irrespective of its merged status. -l:: Create the branch's reflog. This activates recording of @@@ -85,7 -90,7 +90,7 @@@ -a:: List both remote-tracking branches and local branches. --v:: +-v, --verbose:: Show sha1 and commit subject line for each head. --abbrev=:: @@@ -153,9 -158,11 +158,11 @@@ $ git branch -d -r origin/todo origin/h $ git branch -D test <2> ------------ + - <1> Delete remote-tracking branches "todo", "html", "man" - <2> Delete "test" branch even if the "master" branch does not have all - commits from test branch. + <1> Delete remote-tracking branches "todo", "html", "man". Next 'fetch' or + 'pull' will create them again unless you configure them not to. See + gitlink:git-fetch[1]. + <2> Delete "test" branch even if the "master" branch (or whichever branch is + currently checked out) does not have all commits from test branch. Notes diff --combined contrib/examples/git-merge-ours.sh index c81a790aa6,0000000000..29dba4ba3a 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 --combined git-am.sh index 4126f0e857,5792631d84..76c1c844a9 --- a/git-am.sh +++ b/git-am.sh @@@ -2,26 -2,11 +2,26 @@@ # # Copyright (c) 2005, 2006 Junio C Hamano -USAGE='[--signoff] [--dotest=] [--keep] [--utf8 | --no-utf8] - [--3way] [--interactive] [--binary] - [--whitespace=