git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* On using receive.denyNonFastForwards and advice.pushNonFastForward
@ 2012-07-08 21:26 Hilco Wijbenga
  2012-07-09  5:13 ` Christopher Tiwald
  2012-07-09  8:36 ` Matthieu Moy
  0 siblings, 2 replies; 3+ messages in thread
From: Hilco Wijbenga @ 2012-07-08 21:26 UTC (permalink / raw)
  To: Git Users

Hi all,

I was wondering how hard it would be to make "git push" more adamant
about not pushing non-ff updates. So I wanted to see the effects of
receive.denyNonFastForwards and advice.pushNonFastForward. (By the
way, why is one plural and the other singular? That doesn't seem
consistent?)

HERE=$(pwd) &&
git init --bare remote-repo &&
cd remote-repo/ &&
git config --add receive.denyNonFastForwards true &&
cd .. &&
git clone file://$HERE/remote-repo local-repo &&
cd local-repo/ &&
git config --add advice.pushNonFastForward true &&
echo "1" > one.txt &&
git add -A . && git commit -m 1 && git push origin master &&
git checkout -b next &&
echo "a" > two.txt &&
git add -A . && git commit -m 2 &&
git checkout master &&
echo "2" > one.txt &&
git add -A . && git commit -m 3 && git push origin master &&
git merge next &&
git push

To my surprise there was neither warning nor error. Does this last
push really qualify as a FF update? Apparently, linear history and
FF-only updates are not the same thing?

Cheers,
Hilco

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-09  8:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-08 21:26 On using receive.denyNonFastForwards and advice.pushNonFastForward Hilco Wijbenga
2012-07-09  5:13 ` Christopher Tiwald
2012-07-09  8:36 ` Matthieu Moy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).