Skip to content

Commit 286e6fa

Browse files
S Lktoso
authored andcommitted
#149 : Using "-dirty" as default dirty-marker.
1 parent 47ccdd5 commit 286e6fa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ Worth pointing out is, that git-commit-id tries to be 1-to-1 compatible with git
575575

576576
* **abbrev** - `(default: 7)` in the describe output, the object id of the hash is always abbreviated to N letters, by default 7. The typical describe output you'll see therefore is: `v2.1.0-1-gf5cd254`, where `-1-` means the number of commits away from the mentioned tag and the `-gf5cd254` part means the first 7 chars of the current commit's id `f5cd254`. **Please note that the `g` prefix is included to notify you that it's a commit id, it is NOT part of the commit's object id** - *this is default git bevaviour, so we're doing the same*. You can set this to any value between 0 and 40 (inclusive).
577577
* **abbrev = 0** is a special case. Setting *abbrev* to `0` has the effect of hiding the "distance from tag" and "object id" parts of the output, so you endup with just the "nearest tag" (that is, instead `tag-12-gaaaaaaa` with `abbrev = 0` you'd get `tag`).
578-
* **dirty** - `(default: "")` when you run describe on a repository that's in "dirty state" (has uncommited changes), the describe output will contain an additional suffix, such as "-devel" in this example: `v3.5-3-g2222222-devel`. You can configure that suffix to be anything you want, "-DEV" being a nice example. The "-" sign should be inclided in the configuration parameter, as it will not be added automatically. If in doubt run `git describe --dirty=-my_thing` to see how the end result will look like.
578+
* **dirty** - `(default: "-dirty")` when you run describe on a repository that's in "dirty state" (has uncommited changes), the describe output will contain an additional suffix, such as "-devel" in this example: `v3.5-3-g2222222-devel`. You can configure that suffix to be anything you want, "-DEV" being a nice example. The "-" sign should be inclided in the configuration parameter, as it will not be added automatically. If in doubt run `git describe --dirty=-my_thing` to see how the end result will look like.
579579
* **tags** - `(default: false)` if true this option enables matching a lightweight (non-annotated) tag.
580580
* **match** - `(default: *)` only consider tags matching the given pattern (can be used to avoid leaking private tags made from the repository)
581581
* **long** - `(default: false)` git-describe, by default, returns just the tag name, if the current commit is tagged. Use this option to force it to format the output using the typical describe format. An example would be: `tagname-0-gc0ffebabe` - notice that the distance from the tag is 0 here, if you don't use **forceLongFormat** mode, the describe for such commit would look like this: `tagname`.

src/main/java/pl/project13/maven/git/GitDescribeConfig.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ public class GitDescribeConfig {
4949
* Describe the working tree. It means describe HEAD and appends mark (<pre>-dirty</pre> by default) if the
5050
* working tree is dirty.
5151
*
52-
* <b>empty</b> by default, following git's behaviour.
52+
* <b>-dirty</b> by default, following git's behaviour.
5353
*
54-
* @parameter default-value=""
54+
* @parameter default-value="-dirty"
5555
*/
56-
private String dirty = "";
56+
private String dirty = "-dirty";
5757

5858
/**
5959
*<pre>--match glob-pattern</pre>

0 commit comments

Comments
 (0)