File changing commit clean-up#113
Merged
Merged
Conversation
Member
Author
Member
Author
Cache ClearStatus before Remove commits Status after |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



In some projects, users were getting commits marked as file-changing that did not actually change the file. They would show up as black, affect the status, but when doing the diff, there would be no file change.
It was found ghqc used
--full-historywithin thegit logto determine file changing commits, which includes merge commits which may have edited the file on the branch, but to the same content as is on the current branch. Due to internal merge-branch behaviors, this was frequently occurring when a user would merge the core branch into their branch, then later merge their branch into the core branch, leading to the core->their merge causing a change on their branch but would not actually affect the core branch on the their->core merge.Commits and their file changing behavior is cached to improve status determination speed. Since the logic to determine file changing commits changed, there are commits which are improperly marked after this change. To aide the process for users to remove cache entries for this change and going forward, this PR also introduces the
ghqc cachecommand. It has subcommandsremove,dir, andstatusto give insights into the cache for the user and easily remove entries. For this scenario, the recommendation will be to useghqc cache remove commits --globalto remove all cached commit entries for all repos and force a re-fetch.