Rip out merge-order and make "git log <paths>..." work again.
Well, assuming breaking --merge-order is fine, here's a patch (on top of the other ones) that makes git log <filename> actually work, as far as I can tell. I didn't add the logic for --before/--after flags, but that should be pretty trivial, and is independent of this anyway. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
70b006b971
commit
765ac8ec46
@ -928,7 +928,7 @@ sub find_parents {
|
||||
|
||||
# now walk up to the mergepoint collecting what patches we have
|
||||
my $branchtip = git_rev_parse($ps->{branch});
|
||||
my @ancestors = `git-rev-list --merge-order $branchtip ^$mergebase`;
|
||||
my @ancestors = `git-rev-list --topo-order $branchtip ^$mergebase`;
|
||||
my %have; # collected merges this branch has
|
||||
foreach my $merge (@{$ps->{merges}}) {
|
||||
$have{$merge} = 1;
|
||||
@ -951,7 +951,7 @@ sub find_parents {
|
||||
# see what the remote branch has - these are the merges we
|
||||
# will want to have in a consecutive series from the mergebase
|
||||
my $otherbranchtip = git_rev_parse($branch);
|
||||
my @needraw = `git-rev-list --merge-order $otherbranchtip ^$mergebase`;
|
||||
my @needraw = `git-rev-list --topo-order $otherbranchtip ^$mergebase`;
|
||||
my @need;
|
||||
foreach my $needps (@needraw) { # get the psets
|
||||
$needps = commitid2pset($needps);
|
||||
|
Reference in New Issue
Block a user