On 27.03.15 7:57, Lukas Jungmann wrote:
On 3/26/15 2:26 PM, andrei ilitchev wrote:
After formatting sweep it would be impossible (well, much harder
than before) to follow revision history for real
changes.
agree with this point. OTOH I think it can be made "less harder"
(this does not sound like right english term to me :-)) if changes
are made all at once, it will become clear what exactly to skip in
the history
there will have to be at least two commits in this case anyway -
one for line endings change, the other for the rest of stuff
(whitespaces, cp year, formatting(?))
If there are 2 commits anyway, lets deal with line endings first,
then decide about the rest.
Also formatting rules are hard to enforce, especially after the
initial enthusiasm is gone ...
true, rule which is not being enforced does not make much sense to
me neither. Enforcement on the server side (by rejecting pushes
not following given conventions) is possible, even though not for
everything probably but that can be too late.
Why too late?
I was
thinking about providing also some client side git pre-commit
hooks which would be able to check basic stuff (whitespaces, LF,
formatting(?)) during 'git commit' with hard check for proper
setup of those hooks on developers machine during regular build.
Sure there will always be a way how to bypass such hooks but it
should be used in rare cases only.
What do you or others think about these client-side hooks? Would
you find them useful?
I think whitespace/lf could be a client side check, though would
prefer serverside check instead. Formatting/copyright check I'd
envision as part of the build.
MartiNG
|