savannah-hackers-public
[Top][All Lists]
Advanced

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

Re: [Savannah-hackers-public] Pusing to Git repo declined


From: Paul Smith
Subject: Re: [Savannah-hackers-public] Pusing to Git repo declined
Date: Thu, 26 May 2016 16:50:36 -0400

On Thu, 2016-05-26 at 13:41 -0700, Jim Meyering wrote:
> On Tue, May 24, 2016 at 10:30 PM, Aljosha Papsch wrote:
> > Thanks for the clarification. I will fix these files now. While forcing
> > users to push clean files is unexpected for user, I guess it would be great
> > if these messages were warnings and would not result in a fatal error.
> > Users could then decide for themselves whether to clean up files, in the
> > sense "You have been warned". Is that possible?

The problem with this is that it's not possible in Git to "change" a
commit once it's been made, except by "rewriting history", and once a
commit is pushed to a public server it's typically a very bad idea to
rewrite its history.

So, if you simply warn about these problems but let the commit push
succeed, then there is no way for the user to clean up the mess except
by adding a new commit on top which undoes the problems.  It is really
unpleasant, in the project history, to see a constant set of "push a
change, push a cleanup to the change" commits.

If the project is serious about enforcing these habits then the right
way to do it is by rejecting commits that don't meet the criteria, so
that the user can fix them and avoid incorrect commits appearing in the
repository in the first place.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]