From: Sam Vilain <sam.vilain@catalyst.net.nz>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Sam Vilain <sam.vilain@catalyst.net.nz>
Subject: [PATCH] git-merge-ff: fast-forward only merge
Date: Sat, 30 Jun 2007 20:56:18 +1200 [thread overview]
Message-ID: <11831937823756-git-send-email-sam.vilain@catalyst.net.nz> (raw)
In-Reply-To: <11831937822249-git-send-email-sam.vilain@catalyst.net.nz>
This is primarily so that there is an easy switch to 'git-pull' to
be sure to fast forward only.
Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
---
Documentation/merge-strategies.txt | 5 +++++
Makefile | 2 +-
git-merge-ff.sh | 8 ++++++++
git-merge.sh | 4 ++--
4 files changed, 16 insertions(+), 3 deletions(-)
create mode 100644 git-merge-ff.sh
diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt
index 7df0266..00739bc 100644
--- a/Documentation/merge-strategies.txt
+++ b/Documentation/merge-strategies.txt
@@ -33,3 +33,8 @@ ours::
merge is always the current branch head. It is meant to
be used to supersede old development history of side
branches.
+
+ff::
+ This is a degenerate merge strategy that always fails, which
+ means that the only time the target branch will change is if
+ there was no merge ("fast-forward" merge only).
diff --git a/Makefile b/Makefile
index 4ea5e45..7fa8fe3 100644
--- a/Makefile
+++ b/Makefile
@@ -210,7 +210,7 @@ SCRIPT_SH = \
git-tag.sh git-verify-tag.sh \
git-am.sh \
git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \
- git-merge-resolve.sh git-merge-ours.sh \
+ git-merge-resolve.sh git-merge-ours.sh git-merge-ff.sh \
git-lost-found.sh git-quiltimport.sh git-submodule.sh \
git-filter-branch.sh
diff --git a/git-merge-ff.sh b/git-merge-ff.sh
new file mode 100644
index 0000000..b0e0f85
--- /dev/null
+++ b/git-merge-ff.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# Copyright (c) 2007 Sam Vilain
+#
+# A degenerate merge strategy that only allows fast-forwarding.
+#
+
+exit 1;
diff --git a/git-merge.sh b/git-merge.sh
index 981d69d..63aa374 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -16,10 +16,10 @@ test -z "$(git ls-files -u)" ||
LF='
'
-all_strategies='recur recursive octopus resolve stupid ours subtree'
+all_strategies='recur recursive octopus resolve stupid ours subtree ff'
default_twohead_strategies='recursive'
default_octopus_strategies='octopus'
-no_trivial_merge_strategies='ours subtree'
+no_trivial_merge_strategies='ours subtree ff'
use_strategies=
index_merge=t
--
1.5.2.1.1131.g3b90
next prev parent reply other threads:[~2007-06-30 8:57 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-30 8:56 a bunch of outstanding updates Sam Vilain
2007-06-30 8:56 ` [PATCH] repack: improve documentation on -a option Sam Vilain
2007-06-30 8:56 ` [PATCH] git-svn: use git-log rather than rev-list | xargs cat-file Sam Vilain
2007-06-30 8:56 ` [PATCH] git-svn: cache max revision in rev_db databases Sam Vilain
2007-06-30 8:56 ` [PATCH] GIT-VERSION-GEN: don't convert - delimiter to .'s Sam Vilain
2007-06-30 8:56 ` [PATCH] git-remote: document -n Sam Vilain
2007-06-30 8:56 ` [PATCH] git-remote: allow 'git-remote fetch' as a synonym for 'git fetch' Sam Vilain
2007-06-30 8:56 ` Sam Vilain [this message]
2007-06-30 8:56 ` [PATCH] git-mergetool: add support for ediff Sam Vilain
2007-06-30 8:56 ` [PATCH] contrib/hooks: add post-update hook for updating working copy Sam Vilain
2007-06-30 8:56 ` [PATCH] git-repack: generational repacking (and example hook script) Sam Vilain
2007-07-03 3:36 ` Nicolas Pitre
2007-07-03 4:58 ` Sam Vilain
2007-07-03 14:45 ` Nicolas Pitre
2007-07-03 14:55 ` Shawn O. Pearce
2007-07-04 0:05 ` Sam Vilain
2007-07-04 1:01 ` Johannes Schindelin
2007-07-04 6:16 ` Sam Vilain
2007-07-04 7:02 ` Alex Riesen
2007-07-04 15:42 ` Nicolas Pitre
2007-06-30 17:19 ` [PATCH] contrib/hooks: add post-update hook for updating working copy Junio C Hamano
2007-07-01 22:30 ` Sam Vilain
2007-07-02 1:10 ` Junio C Hamano
2007-06-30 17:19 ` [PATCH] git-mergetool: add support for ediff Junio C Hamano
2007-07-01 22:33 ` Sam Vilain
2007-06-30 14:28 ` [PATCH] git-merge-ff: fast-forward only merge Johannes Schindelin
2007-06-30 18:32 ` Matthias Lederhofer
2007-06-30 17:19 ` [PATCH] git-remote: allow 'git-remote fetch' as a synonym for 'git fetch' Junio C Hamano
2007-06-30 11:12 ` [PATCH] git-remote: document -n Frank Lichtenheld
2007-06-30 17:19 ` [PATCH] GIT-VERSION-GEN: don't convert - delimiter to .'s Junio C Hamano
2007-07-11 10:49 ` Jakub Narebski
2007-07-01 3:50 ` [PATCH] git-svn: cache max revision in rev_db databases Junio C Hamano
2007-07-01 5:31 ` Eric Wong
2007-07-01 6:49 ` Junio C Hamano
2007-06-30 11:15 ` [PATCH] repack: improve documentation on -a option Frank Lichtenheld
2007-06-30 17:19 ` Junio C Hamano
2007-06-30 11:05 ` a bunch of outstanding updates Frank Lichtenheld
-- strict thread matches above, loose matches on Subject: below --
2007-06-26 4:01 [PATCH] git-merge-ff: fast-forward only merge Sam Vilain
2007-06-28 11:33 ` Matthias Lederhofer
2007-06-28 13:01 ` Johannes Schindelin
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=11831937823756-git-send-email-sam.vilain@catalyst.net.nz \
--to=sam.vilain@catalyst.net.nz \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 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).