git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: 'simple' push check that branch name matches does not work if push.default is unset (and hence implicitly simple)

From
Adam Williamson <awilliam@redhat.com>
Date
Nov 26, 2014, 22:38 UTC
Message-ID
<1417041500.12457.79.camel@redhat.com>
In-Reply-To
<1417040968.12457.78.camel@redhat.com>
On Wed, 2014-11-26 at 14:29 -0800, Adam Williamson wrote:
> Hi, folks. Ran into an unfortunate issue with git which helped me mess
> up a Fedora package repo today :/
> 
> The problem can be reproduced thus:
Whoops, I missed step 0:
0. Ensure push.default is not configured globally
Show 11 quoted lines
> 1. Create an empty repo, clone it
> 2. Push its master branch with something in it (just to get started)
> 3. git branch --track moo origin/master
> 4. git checkout moo
> 5. echo moo >> moo && git commit -a -m "create moo"
> 6. git push
> ** BUG HAPPENS - CHANGES ARE PUSHED TO origin/master **
> 7. git config --local push.default simple
> 8. echo moo2 >> moo && git commit -a -m "update moo"
> 9. git push
> ** PUSH IS CORRECTLY REJECTED **
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net
Previous: Adam WilliamsonNext: Jeff King
Message 2 of 7 in “'simple' push check that branch name matches does not work if push.default is unset (and hence implicitly simple)”
  1. Adam WilliamsonNov 26, 2014
  2. Adam WilliamsonNov 26, 2014
  3. Jeff KingNov 27, 2014
  4. Adam WilliamsonNov 27, 2014
  5. Adam WilliamsonNov 27, 2014
  6. Jeff KingNov 28, 2014
  7. Junio C HamanoDec 1, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.