I want to use the '--compaction-heuristic' option in my global git config file. It's an option of the git log command:
--compaction-heuristic
--no-compaction-heuristic
These are to help debugging and tuning an experimental heuristic (which is off by default) that shifts the hunk boundary in an attempt to make the resulting patch easier to read.
The git config documentation suggests adding config settings like this example:
git config --global core.editor emacs
There doesn't appear to be anything in the git log documentation that states what this config value should be - so what is it and where would I find the specification that explains the format of the line:
git config --global [magic to enable compaction-heuristic here]
This git feature has now been removed anyway
To see all of properties configured globally in Git, you can use the –list switch on the git config command. Adding the –show-origin switch will also tell you the global .
To set your Git username, run the git config –global user.name command. You should specify both your first and last name but your username can be anything you want to attach to your commits. Your Git username does not need to be the same as your version control username, such as the one you use on GitHub.
The git config command is a convenience function that is used to set Git configuration values on a global or local project level. These configuration levels correspond to . gitconfig text files. Executing git config will modify a configuration text file.
It seems to be an option under diff
.
git config --global diff.compactionHeuristic true
BTW this is an option of git diff
.
Reference (diff config): https://github.com/git/git/blob/5580b271af518bae30148edfd42cc8459d8da384/Documentation/diff-config.txt#L169-L172
According to this blog post:
This new heuristic is still experimental, and may change in the future, or even become the default. For now, you can enable it with the --compaction-heuristic option on the command line, or by setting diff.compactionHeuristic in your git config.
If you prefer, you can also create an alias for the git log command with your favorite flags:
git config --global alias.log1 "log --decorate=short --oneline --compaction-heuristic"
And use your new alias:
git log1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With