From: Heiko Voigt <hvoigt@hvoigt.net>
To: Johan Herland <johan@herland.net>
Cc: git@vger.kernel.org, gitster@pobox.com, jens.lehmann@web.de
Subject: Re: Re: [PATCH v2 4/4] implement automatic fast forward merge for submodules
Date: Wed, 7 Jul 2010 15:35:58 +0200 [thread overview]
Message-ID: <20100707133557.GA35678@book.hvoigt.net> (raw)
In-Reply-To: <201007070152.17802.johan@herland.net>
Hi,
On Wed, Jul 07, 2010 at 01:52:16AM +0200, Johan Herland wrote:
> On Tuesday 06 July 2010, Heiko Voigt wrote:
> [...]
>
> > + /* get all revisions that merge commit a */
> > + snprintf(merged_revision, sizeof(merged_revision), "^%s",
> > + find_unique_abbrev(a->object.sha1, 40));
>
> Why do you call find_unique_abbrev(..., 40) here?
> Isn't sha1_to_hex(a->object.sha1) a better solution?
Because I did not know it better at the time I wrote this :) Will be
corrected.
> > + init_revisions(&revs, NULL);
> > + rev_opts.submodule = path;
> > + setup_revisions(sizeof(rev_args)/sizeof(char *)-1, rev_args, &revs, &rev_opts);
> > +
> > + /* save all revisions from the above list that contain b */
> > + if (prepare_revision_walk(&revs))
> > + die("revision walk setup failed");
> > + while ((commit = get_revision(&revs)) != NULL) {
> > + struct object *o = &(commit->object);
> > + if (in_merge_bases(b, (struct commit **) &o, 1)) {
>
> Why not s/(struct commit **) &o/&commit/ ?
Similar, because I needed objects for the array. Will be corrected.
> > + (cd sub &&
> > + git rev-parse sub-d > ../expect) &&
> > + test_cmp actual expect)
> > +'
> > +
> > +test_expect_success 'merging should conflict for non fast-forward' '
> > + (cd merge-search &&
> > + git checkout -b test-nonforward b &&
> > + (cd sub &&
> > + git rev-parse sub-d > ../expect) &&
> > + test_must_fail git merge c 2> actual &&
> > + grep $(<expect) actual > /dev/null &&
>
> I cannot find the "$(<expect)" construct anywhere else in out test scripts.
> Is it portable? Should we maybe use "$(cat expect)" instead?
I do not know. Just to be sure I will change it to cat.
> Otherwise, it looks good to me. Thanks for the effort!
Thank you as well. The rest of the comments are already incorporated.
cheers Heiko
next prev parent reply other threads:[~2010-07-07 13:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-06 19:34 [PATCH v2 0/4] implement automatic submodule merge strategy when possible Heiko Voigt
2010-07-06 19:34 ` [PATCH v2 1/4] add missing && to submodule-merge testcase Heiko Voigt
2010-07-06 19:34 ` [PATCH v2 2/4] teach ref iteration module about submodules Heiko Voigt
2010-07-06 19:34 ` [PATCH v2 3/4] extent setup_revisions() so it works with submodules Heiko Voigt
2010-07-07 5:28 ` Junio C Hamano
2010-07-07 13:37 ` Heiko Voigt
2010-07-06 19:34 ` [PATCH v2 4/4] implement automatic fast forward merge for submodules Heiko Voigt
2010-07-06 23:52 ` Johan Herland
2010-07-07 13:35 ` Heiko Voigt [this message]
2010-07-08 0:34 ` Junio C Hamano
2010-07-06 23:53 ` [PATCH v2 0/4] implement automatic submodule merge strategy when possible Johan Herland
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100707133557.GA35678@book.hvoigt.net \
--to=hvoigt@hvoigt.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jens.lehmann@web.de \
--cc=johan@herland.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).