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

discussion: an option to fail git fetch if a pulled branch tip is not a fast forward of the existing remote tip?

From
Jon Seymour <jon.seymour@gmail.com>
Date
Jan 13, 2010, 11:54 UTC
Message-ID
<2cfc40321001130354w626ec0fat7abdfaff9771c29f@mail.gmail.com>

I spent a little while this afternoon debugging an issue where an upstream publisher had backtracked and published a branch tip which was not a descendant of a previously published (and fetched) branch tip. The net result was that the backtracked changes were preserved in the downstream branch once the 2nd tip was pulled.

Now clearly the upstream developer should not have backtracked. That said, it would have been nice if I could have easily configured my porcelain to detect the backtracking condition. An option on git fetch that implemented something similar to the git push check would have made this easy to achieve.

Has any consideration been given to such an option? Is there a well-known alternative pattern for detecting this case?

jon.
Next: Thomas Rast
Message 1 of 3 in “discussion: an option to fail git fetch if a pulled branch tip is not a fast forward of the existing remote tip?”
  1. Jon SeymourJan 13, 2010
  2. Thomas RastJan 13, 2010
  3. Jon SeymourJan 13, 2010

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.