Andrew Garber [off-list ref] writes:
Note that the majority of git-p4 uses spaces, not tabs, for indentation.
Consistent indentation is critical to the functionality of Python
scripts: mixing tabs and spaces in Python can lead to hard-to-find bugs.
Mixing tabs and spaces can lead to hard-to-find bugs, I agree.
I just threw this in to my .git/info/attributes:
contrib/fast-import/git-p4 whitespace=!indent,tail,tab-in-indent
and then did this:
$ >contrib/fast-import/git-p4
$ git diff -R | git apply --whitespace=fix
$ git diff
The changes I get out of the last step seem to exactly match your patch.
Thanks.