From: Junio C Hamano <gitster@pobox.com>
To: Andrew Garber <andrew@andrewgarber.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-p4: replace each tab with 8 spaces for consistency
Date: Thu, 07 Apr 2011 00:36:24 -0700 [thread overview]
Message-ID: <7vhbaafr7r.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1302156081-3286-1-git-send-email-andrew@andrewgarber.com> (Andrew Garber's message of "Thu, 7 Apr 2011 02:01:20 -0400")
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 diff
The changes I get out of the last step seem to exactly match your patch.
Thanks.
next prev parent reply other threads:[~2011-04-07 7:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-07 6:01 [PATCH] git-p4: replace each tab with 8 spaces for consistency Andrew Garber
2011-04-07 7:36 ` Junio C Hamano [this message]
2011-04-07 16:35 ` Phil Hord
2011-04-07 18:45 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2011-04-07 6:01 Andrew Garber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vhbaafr7r.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=andrew@andrewgarber.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).