All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Heiko Voigt <hvoigt@hvoigt.net>
Cc: Brad King <brad.king@kitware.com>, git@vger.kernel.org
Subject: Re: [PATCH] allow multiple calls to submodule merge search for the same path
Date: Thu, 25 Aug 2011 16:39:26 -0700	[thread overview]
Message-ID: <7vobzdgixd.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7vsjopgjfs.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Thu, 25 Aug 2011 16:28:23 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> Heiko Voigt <hvoigt@hvoigt.net> writes:
>>
>>> diff --git a/t/t7405-submodule-merge.sh b/t/t7405-submodule-merge.sh
>>> index 8f6f2d6..603fb72 100755
>>> --- a/t/t7405-submodule-merge.sh
>>> +++ b/t/t7405-submodule-merge.sh
>>> @@ -269,7 +269,7 @@ test_expect_success 'setup for recursive merge with submodule' '
>>>  '
>>>  
>>>  # merge should leave submodule unmerged in index
>>> -test_expect_failure 'recursive merge with submodule' '
>>> +test_expect_success 'recursive merge with submodule' '
>>>  	(cd merge-recursive &&
>>>  	 test_must_fail git merge top-bc &&
>>>  	 echo "160000 $(git rev-parse top-cb:sub) 2	sub" > expect2 &&
>>
>> What is this patch based on?
>
> Ah, nevermind. I figured it out. Thanks.

Just FYI; squashed this on top to fix compilation breakage.
Thanks.

 submodule.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/submodule.c b/submodule.c
index 21a57d2..752cd8a 100644
--- a/submodule.c
+++ b/submodule.c
@@ -738,6 +738,7 @@ static int find_first_merges(struct object_array *result, const char *path,
 	struct object_array merges;
 	struct commit *commit;
 	int contains_another;
+	FILE *out;
 
 	char merged_revision[42];
 	const char *rev_args[] = { "rev-list", "--merges", "--ancestry-path",
@@ -762,14 +763,15 @@ static int find_first_merges(struct object_array *result, const char *path,
 	if (start_command(&cp))
 		die("Could not run 'git rev-list --merges --ancestry-path --all %s' "
 				"command in submodule %s", merged_revision, path);
-	FILE *out = fdopen(cp.out, "r");
+	out = fdopen(cp.out, "r");
 	if (!out)
 		die("Could not open pipe of rev-list command.");
 
 	/* save all revisions from the above list that contain b */
 	while (strbuf_getline(&one_rev, out, '\n') != EOF) {
+		struct object *o;
 		commit = lookup_commit_reference_by_name(one_rev.buf);
-		struct object *o = &(commit->object);
+		o = &(commit->object);
 		if (in_merge_bases(b, &commit, 1))
 			add_object_array(o, NULL, &merges);
 	}

  reply	other threads:[~2011-08-25 23:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-24 13:59 [PATCH] submodule: Demonstrate known breakage during recursive merge Brad King
2011-08-24 19:14 ` Heiko Voigt
2011-08-24 19:24   ` Junio C Hamano
2011-08-24 19:46     ` Heiko Voigt
2011-08-24 20:02       ` Brad King
2011-08-24 20:27         ` Heiko Voigt
2011-08-24 20:40           ` Brad King
2011-08-24 21:32             ` Heiko Voigt
2011-08-25 16:49               ` [PATCH] rev-list: Demonstrate breakage with --ancestry-path --all Brad King
2011-08-25 23:08                 ` Junio C Hamano
2011-08-25 23:49                   ` Junio C Hamano
2011-08-26  1:00                 ` [PATCH 1/2] revision: keep track of the end-user input from the command line Junio C Hamano
2011-08-26  1:08                   ` Sverre Rabbelier
2011-08-26  2:21                     ` Junio C Hamano
2011-08-26  1:00                 ` [PATCH 2/2] revision: do not include sibling history in --ancestry-path output Junio C Hamano
2011-08-26 12:51                   ` Brad King
2011-08-24 22:43       ` [PATCH] submodule: Demonstrate known breakage during recursive merge Junio C Hamano
2011-08-25 21:11         ` [PATCH] allow multiple calls to submodule merge search for the same path Heiko Voigt
2011-08-25 23:22           ` Junio C Hamano
2011-08-25 23:28             ` Junio C Hamano
2011-08-25 23:39               ` Junio C Hamano [this message]
2011-08-25 12:28 ` [PATCH v2] submodule: Demonstrate known breakage during recursive merge Brad King
2011-08-26 14:18   ` [PATCH/RFC] submodule: Search for merges only at end of " Brad King
2011-08-26 19:04     ` Junio C Hamano
2011-08-26 19:30       ` [PATCH v2/RFC] " Brad King

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=7vobzdgixd.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=brad.king@kitware.com \
    --cc=git@vger.kernel.org \
    --cc=hvoigt@hvoigt.net \
    /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.