summaryrefslogtreecommitdiff
path: root/Documentation/git-describe.txt
diff options
context:
space:
mode:
authorMike Crowe <mac@mcrowe.com>2013-05-17 20:56:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-20 18:09:03 (GMT)
commite00dd1e9485c50f202cc97dfae19d510e108b565 (patch)
treee0ff1428e746e363c93ee9a5303e347c7aced797 /Documentation/git-describe.txt
parentde3a5c6da194928868b5eee4a9c4d538b4194727 (diff)
downloadgit-e00dd1e9485c50f202cc97dfae19d510e108b565.zip
git-e00dd1e9485c50f202cc97dfae19d510e108b565.tar.gz
git-e00dd1e9485c50f202cc97dfae19d510e108b565.tar.bz2
describe: Add --first-parent option
Only consider the first parent commit when walking the commit history. This is useful if you only wish to match tags on your branch after a merge. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-describe.txt')
-rw-r--r--Documentation/git-describe.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 28e5ec0..9439cd6 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -88,6 +88,11 @@ OPTIONS
--always::
Show uniquely abbreviated commit object as fallback.
+--first-parent::
+ Follow only the first parent commit upon seeing a merge commit.
+ This is useful when you wish to not match tags on branches merged
+ in the history of the target commit.
+
EXAMPLES
--------
@@ -149,7 +154,9 @@ is found, its name will be output and searching will stop.
If an exact match was not found, 'git describe' will walk back
through the commit history to locate an ancestor commit which
has been tagged. The ancestor's tag will be output along with an
-abbreviation of the input committish's SHA-1.
+abbreviation of the input committish's SHA-1. If '--first-parent' was
+specified then the walk will only consider the first parent of each
+commit.
If multiple tags were found during the walk then the tag which
has the fewest commits different from the input committish will be