From: Junio C Hamano <junkio@cox.net>
To: "Marco Costalba" <mcostalba@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: [PATCH 0/3] Fix assorted white space damage
Date: Sat, 12 May 2007 18:45:12 -0700 [thread overview]
Message-ID: <7vzm49ts2f.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <e5bfff550705120409v629425aesc910927c26871323@mail.gmail.com> (Marco Costalba's message of "Sat, 12 May 2007 13:09:13 +0200")
"Marco Costalba" <mcostalba@gmail.com> writes:
> Following there is a 3 patch series to remove stealth whitespace.
>
> I have used the new 'cleanfile' script by H. Peter Anvin, just merged
> in Linux tree.
>
> The script cleans up various classes of stealth whitespace. In
> particular, it cleans up:
>
> - Whitespace (spaces or tabs)before newline;
> - DOS line endings (CR before LF);
> - Space before tab (spaces are deleted or converted to tabs);
> - Empty lines at end of file.
I haven't checked the script, but "git-apply --whitespace=strip"
can be used to do pretty much the same job with this sequence,
except the last one (do it with a copy of repository if you do
not want "git clean -x" to lose untracked):
$ git checkout master
$ rm -f .git/index
$ git checkout HEAD -- t/
$ git clean -x -d
$ git diff -R --binary HEAD >P.diff
$ git apply --index --whitespace=strip P.diff
Then you can check the results, and make a commit.
In the above I explicitly "saved" t/ because we have some test
vectors that need to have trailing whitespaces.
next prev parent reply other threads:[~2007-05-13 1:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-12 11:09 [PATCH 0/3] Fix assorted white space damage Marco Costalba
2007-05-12 20:45 ` Junio C Hamano
2007-05-13 3:29 ` Marco Costalba
2007-05-13 1:45 ` Junio C Hamano [this message]
2007-05-13 10:31 ` Johannes Schindelin
2007-05-13 18:57 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vzm49ts2f.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=mcostalba@gmail.com \
/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.
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 NNTP newsgroup(s).