-
Notifications
You must be signed in to change notification settings - Fork 328
Description
The File History and Dir History views are currently only allowing us to view the "Default mode" from the git-log command, which does some rather heavy simplification of history - to the point where it's sometimes very hard to understand exactly how a certain file has really evolved.
For example: if an expected change has gone missing, the default mode may not list the commits where this actually happened. If a change was done and then later undone, then both of these events may be missing in the log (since they "don't affect the final outcome"). Also, "trivial" merges are not shown, even if they are indeed introducing a certain change to a new (relevant) branch.
However, there are several git-log option-flags that could be used to (optionally) provide a more complete / detailed history for a single file or directory. While investigating this, I found a similar issue reported for the "Fork" git-client. I've reported my findings in detail there, so that both the Fork and SourceGit communities can benefit from the discussion: fork-dev/TrackerWin#1261 (comment)
For SourceGit specifically, I suggest adding (in the File History and Dir History views) a drop-down (or possibly a set of 'radio buttons') to select from the following 4 different levels of detail :
- Simple history (default) [same as current implementation]
- First parent [
--first-parent] - Show pulls (simplify merges) [
--show-pulls --simplify-merges] - Full history [
--full-history]
NOTE: The latter 3 levels are the specific option-flag-combos that I found most useful, to help in getting a clearer understanding of a file/dir-history (when containing merges, undone changes etc).
The selected detail-level should be persisted as a (global) Preferences variable (we could use the same one for File and Dir History), so the last selection is always remembered.
Implementing this feature would be quite easy - besides the option UI and persistence-variable, we just need to .Append() the relevant (selected) option-flags onto the StringBuilder argsBuilder that's already passed into Commands.QueryCommits().
NOTE: Potentially this enhancement should also be implemented in the Blame view, to (similarly) affect which commits are shown/included there!