Skip to content

Commit 765ac8e

Browse files
Linus TorvaldsJunio C Hamano
authored andcommitted
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 <[email protected]>
1 parent 70b006b commit 765ac8e

File tree

11 files changed

+82
-1299
lines changed

11 files changed

+82
-1299
lines changed

Documentation/git-rev-list.txt

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SYNOPSIS
1616
[ \--no-merges ]
1717
[ \--remove-empty ]
1818
[ \--all ]
19-
[ [ \--merge-order [ \--show-breaks ] ] | [ \--topo-order ] ]
19+
[ \--topo-order ]
2020
[ \--parents ]
2121
[ \--objects [ \--unpacked ] ]
2222
[ \--pretty | \--header ]
@@ -94,57 +94,10 @@ OPTIONS
9494
topological order (i.e. descendant commits are shown
9595
before their parents).
9696

97-
--merge-order::
98-
When specified the commit history is decomposed into a unique
99-
sequence of minimal, non-linear epochs and maximal, linear epochs.
100-
Non-linear epochs are then linearised by sorting them into merge
101-
order, which is described below.
102-
+
103-
Maximal, linear epochs correspond to periods of sequential development.
104-
Minimal, non-linear epochs correspond to periods of divergent development
105-
followed by a converging merge. The theory of epochs is described in more
106-
detail at
107-
link:http://blackcubes.dyndns.org/epoch/[http://blackcubes.dyndns.org/epoch/].
108-
+
109-
The merge order for a non-linear epoch is defined as a linearisation for which
110-
the following invariants are true:
111-
+
112-
1. if a commit P is reachable from commit N, commit P sorts after commit N
113-
in the linearised list.
114-
2. if Pi and Pj are any two parents of a merge M (with i < j), then any
115-
commit N, such that N is reachable from Pj but not reachable from Pi,
116-
sorts before all commits reachable from Pi.
117-
+
118-
Invariant 1 states that later commits appear before earlier commits they are
119-
derived from.
120-
+
121-
Invariant 2 states that commits unique to "later" parents in a merge, appear
122-
before all commits from "earlier" parents of a merge.
123-
124-
--show-breaks::
125-
Each item of the list is output with a 2-character prefix consisting
126-
of one of: (|), (^), (=) followed by a space.
127-
+
128-
Commits marked with (=) represent the boundaries of minimal, non-linear epochs
129-
and correspond either to the start of a period of divergent development or to
130-
the end of such a period.
131-
+
132-
Commits marked with (|) are direct parents of commits immediately preceding
133-
the marked commit in the list.
134-
+
135-
Commits marked with (^) are not parents of the immediately preceding commit.
136-
These "breaks" represent necessary discontinuities implied by trying to
137-
represent an arbitrary DAG in a linear form.
138-
+
139-
`--show-breaks` is only valid if `--merge-order` is also specified.
140-
141-
14297
Author
14398
------
14499
Written by Linus Torvalds <[email protected]>
145100

146-
Original *--merge-order* logic by Jon Seymour <[email protected]>
147-
148101
Documentation
149102
--------------
150103
Documentation by David Greaves, Junio C Hamano and the git-list <[email protected]>.

INSTALL

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ Issues of note:
4040

4141
If you don't have openssl, you can use one of the SHA1 libraries
4242
that come with git (git includes the one from Mozilla, and has
43-
its own PowerPC-optimized one too - see the Makefile), and you
44-
can avoid the bignum support by excising git-rev-list support
45-
for "--merge-order" (by hand).
43+
its own PowerPC and ARM optimized ones too - see the Makefile).
4644

4745
- "libcurl" and "curl" executable. git-http-fetch and
4846
git-fetch use them. If you do not use http

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ all:
66
# on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default
77
# choice) has very fast version optimized for i586.
88
#
9-
# Define NO_OPENSSL environment variable if you do not have OpenSSL. You will
10-
# miss out git-rev-list --merge-order. This also implies MOZILLA_SHA1.
9+
# Define NO_OPENSSL environment variable if you do not have OpenSSL.
10+
# This also implies MOZILLA_SHA1.
1111
#
1212
# Define NO_CURL if you do not have curl installed. git-http-pull and
1313
# git-http-push are not built, and you cannot use http:// and https://
@@ -191,7 +191,7 @@ LIB_FILE=libgit.a
191191

192192
LIB_H = \
193193
blob.h cache.h commit.h count-delta.h csum-file.h delta.h \
194-
diff.h epoch.h object.h pack.h pkt-line.h quote.h refs.h \
194+
diff.h object.h pack.h pkt-line.h quote.h refs.h \
195195
run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h
196196

197197
DIFF_OBJS = \
@@ -324,7 +324,6 @@ ifndef NO_CURL
324324
endif
325325

326326
ifndef NO_OPENSSL
327-
LIB_OBJS += epoch.o
328327
OPENSSL_LIBSSL = -lssl
329328
ifdef OPENSSLDIR
330329
# Again this may be problematic -- gcc does not always want -R.

0 commit comments

Comments
 (0)