git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: [BROKEN NEXT] merge-recursive thinkofix
Date: Wed, 18 Apr 2007 19:32:16 -0700	[thread overview]
Message-ID: <7vps61aybz.fsf@assigned-by-dhcp.cox.net> (raw)

The version I pushed out on 'next' has a serious breakage that
would affect merges to anybody who has 'merge.summary' or
'merge.tool' set.

Sorry for the gotcha --- here is a quickfix.

I'll be pushing out an updated 'next', hopefully shortly.

---

 merge-recursive.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/merge-recursive.c b/merge-recursive.c
index ec8438b..96e461c 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -809,6 +809,9 @@ static int ll_ext_merge(const struct ll_merge_driver *fn,
 	int status, fd, i;
 	struct stat st;
 
+	if (fn->cmdline == NULL)
+		die("custom merge driver %s lacks command line.", fn->name);
+
 	result->ptr = NULL;
 	result->size = 0;
 	create_temp(orig, temp[0]);
@@ -879,7 +882,7 @@ static int read_merge_config(const char *var, const char *value)
 	 * especially, we do not want to look at variables such as
 	 * "merge.summary", "merge.tool", and "merge.verbosity".
 	 */
-	if (prefixcmp(var, "merge.") || (ep = strrchr(var, '.')) == var + 6)
+	if (prefixcmp(var, "merge.") || (ep = strrchr(var, '.')) == var + 5)
 		return 0;
 
 	/*
@@ -1021,13 +1024,8 @@ static int ll_merge(mmbuffer_t *result_buf,
 	ll_driver_name = git_path_check_merge(a->path);
 	driver = find_ll_merge_driver(ll_driver_name);
 
-	if (index_only && driver->recursive) {
-		void *merge_attr;
-
-		ll_driver_name = driver->recursive;
-		merge_attr = git_attr(ll_driver_name, strlen(ll_driver_name));
-		driver = find_ll_merge_driver(merge_attr);
-	}
+	if (index_only && driver->recursive)
+		driver = find_ll_merge_driver(driver->recursive);
 	merge_status = driver->fn(driver, a->path,
 				  &orig, &src1, name1, &src2, name2,
 				  result_buf);

                 reply	other threads:[~2007-04-19  2:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=7vps61aybz.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    /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).