Junio C Hamano <junkio@xxxxxxx> wrote: > > Andrew Morton <akpm@xxxxxxxx> writes: > > > It's invariably pointless to add lines which have trailing whitespace. > > Nobody cares much, but my scripts spam me when it happens, so I've become > > obsessive.... > > I do not call me obsessive, but I do enable pre-commit and > pre-applypatch hooks I ship with git myself. It's apparent that few others do this. > > I realise that we cannot do this when doing git fetches, but when importing > > patches and mboxes, git ought to whine loudly about input which matches the > > above regexp, and it should offer an option to tidy it up. Perhaps by > > default. > > I stole the policy the sample hook scripts use from you; it is > not enabled by default, and as the tool manufacturer I am a bit > reluctant to do so. > It's not strong enough. I mean, if you ask a developer "do you wish to add new trialing whitespace to the kernel" then obviously their answer would be "no". So how do we help them in this? I'd suggest a) git will simply refuse to apply such a patch unless given a special `forcing' flag, b) even when thus forced, it will still warn and c) with a different flag, it will strip-then-apply, without generating a warning. - : 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