Reputation: 7308
We are using code collab and have to put the entry --no-prefix each time. Sometimes people forget and then they have to resubmit their code review. Is there a way to globally set the --no-prefix option so that the a/ b/ prefixes are never used?
Upvotes: 15
Views: 2364
Reputation: 6646
I was using diff.noprefix
to easily select filenames on screen. However found Yelp pre-commit couldn't re-apply generated patches as they had the toplevel directory removed. (Took me a while to figure that out!)
So rather than modifying the actual git diff
command, create a di
alias:
git config --global alias.di 'diff --no-prefix'
Upvotes: 0
Reputation: 410662
Yep. Set the config option diff.noprefix
:
$ git config --global diff.noprefix true # All repos
$ git config diff.noprefix true # Current repo
Upvotes: 22