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

suggestion for a simple addition: git update-ref --ff-only

From
DMDavid Madore <david+news@madore.org>
Date
Mar 1, 2013, 23:18 UTC
Message-ID
<20130301231859.GA334@achernar.madore.org>
Hi list,

I'd like to suggest a very simple, but IMHO quite useful, additional option to git-update-ref: an option --ff-only which would cause the command to refuse unless the current ref is an ancestor of the new one.

The reason I think it would be useful: I occasionally wish to perform a trivial (i.e., fast-forward) merge of some branch into another (e.g., after a git-fetch) without checking it out. Now git-update-ref is perfect for that, but there is always the possibility of getting something wrong (which one would not have with git merge --ff-only, but the latter requires checking out the branch), and this option would avoid tedious verifications.

Happy hacking,
-- 
     David A. Madore
   ( http://www.madore.org/~david/ )
Next: Junio C Hamano
Message 1 of 3 in “suggestion for a simple addition: git update-ref --ff-only”
  1. David MadoreMar 1, 2013
  2. Junio C HamanoMar 1, 2013
  3. Jeff KingMar 2, 2013

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.