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

git-fetch question/bug

From
GSGovind Salinas <blix@sophiasuchtig.com>
Date
Mar 14, 2008, 05:08 UTC
Message-ID
<5d46db230803132208r3f3f9e34q80bb9c03d65ab67c@mail.gmail.com>
Hey,

I was wrapping git-fetch when I discovered that it does not return error when the fetch fails due to it not being a ff...

~/Desktop/Projects/test  (test2)
govind@gnosis: 574> git fetch . remotes/origin/gitnext:test2
From .
 ! [rejected]        origin/gitnext -> test2  (non fast forward)
~/Desktop/Projects/test  (test2)
govind@gnosis: 575> echo $?
0
~/Desktop/Projects/test  (test2)
govind@gnosis: 576> git version
git version 1.5.4.3.587.g0bdd73

So, is this the expected behavior? I expect it should return non-0 when it does not perform the requested fetch.

If this is supposed to be this way, then sorry for the noise.

Thanks, Govind.

Next: Junio C Hamano
Message 1 of 4 in “git-fetch question/bug”
  1. Govind SalinasMar 14, 2008
  2. Junio C HamanoMar 14, 2008
  3. Jakub NarebskiMar 14, 2008
  4. Daniel BarkalowMar 14, 2008

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.