-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Commits not counting correctly when base branch is already ahead #54
Comments
It seems to be a bug in Git itself. We issued this in the git mailing list and that is the response:
I think this is a huge problem for gitinfo because it means that commit counting will not work on a repo without the reflog (e.g. build server) as soon as the branch where the fork was made from is ahead. BR |
Workaround: use tags instead of branch naming. Follow the Git bugfix discussion on the mailing list archive: https://public-inbox.org/git/68633b20-9e2b-ae23-2ede-8728283250f0@grubix.eu/T/ BR |
If you decide to switch to tags, you can set I'm not sure there's much else we can do. Although there are usually so many ways of doing the same thing in git that maybe there is an alternative way to lookup the fork point that is more reliable? |
Closing for now, plz do reopen if there's a suggested tweak we could make to support this with a different git command. Thanks! |
Why would you close this issue? It should be treated as a known, active issue until fixed - at least until there is a git version available with which this works again. Better yet, until it is fixed backwards compatible in gitinfo. BR Matthias |
Being an external dependency where there is nothing we can do about it, I fail to see how keeping it open helps ;) In more advanced bug tracking systems, this would be a "RESOLVED / [UPSTREAM|EXTERNAL]" |
But it helps finding the issues and avoids creating a duplication. Let's introduce a "Git-Related-Issue" tag and keep it open. |
GitInfo uses the command "git merge-base" to detect fork points. However this seems to not work whenever the "base-branch" is already ahead. Consequently the commit count does not work correctly.
Very oddly it seems to work whenever you had the expected commit checked out previously – what made it very tricky to detect this problem.
Example:
In the repo where we created this example tree in the first place the command returned the expected fork point. If you clone it new and fresh it does not return any result anymore.
Works, however, on branch “v2.0.0”. Assumption: because “master” is older.(?)
BR, Jakob
The text was updated successfully, but these errors were encountered: