generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Stop using short commit hashes #123
Labels
bug
Something isn't working
Comments
This was referenced Apr 8, 2022
Open
Please see comment: steveukx/git-js#782 (comment) |
OK, then we only have to upgrade SimpleGit and remove ShortCommitHash class. |
This was referenced Apr 12, 2022
Merged
josecelano
added a commit
that referenced
this issue
Apr 13, 2022
Bug external project: nautilus-cyberneering/library-consumer#22 Issue: #123 The bug was temporarily fixes but setting git config with: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
josecelano
added a commit
that referenced
this issue
Apr 13, 2022
Bug external project: nautilus-cyberneering/library-consumer#22 Internal issue: #123 The bug was temporarily fixed by setting git config to: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
da2ce7
pushed a commit
that referenced
this issue
Apr 13, 2022
Bug external project: nautilus-cyberneering/library-consumer#22 Internal issue: #123 The bug was temporarily fixed by setting git config to: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
josecelano
added a commit
that referenced
this issue
Apr 18, 2022
Bug external project: nautilus-cyberneering/library-consumer#22 Internal issue: #123 The bug was temporarily fixed by setting git config to: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
josecelano
added a commit
that referenced
this issue
Apr 18, 2022
Bug external project: nautilus-cyberneering/library-consumer#22 Internal issue: #123 The bug was temporarily fixed by setting git config to: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
josecelano
added a commit
that referenced
this issue
Apr 18, 2022
Bug external project: nautilus-cyberneering/library-consumer#22 Internal issue: #123 The bug was temporarily fixed by setting git config to: git config --global core.abbrev 7 We do not need it anymore becuase SimpleGit has force commit hash length to the maximum (40 chararters). So we only use full hashes.
This was referenced May 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We found a bug on a test project that was using git-queue.
When you create a commit git returns the short commit message (
d3c882c
):We are using SimpleGit as a Git wrapper and it also returns the short commit hash probably because only returns what
git commit
command returns.The bug was caused because git-queue assumes a fix short commit hash (7 chars).
As I discussed with @da2ce7 we should not rely on short hashes. Short hashes should be only used for the user interface because they are easier to handle by humans.
It seems neither the SimpleGit nor the
git commit command
itself has an option to return the full commit hash.This is the object SimpleGit returns after committing:
As you can see in that case the commit hash contains 8 chars. I asked them if there is an option to get the full hash. But we are pretty sure there is not because it seems git commit command does not have it either.
It seems the only way to get the full hash is with some "plumbing" git commands. I've already described here how to use git commit-tree to create the commit.
I guess we can use something similar in our SimplyGit wrapper.
The text was updated successfully, but these errors were encountered: