git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* merge -s ffonly
@ 2008-10-06 23:56 Shawn O. Pearce
  2008-10-07 18:58 ` [RFC] git rev-contains [Was: merge -s ffonly] Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Shawn O. Pearce @ 2008-10-06 23:56 UTC (permalink / raw)
  To: git; +Cc: Randal L. Schwartz

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.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-08 15:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 23:56 merge -s ffonly Shawn O. Pearce
2008-10-07 18:58 ` [RFC] git rev-contains [Was: merge -s ffonly] Uwe Kleine-König
2008-10-08  6:18   ` Andreas Ericsson
2008-10-08 14:30   ` Deskin Miller
2008-10-08 15:41     ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).