From: "Shawn O. Pearce" <spearce@spearce.org>
To: git@vger.kernel.org
Cc: "Randal L. Schwartz" <merlyn@stonehenge.com>
Subject: merge -s ffonly
Date: Mon, 6 Oct 2008 16:56:11 -0700 [thread overview]
Message-ID: <20081006235611.GA17662@spearce.org> (raw)
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 reply other threads:[~2008-10-06 23:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-06 23:56 Shawn O. Pearce [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081006235611.GA17662@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=merlyn@stonehenge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.