From: Junio C Hamano <gitster@pobox.com>
To: Paul Mackerras <paulus@samba.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, git@vger.kernel.org
Subject: Re: Suggestion: make --left-right work with --merge
Date: Tue, 26 Feb 2008 23:18:38 -0800 [thread overview]
Message-ID: <7v7igqyii9.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <18372.53155.854763.12637@cargo.ozlabs.ibm.com> (Paul Mackerras's message of "Wed, 27 Feb 2008 13:49:07 +1100")
Paul Mackerras <paulus@samba.org> writes:
> It would be nice if git-log --merge --left-right did what git log
> --merge does but additionally, if the merge is a 2-way merge, marked
> commits with '<' or '>' according to which side of the merge they came
> from. Would that be possible? I think the visual indication that
> --left-right gives in gitk would be useful with --merge.
Like this?
A trivial feature that can be implemented in -4 lines ;-)
revision.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/revision.c b/revision.c
index 4e36b95..38d7d94 100644
--- a/revision.c
+++ b/revision.c
@@ -771,14 +771,9 @@ static void prepare_show_merge(struct rev_info *revs)
add_pending_object(revs, &head->object, "HEAD");
add_pending_object(revs, &other->object, "MERGE_HEAD");
bases = get_merge_bases(head, other, 1);
- while (bases) {
- struct commit *it = bases->item;
- struct commit_list *n = bases->next;
- free(bases);
- bases = n;
- it->object.flags |= UNINTERESTING;
- add_pending_object(revs, &it->object, "(merge-base)");
- }
+ add_pending_commit_list(revs, bases, UNINTERESTING);
+ free_commit_list(bases);
+ head->object.flags |= SYMMETRIC_LEFT;
if (!active_nr)
read_cache();
@@ -797,6 +792,7 @@ static void prepare_show_merge(struct rev_info *revs)
i++;
}
revs->prune_data = prune;
+ revs->limited = 1;
}
int handle_revision_arg(const char *arg, struct rev_info *revs,
next prev parent reply other threads:[~2008-02-27 7:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-27 2:49 Suggestion: make --left-right work with --merge Paul Mackerras
2008-02-27 7:18 ` Junio C Hamano [this message]
2008-02-27 22:36 ` Paul Mackerras
2008-02-27 22:50 ` Junio C Hamano
2008-02-28 11:21 ` Paul Mackerras
2008-02-29 7:32 ` Junio C Hamano
2008-02-29 10:52 ` Paul Mackerras
2008-02-29 19:26 ` Junio C Hamano
2008-03-01 7:39 ` Paul Mackerras
2008-03-01 7:52 ` Junio C Hamano
2008-03-01 10:59 ` Paul Mackerras
2008-02-29 21:05 ` Linus Torvalds
2008-02-29 7:49 ` Junio C Hamano
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=7v7igqyii9.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
--cc=torvalds@linux-foundation.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).