Git commit that doesn't override original authors in git blame -
i've used perl script modify tab characters in php git repository , changed them 4 spaces.
$ find -iname \*.php -exec perl -pi -e "s/\t/ /g" {} \
i can commit change git commit
, mark me author of changed lines inside git blame
after commit made.
is there way commit massive change doesn't mark me author of changed lines, retains original author? that's lot of history don't want lose in our project.
our purpose in replacing tabs 4 spaces not make things appear different in git blame, follow proper pear coding standards. e.g. no tabs, use 4 spaces indentation.
thanks wnoise on git: change styling (whitespace) without changing ownership/blame?, came run arbitrary filter on git history, using rewrite history make offending whitespace or other issues never committed, leaving original authors in tact code cleaned up: git filter-branch --tree-filter 'git diff-tree --name-only --diff-filter=am -r --no-commit-id $git_commit | php cleanup.php' head
Comments
Post a Comment