Re: How to fix (and find) many git-* --check errors?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Peter Valdemar Mørch (Lists)"  <4ux6as402@xxxxxxxxxxxxxx> writes:

> We have > 37000 white space "errors" in HEAD, mostly trailing
> whitespace, and I'm looking for a
>
> $ git diff --check | git??? --whitespace=fix
>
> command.

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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux