From: Junio C Hamano <gitster@pobox.com>
To: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Cc: git@vger.kernel.org, Christian Couder <chriscool@tuxfamily.org>,
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Subject: Re: [PATCH 0/4] Re: cherry-pick and 'log --no-walk' and ordering
Date: Mon, 13 Aug 2012 00:17:59 -0700 [thread overview]
Message-ID: <7vhas7fefs.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <50289e50.8458320a.7d31.3c46SMTPIN_ADDED@gmr-mx.google.com> (y.'s message of "Sun, 12 Aug 2012 23:27:16 -0700")
y@google.com writes:
[Administrivia: I somehow doubt y@google.com would reach you, and
futzed with the To: line above]
> From: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
>
> This series adds supports for 'git log --no-walk=unsorted', which
> should be useful for the re-roll of my mz/rebase-range series. It also
> addresses the bug in cherry-pick/revert, which makes it sort revisions
> by date.
>
> On Fri, Aug 10, 2012 at 11:28 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Range limited revision walking, e.g. "git cherry-pick A..B D~4..D",
>> fundamentally implies sorting and you cannot assume B would appear
>> before D only because B comes before D on the command line (B may
>> even be inside D~4..D range in which case it would not even appear
>> in the final output).
>
> Sorry, I probably wasn't clear; I mentioned "revision walking", but I
> only meant the no-walk case. I hope the patches make sense.
I actually think --no-walk, especially when given any negative
revision, that sorts is fundamentally a flawed concept (it led to
the inconsistency that made "git show A..B C" vs "git show C A..B"
behave differently, which we had to fix recently).
Would anything break if we take your patch, but without two
possibilities to revs->no_walk option (i.e. we never sort under
no_walk)? That is, the core of your change would become something
like this:
revision.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/revision.c b/revision.c
index 9e8f47a..589d17f 100644
--- a/revision.c
+++ b/revision.c
@@ -2116,12 +2116,12 @@ int prepare_revision_walk(struct rev_info *revs)
}
e++;
}
- commit_list_sort_by_date(&revs->commits);
if (!revs->leak_pending)
free(list);
if (revs->no_walk)
return 0;
+ commit_list_sort_by_date(&revs->commits);
if (revs->limited)
if (limit_list(revs) < 0)
return -1;
next prev parent reply other threads:[~2012-08-13 7:18 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-10 20:41 cherry-pick and 'log --no-walk' and ordering Martin von Zweigbergk
2012-08-10 21:38 ` Junio C Hamano
2012-08-11 5:34 ` Martin von Zweigbergk
2012-08-11 6:28 ` Junio C Hamano
2012-08-13 6:27 ` [PATCH 0/4] " y
2012-08-13 7:17 ` Junio C Hamano [this message]
2012-08-13 7:26 ` Junio C Hamano
2012-08-13 16:09 ` Martin von Zweigbergk
2012-08-13 17:05 ` Junio C Hamano
2012-08-13 18:28 ` Martin von Zweigbergk
2012-08-13 21:31 ` Junio C Hamano
2012-08-13 22:01 ` Martin von Zweigbergk
2012-08-29 6:15 ` [PATCH v2 0/3] revision (no-)walking in order Martin von Zweigbergk
2012-08-29 6:15 ` [PATCH v2 1/3] teach log --no-walk=unsorted, which avoids sorting Martin von Zweigbergk
2012-08-29 17:34 ` Dan Johnson
2012-08-29 17:42 ` Junio C Hamano
2012-08-29 6:15 ` [PATCH v2 2/3] demonstrate broken 'git cherry-pick three one two' Martin von Zweigbergk
2012-08-30 21:02 ` Junio C Hamano
2012-08-29 6:15 ` [PATCH v2 3/3] cherry-pick/revert: respect order of revisions to pick Martin von Zweigbergk
2012-08-29 6:46 ` [PATCH v2 0/3] revision (no-)walking in order Junio C Hamano
2012-08-29 16:20 ` [PATCH] Martin von Zweigbergk has a new e-mail address Martin von Zweigbergk
[not found] ` <1344839240-17402-1-git-send-email-y>
2012-08-13 6:27 ` [PATCH 1/4] teach log --no-walk=unsorted, which avoids sorting y
2012-08-13 6:27 ` [PATCH 2/4] revisions passed to cherry-pick should be in "default" order y
2012-08-13 20:05 ` Junio C Hamano
2012-08-13 20:50 ` Martin von Zweigbergk
2012-08-13 21:05 ` Junio C Hamano
2012-08-15 6:05 ` Martin von Zweigbergk
2012-08-15 17:16 ` Junio C Hamano
2012-08-15 18:22 ` Martin von Zweigbergk
2012-08-15 18:39 ` Junio C Hamano
2012-08-15 20:50 ` Martin von Zweigbergk
2012-08-13 20:10 ` Martin von Zweigbergk
2012-08-13 20:52 ` Junio C Hamano
2012-08-13 6:27 ` [PATCH 3/4] cherry-pick/revert: respect order of revisions to pick y
2012-08-13 6:27 ` [PATCH 4/4] cherry-pick/revert: default to topological sorting y
2012-08-13 20:23 ` Junio C Hamano
2012-08-13 21:50 ` 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=7vhas7fefs.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=martin.von.zweigbergk@gmail.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).