Gitversion: dirty flag?

Created on 3 Apr 2017  路  16Comments  路  Source: GitTools/GitVersion

Couldn't find a way to get a dirty flag, like git describe [...] --dirty

improvement

Most helpful comment

Well a dirty flag in the informational version when there are locally modified files.

All 16 comments

What is it you want to achieve?

Well a dirty flag in the informational version when there are locally modified files.

Ah, yes that would be a good thing to have, I agree. We welcome pull requests! 馃槃

I did some prototyping on that. Since the git versions are cached in the .git folder, I don't know how the dirty flag should behave. Causes wrong results when caching that. @asbjornu what do you propose?

Makes sense. Perhaps when calculating --dirty, you need to disable caching altogether?

I hope this isn't a naive solution as I haven't spent a lot of time looking at the GitVersion source, but could the output of the "git status --porcelain" command act as input for this feature and if that input has a non-zero length, something is added to the informational version?

The thing which should be achieved by this issue, is that the informal assembly version contains an information whether the working copy has local modifications or not.

If _git status_ provides this information as well we may also use this command as source for that information.

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

Still a useful feature in my opinion

@Sam13, I agree, but unless someone submits a PR that implements this, the feature won't make its way into GitVersion.

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

hi,

i found how this got handled in another project, could this be incooperated?
https://github.com/desaster/gitrevsubst/commit/544462be2a60cf4ebf53543329147f40a1071302#diff-a8d7dc4a2b96ae65d37ab09ad03939dd

basicaly its testing describe --always --dirty if it ends with "dirty"

I was searching for this, would be happy to have a dirty flag in GitVersion

A PR implementing this would be merged, I'm sure.

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.


:tada: This issue has been resolved in version 5.5.0 :tada:
The release is available on:

Your GitReleaseManager bot :package::rocket:

Was this page helpful?
0 / 5 - 0 ratings