* Re: [PATCH 10/10] user-manual: listing commits reachable from some refs not others @ 2007-05-14 15:48 Frank Lichtenheld 0 siblings, 0 replies; 2+ messages in thread From: Frank Lichtenheld @ 2007-05-14 15:48 UTC (permalink / raw) To: J. Bruce Fields; +Cc: Junio C Hamano, git On Mon, May 14, 2007 at 11:21:29AM -0400, J. Bruce Fields wrote: > +Suppose you would like to see all the commits reachable from the branch > +head named "master" but not from any other head in your repository. This should probably be "maint", because later you have: > +And then we can ask to see all the commits reachable from maint > +but not from these other heads: Gruesse, -- Frank Lichtenheld <frank@lichtenheld.de> www: http://www.djpig.de/ ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <11791560893572-git-send-email->]
[parent not found: <1179156089759-git-send-email->]
[parent not found: <11791560893022-git-send-email->]
[parent not found: <11791560891179-git-send-email->]
[parent not found: <1179156089470-git-send-email->]
[parent not found: <11791560892667-git-send-email->]
[parent not found: <11791560901-git-send-email->]
[parent not found: <11791560901645-git-send-email->]
[parent not found: <1179156090113-git-send-email->]
* [PATCH 10/10] user-manual: listing commits reachable from some refs not others [not found] ` <1179156090113-git-send-email-> @ 2007-05-14 15:21 ` J. Bruce Fields 0 siblings, 0 replies; 2+ messages in thread From: J. Bruce Fields @ 2007-05-14 15:21 UTC (permalink / raw) To: Junio C Hamano; +Cc: git, J. Bruce Fields From: J. Bruce Fields <bfields@citi.umich.edu> This is just an amusing example raised by someone in irc. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> --- Documentation/user-manual.txt | 44 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index d6ac29b..9fc2bba 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -830,6 +830,50 @@ available Which shows that e05db0fd is reachable from itself, from v1.5.0-rc1, and from v1.5.0-rc2, but not from v1.5.0-rc0. +[[showing-commits-unique-to-a-branch]] +Showing commits unique to a given branch +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Suppose you would like to see all the commits reachable from the branch +head named "master" but not from any other head in your repository. + +You can list all the heads in this repository with +gitlink:git-show-ref[1]: + +------------------------------------------------- +$ git show-ref --heads +bf62196b5e363d73353a9dcf094c59595f3153b7 refs/heads/core-tutorial +db768d5504c1bb46f63ee9d6e1772bd047e05bf9 refs/heads/maint +a07157ac624b2524a059a3414e99f6f44bebc1e7 refs/heads/master +24dbc180ea14dc1aebe09f14c8ecf32010690627 refs/heads/tutorial-2 +1e87486ae06626c2f31eaa63d26fc0fd646c8af2 refs/heads/tutorial-fixes +------------------------------------------------- + +We can get just the branch-head names, and remove "maint", with +the help of the standard utilities cut and grep: + +------------------------------------------------- +$ git show-ref --heads | cut -d' ' -f2 | grep -v '^refs/heads/maint' +------------------------------------------------- + +And then we can ask to see all the commits reachable from maint +but not from these other heads: + +------------------------------------------------- +$ gitk maint --not $( git show-ref --heads | cut -d' ' -f2 | + grep -v '^refs/heads/maint' ) +------------------------------------------------- + +Obviously endless variations are possible; to see all commits +reachable from some head but not from any tag in the repository: + +------------------------------------------------- +$ gitk ($ git show-ref --heads ) --not $( git show-ref --tags ) +------------------------------------------------- + +(See gitlink:git-rev-parse[1] for explanations of commit-selecting +syntax such as `--not`.) + [[making-a-release]] Creating a changelog and tarball for a software release ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 1.5.1.4.19.g69e2 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-14 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-14 15:48 [PATCH 10/10] user-manual: listing commits reachable from some refs not others Frank Lichtenheld
[not found] <11791560893572-git-send-email->
[not found] ` <1179156089759-git-send-email->
[not found] ` <11791560893022-git-send-email->
[not found] ` <11791560891179-git-send-email->
[not found] ` <1179156089470-git-send-email->
[not found] ` <11791560892667-git-send-email->
[not found] ` <11791560901-git-send-email->
[not found] ` <11791560901645-git-send-email->
[not found] ` <1179156090113-git-send-email->
2007-05-14 15:21 ` J. Bruce Fields
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 NNTP newsgroup(s).