git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Lars Hjemli <hjemli@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH] git-branch.txt: compare --contains, --merged and --no-merged
Date: Fri, 18 Apr 2008 00:27:08 +0200	[thread overview]
Message-ID: <1208471228-26232-1-git-send-email-hjemli@gmail.com> (raw)
In-Reply-To: <7vzlrsmbqw.fsf@gitster.siamese.dyndns.org>

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
---

Junio C Hamano wrote:
> You did not answer my question as to how --contains and --merged relate to
> each other.

Sorry, I deemed it to be rhetorical.


> I'll answer it myself (please add a documentation updates, as
> this would be confusing).

Something like this, maybe?


 Documentation/git-branch.txt |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 95e9d0d..7e37497 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -120,6 +120,15 @@ OPTIONS
 --no-track::
 	Ignore the branch.autosetupmerge configuration variable.
 
+--contains <commit>::
+	Only list branches which contain the specified commit.
+
+--merged::
+	Only list branches which are fully contained by HEAD.
+
+--no-merged::
+	Do not list branches which are fully contained by HEAD.
+
 <branchname>::
 	The name of the branch to create or delete.
 	The new branch name must pass all checks defined by
@@ -177,6 +186,15 @@ If you are creating a branch that you want to immediately checkout, it's
 easier to use the git checkout command with its `-b` option to create
 a branch and check it out with a single command.
 
+The options `--contains`, `--merged` and `--no-merged` serves three related
+but different purposes:
+<1> `--contains <commit>` is used to find all branches which will need
+special attention if <commit> were to be rebased or amended, since those
+branches contain the specified <commit>.
+<2> `--merged` is used to find all branches which can be safely deleted,
+since those branches are fully contained by HEAD.
+<3> `--no-merged` is used to find branches which are candidates for merging
+into HEAD, since those branches are not fully contained by HEAD.
 
 Author
 ------
-- 
1.5.5.64.gb1a99

  reply	other threads:[~2008-04-17 22:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17  9:37 [PATCH] git-branch: add support for --merged and --unmerged Lars Hjemli
2008-04-17 11:34 ` [PATCH] bash: support branch's new '--merged' and '--unmerged' options SZEDER Gábor
2008-04-17 18:07   ` [PATCH] git-branch: add support for --merged and --no-merged Lars Hjemli
2008-04-17 19:13 ` [PATCH] git-branch: add support for --merged and --unmerged Junio C Hamano
2008-04-17 20:24   ` [PATCH v3] git-branch: add support for --merged and --no-merged Lars Hjemli
2008-04-17 21:07     ` Junio C Hamano
2008-04-17 22:27       ` Lars Hjemli [this message]
2008-04-17 22:59     ` Lars Hjemli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1208471228-26232-1-git-send-email-hjemli@gmail.com \
    --to=hjemli@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).