[Ovirt-devel] coming soon: prohibition on pushing bad-whitespace-adding changes

Jim Meyering jim at meyering.net
Mon Aug 4 20:29:47 UTC 2008


Jim Meyering <jim at meyering.net> wrote:
> In the next couple of days, I expect to enable a git hook on the server
> that will deny any attempt to push a change that adds "bad" whitespace.
> In the mean time, you who will be pushing or posting changes should be
> sure to enable commit-time checks for white space:
>
>   Run "chmod a+x .git/hooks/update" (if you already have the file,
>   .git/hooks/update) or "cd .git/hooks && cp -a update.sample update"
>   if you have one named update.sample.
>
> That will help you by making your local commits fail whenever
> a change adds bad (e.g. trailing) whitespace.  If that happens,
> it tells you which file/line-number are affected, and you just
> edit those lines and retry the commit.
>
> If you forget and commit (locally) changes that add trailing blanks,
> you'll have to edit those change sets e.g., via "git rebase -i next",
> before you can push them.

I enabled this new hook a few hours ago.




More information about the ovirt-devel mailing list