summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-03-21 22:57:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-22 17:13:41 (GMT)
commitb0176ce6b5d954a747dc4d0c5a8593ed576714c4 (patch)
tree2ff1ee516b34b29613cfe8ac9af99bf377a212f2 /Documentation
parentc0f9c705890ac30871c70219c4b08d740fb40e2e (diff)
downloadgit-b0176ce6b5d954a747dc4d0c5a8593ed576714c4.zip
git-b0176ce6b5d954a747dc4d0c5a8593ed576714c4.tar.gz
git-b0176ce6b5d954a747dc4d0c5a8593ed576714c4.tar.bz2
builtin/describe: introduce --broken flag
git-describe tells you the version number you're at, or errors out, e.g. when you run it outside of a repository, which may happen when downloading a tar ball instead of using git to obtain the source code. To keep this property of only erroring out, when not in a repository, severe (submodule) errors must be downgraded to reporting them gently instead of having git-describe error out completely. To achieve that a flag '--broken' is introduced, which is in the same vein as '--dirty' but uses an actual child process to check for dirtiness. When that child dies unexpectedly, we'll append '-broken' instead of '-dirty'. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-describe.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 8755f3a..26f19d3 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -30,9 +30,14 @@ OPTIONS
Commit-ish object names to describe. Defaults to HEAD if omitted.
--dirty[=<mark>]::
- Describe the working tree.
- It means describe HEAD and appends <mark> (`-dirty` by
- default) if the working tree is dirty.
+--broken[=<mark>]::
+ Describe the state of the working tree. When the working
+ tree matches HEAD, the output is the same as "git describe
+ HEAD". If the working tree has local modification "-dirty"
+ is appended to it. If a repository is corrupt and Git
+ cannot determine if there is local modification, Git will
+ error out, unless `--broken' is given, which appends
+ the suffix "-broken" instead.
--all::
Instead of using only the annotated tags, use any ref