From 33e7018c459e6583b899690cabd21c808ffd3c85 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sat, 15 Aug 2009 16:23:12 +0200 Subject: git-log: allow --decorate[=short|full] Commit de435ac0 changed the behavior of --decorate from printing the full ref (e.g., "refs/heads/master") to a shorter, more human-readable version (e.g., just "master"). While this is nice for human readers, external tools using the output from "git log" may prefer the full version. This patch introduces an extension to --decorate to allow the caller to specify either the short or the full versions. Signed-off-by: Lars Hjemli Acked-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/git-log.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Documentation/git-log.txt') diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 34cf4e5811..3d79de11ec 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -37,8 +37,12 @@ include::diff-options.txt[] and , see "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1]. ---decorate:: - Print out the ref names of any commits that are shown. +--decorate[=short|full]:: + Print out the ref names of any commits that are shown. If 'short' is + specified, the ref name prefixes 'refs/heads/', 'refs/tags/' and + 'refs/remotes/' will not be printed. If 'full' is specified, the + full ref name (including prefix) will be printed. The default option + is 'short'. --source:: Print out the ref name given on the command line by which each -- cgit v1.2.3 From 0b444cdb19bcfcc7f59b7b00783cbfbbc5ddcf63 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Sun, 10 Jan 2010 00:33:00 +0100 Subject: Documentation: spell 'git cmd' without dash throughout The documentation was quite inconsistent when spelling 'git cmd' if it only refers to the program, not to some specific invocation syntax: both 'git-cmd' and 'git cmd' spellings exist. The current trend goes towards dashless forms, and there is precedent in 647ac70 (git-svn.txt: stop using dash-form of commands., 2009-07-07) to actively eliminate the dashed variants. Replace 'git-cmd' with 'git cmd' throughout, except where git-shell, git-cvsserver, git-upload-pack, git-receive-pack, and git-upload-archive are concerned, because those really live in the $PATH. --- Documentation/git-log.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/git-log.txt') diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 3d79de11ec..ff4063b020 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -14,9 +14,9 @@ DESCRIPTION ----------- Shows the commit logs. -The command takes options applicable to the 'git-rev-list' +The command takes options applicable to the 'git rev-list' command to control what is shown and how, and options applicable to -the 'git-diff-*' commands to control how the changes +the 'git diff-*' commands to control how the changes each commit introduces are shown. -- cgit v1.2.3 From d08bae7e221727e26baab984b792854b842130d7 Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Wed, 20 Jan 2010 11:48:25 +0200 Subject: rev-parse --glob Add --glob= option to rev-parse and everything that accepts its options. This option matches all refs that match given shell glob pattern (complete with some DWIM logic). Example: 'git log --branches --not --glob=remotes/origin' To show what you have that origin doesn't. Signed-off-by: Ilari Liusvaara Signed-off-by: Junio C Hamano --- Documentation/git-log.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Documentation/git-log.txt') diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 3d79de11ec..0b874e3d1a 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -107,6 +107,17 @@ git log --follow builtin-rev-list.c:: those commits that occurred before the file was given its present name. +git log --branches --not --glob=remotes/origin/*:: + + Shows all commits that are in any of local branches but not in + any of remote tracking branches for 'origin' (what you have that + origin doesn't). + +git log master --not --glob=remotes/*/master:: + + Shows all commits that are in local master but not in any remote + repository master branches. + Discussion ---------- -- cgit v1.2.3 From b09fe971dea73ff6f5296ce533a566114b23ca4e Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Wed, 20 Jan 2010 11:48:26 +0200 Subject: rev-parse --branches/--tags/--remotes=pattern Since local branch, tags and remote tracking branch namespaces are most often used, add shortcut notations for globbing those in manner similar to --glob option. With this, one can express the "what I have but origin doesn't?" as: 'git log --branches --not --remotes=origin' Original-idea-by: Johannes Sixt Signed-off-by: Ilari Liusvaara Signed-off-by: Junio C Hamano --- Documentation/git-log.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/git-log.txt') diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 0b874e3d1a..0acd526303 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -107,13 +107,13 @@ git log --follow builtin-rev-list.c:: those commits that occurred before the file was given its present name. -git log --branches --not --glob=remotes/origin/*:: +git log --branches --not --remotes=origin:: Shows all commits that are in any of local branches but not in any of remote tracking branches for 'origin' (what you have that origin doesn't). -git log master --not --glob=remotes/*/master:: +git log master --not --remotes=*/master:: Shows all commits that are in local master but not in any remote repository master branches. -- cgit v1.2.3