From: "\"Peter Valdemar Mørch (Lists)\"" <4ux6as402@sneakemail.com>
To: git@vger.kernel.org
Subject: Re: How to fix (and find) many git-* --check errors?
Date: Sat, 09 Aug 2008 09:28:59 +0200 [thread overview]
Message-ID: <489D473B.3090406@sneakemail.com> (raw)
In-Reply-To: <7viqubcnop.fsf@gitster.siamese.dyndns.org>
Junio C Hamano gitster-at-pobox.com |Lists| wrote:
> Starting from a clean checkout, you could do something like this:
>
> $ git reset --hard
> $ rm .git/index
> $ git diff --binary -R HEAD >P.diff
> $ git apply --whitespace=fix --cached <P.diff
> $ git commit -m "Fixed all whitespace gotchas"
>
> P.diff contains essentially everything, and you are recreating everything
> from that patch.
Thanks for taking the time to answer my many mails and questions. It
really is helpful to me.
Rambling on:
Scary with the "rm .git/index"! It bascially creates an empty index it
seems... That was news to me. As a newbie I try not to meddle too much
in .git/ ...
I tried the above on git.git, and it gave:
warning: 485 lines applied after fixing whitespace errors.
I would suggest finishing the above with:
$ git checkout HEAD
otherwise, the working dir is stuck at the old unfixed state.
But like I posted earlier, I have another solution that works on
selected files. With git, there is always more than one way to do
things, it seems...
Peter
--
Peter Valdemar Mørch
http://www.morch.com
prev parent reply other threads:[~2008-08-09 7:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 12:49 How to fix (and find) many git-* --check errors? "Peter Valdemar Mørch (Lists)"
2008-08-08 13:23 ` Jeff King
2008-08-08 13:28 ` Björn Steinbrink
2008-08-08 14:57 ` "Peter Valdemar Mørch (Lists)"
2008-08-08 19:27 ` Junio C Hamano
2008-08-09 7:28 ` "Peter Valdemar Mørch (Lists)" [this message]
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=489D473B.3090406@sneakemail.com \
--to=4ux6as402@sneakemail.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.
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).