This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

glibc.git: hook to prohibit pushing "bad-merge" commits


I'm about to add a hook that will prohibit useless merge commits.

That means if you accidentally create a merge commit, e.g., by
pulling new changes from master onto your just-modified master,
and then try to push the result (which contains a merge commit),
the hook will reject it.

This will not affect you if you follow these guidelines:
(may sound slightly involved if you're new to git, but it's not bad at
all once you get used to it):

Develop exclusively on topic branches and pull the result to master
only seconds before the actual push-to-public, and only seconds after
updating your pristine "master" branch from the public repository.
Of course, if the update-from-public pulled in new changes, you must
rebase your topic branch to be relative to the new tip of "master",
probably recompile to be sure everything is still ok, etc.
That way, the window for accidental merge commit is minimized.

By default, that hook script has an independent setting to prohibit
pushing a commit that adds trailing blanks.  If committers don't want
that, let me know and I'll turn it off.  However, I suggest that you
leave it enabled and, if necessary, add '.gitattributes' entries to allow
whatever violations you deem appropriate.

Barring objections, I'll enable it tomorrow.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]