Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dirty flag to GitCommitId and AssemblyInformationalVersion #479

Open
ChristophHornung opened this issue May 19, 2020 · 1 comment
Open

Comments

@ChristophHornung
Copy link

I am in the situation where some test builds are done (incorrectly) with changes that have not been committed. Thus relying on the GitCommitId will not reproduce the same build. Is it possible to add a -dirty flag to the GitCommitId and AssemblyInformationalVersion so that those builds can at least be identified as not reproducible from their git commit?

@AArnott
Copy link
Collaborator

AArnott commented May 19, 2020

That sounds like a good idea. Since some repos actually deliberately dirty their git repo during the build (e.g. to stamp package.json) I think we'd want to make the dirty flag have an opt-out (or maybe even an opt-in).

There's one other gotcha, which is that the libgit2sharp version we're currently using actually falsely claims dirty repos because of a temporary file it creates. See #396. I suspect we should fix that before implementing this feature or else we'll get more bugs of "My binary says it came from a dirty repo but it didn't."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants