Skip to content

Commit 21dbe12

Browse files
author
Junio C Hamano
committed
Merge branch 'lt/rev-list'
* lt/rev-list: setup_revisions(): handle -n<n> and -<n> internally. git-log (internal): more options. git-log (internal): add approxidate. Rip out merge-order and make "git log <paths>..." work again. Tie it all together: "git log" Introduce trivial new pager.c helper infrastructure git-rev-list libification: rev-list walking Splitting rev-list into revisions lib, end of beginning. rev-list split: minimum fixup. First cut at libifying revlist generation
2 parents ed19f36 + 64bc6e3 commit 21dbe12

File tree

14 files changed

+954
-1886
lines changed

14 files changed

+954
-1886
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 | \--objects-edge] [ \--unpacked ] ]
2222
[ \--pretty | \--header ]
@@ -102,57 +102,10 @@ OPTIONS
102102
topological order (i.e. descendant commits are shown
103103
before their parents).
104104

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

154-
Original *--merge-order* logic by Jon Seymour <[email protected]>
155-
156109
Documentation
157110
--------------
158111
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: 6 additions & 7 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,8 +191,8 @@ 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 \
195-
run-command.h strbuf.h tag.h tree.h git-compat-util.h
194+
diff.h object.h pack.h pkt-line.h quote.h refs.h \
195+
run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h
196196

197197
DIFF_OBJS = \
198198
diff.o diffcore-break.o diffcore-order.o diffcore-pathspec.o \
@@ -206,7 +206,7 @@ LIB_OBJS = \
206206
quote.o read-cache.o refs.o run-command.o \
207207
server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \
208208
tag.o tree.o usage.o config.o environment.o ctype.o copy.o \
209-
fetch-clone.o \
209+
fetch-clone.o revision.o pager.o \
210210
$(DIFF_OBJS)
211211

212212
LIBS = $(LIB_FILE)
@@ -329,7 +329,6 @@ ifndef NO_CURL
329329
endif
330330

331331
ifndef NO_OPENSSL
332-
LIB_OBJS += epoch.o
333332
OPENSSL_LIBSSL = -lssl
334333
ifdef OPENSSLDIR
335334
# Again this may be problematic -- gcc does not always want -R.
@@ -455,7 +454,7 @@ strip: $(PROGRAMS) git$X
455454

456455
git$X: git.c $(LIB_FILE)
457456
$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
458-
$(CFLAGS) $(COMPAT_CFLAGS) -o $@ $(filter %.c,$^) $(LIB_FILE)
457+
$(ALL_CFLAGS) -o $@ $(filter %.c,$^) $(LIB_FILE) $(LIBS)
459458

460459
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
461460
rm -f $@

cache.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,4 +354,7 @@ extern int copy_fd(int ifd, int ofd);
354354
extern int receive_unpack_pack(int fd[2], const char *me, int quiet);
355355
extern int receive_keep_pack(int fd[2], const char *me, int quiet);
356356

357+
/* pager.c */
358+
extern void setup_pager(void);
359+
357360
#endif /* CACHE_H */

0 commit comments

Comments
 (0)