Re: [PATCH] git-p4: replace each tab with 8 spaces for consistency
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 7, 2011, 07:36 UTC
- Message-ID
- <7vhbaafr7r.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1302156081-3286-1-git-send-email-andrew@andrewgarber.com>
Andrew Garber <andrew@andrewgarber.com> 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 diffThe changes I get out of the last step seem to exactly match your patch.
Thanks.