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

tag with git commit message #387

Closed
harrybooth opened this issue Apr 27, 2023 · 4 comments
Closed

tag with git commit message #387

harrybooth opened this issue Apr 27, 2023 · 4 comments
Labels
enhancement New feature or request git Related to interafacing with git good first issue Easy issue good for newcomers

Comments

@harrybooth
Copy link

Maybe I have overlooked this functionality, but would it be possible to add the git commit message to the result dictionary using DrWatson.@tag!?

This would be really useful, as for example the git commit hash e.g. gitcommit => "96df587e45b29e7a46348a3d780db1f85f41de04" is non-descriptive, especially if you are trying to compare different versions of the same data and understand what the change was. Allowing the git commit message to be included, e.g. "changed parameter x to y" would be a nice automated way to relate code changes to experimental results.

@Datseris Datseris added enhancement New feature or request git Related to interafacing with git labels Apr 27, 2023
@Datseris
Copy link
Member

Sure, this seems like providing a keyword arugment use_description = false to tag!. If true, the commit description is used instead of the tag. Note that this is dangerous: commit descriptions can be arbitrarily small and non-unique, so this may not really help you reverse time and go back to given commit. But of course use at your own risk hence the default value will be false.

@Datseris Datseris added the good first issue Easy issue good for newcomers label Apr 27, 2023
@harrybooth
Copy link
Author

Could we do it so that the commit description is provided in addition to the tag? I agree the tag should always remain for reproducibility.

@Datseris
Copy link
Member

sure

@Datseris
Copy link
Member

we can do it like the gitpatch keyword: the commit message can be added as an additional field instead of replacing or mingling with the git commit field

@Cia15 Cia15 mentioned this issue Sep 12, 2023
Datseris added a commit that referenced this issue Sep 28, 2023
* added gitmessage

* removed unecessary package I accidently added

* Installing packages

* testing the gitmssg function

* changed variable in LibGit.2.GitCommit()

* Added test for the git commit message?

* Added one more line to the git message test

* Revise the gitmessage test

* Changed some of the test for gitmessage

* Revision on the commit message test, description

* changed back to previous

* correct version

---------

Co-authored-by: George Datseris <datseris.george@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request git Related to interafacing with git good first issue Easy issue good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants