bug-gnulib
[Top][All Lists]
Advanced

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

Re: automatically preventing merge commits on master


From: Bruno Haible
Subject: Re: automatically preventing merge commits on master
Date: Tue, 14 Oct 2008 01:42:25 +0200
User-agent: KMail/1.5.4

Hi Jim,

> In our experience here (with gnulib.git), pushing a merge
> commit is always unintentional.

Yes, my mistake today. It was definitely unintentional. I was working in two
gnulib checkouts at the same time, noticed the merge in one checkout and
straightened it through "git rebase origin/master", but missed the merge
in the other checkout. Probably because the sequence of commands that
I usually do ("git pull"; "git commit ..."; "git push") did not lead to an
error. Usually I get a conflict at the ChangeLog file when there is a
merge commit, and I know that when I have to resolve the commit through
"git add", I also need "git merge origin/master". Not so here, because Karl's
autoupdate and my comment changes were not accompanied by ChangeLog entries.
Here's the sequence of commands that I did in the relevant checkout.

 1249  git pull
 1258  git commit lib/glthread/thread.c ChangeLog 
 1259  git push
 ...
 1281  git status
 1284  git commit lib/glthread/lock.c 
 ...
 1296  git pull
 1298  git status|cat
 ...
 1326  git pull
 1343  git commit ChangeLog tests/test-sameacls.c
 1344  git push
 1345  git commit ChangeLog tests/test-sameacls.c
 1346  git push

> Does anyone object to my installing a server-side hook
> that would prevent pushing merge commits on master?

Thanks for doing this!

Bruno





reply via email to

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