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

merge -s ffonly

From
Shawn O. Pearce <spearce@spearce.org>
Date
Oct 6, 2008, 23:56 UTC
Message-ID
<20081006235611.GA17662@spearce.org>

I really don't care about this feature. But Randal's whining on #git made me stop what I was doing and write something that might turn into it.

Totally untested code. It might reformat your C:\ drive and install Windows ME. Install as $(git --exec-path)/git-merge-ffonly and call as `git merge -s ffonly`.

If you care about this sort of feature, test it, write tests for it, make a formal patch, and send it for review. No, I will not do this for you. As I said, I don't care about this as a feature.

--8<--
diff --git a/git-merge-ffonly.sh b/git-merge-ffonly.sh
new file mode 100644
index 0000000..24363b5
--- /dev/null
+++ b/git-merge-ffonly.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+while test $# -gt 0
+do
+	if test "z$1" = z--
+	then
+		shift
+		break
+	else
+		shift
+	fi
+done
+
+while test $# -gt 0
+do
+	if test -n "$(git rev-list $1..HEAD)"
+	then
+		exit 2
+	fi
+	shift
+done
-- 
Shawn.
Next: Uwe Kleine-König
Message 1 of 5 in “merge -s ffonly”
  1. Shawn O. PearceOct 6, 2008
  2. [RFC] git rev-contains [Was: merge -s ffonly]Uwe Kleine-König, Oct 7, 2008
  3. Andreas EricssonOct 8, 2008
  4. Deskin MillerOct 8, 2008
  5. Uwe Kleine-KönigOct 8, 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.