From: Junio C Hamano Date: Sat, 4 Mar 2006 21:21:17 +0000 (-0800) Subject: Merge branch 'lt/rev-list' X-Git-Tag: v1.3.0-rc1~53^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/21dbe12c76e43735dc623067c1b09ef43519d9fc?ds=inline;hp=-c Merge branch 'lt/rev-list' * lt/rev-list: setup_revisions(): handle -n and - internally. git-log (internal): more options. git-log (internal): add approxidate. Rip out merge-order and make "git log ..." 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 --- 21dbe12c76e43735dc623067c1b09ef43519d9fc diff --combined Documentation/git-rev-list.txt index 27f18e2c50,5b306d6593..8255ae1bce --- a/Documentation/git-rev-list.txt +++ b/Documentation/git-rev-list.txt @@@ -16,9 -16,9 +16,9 @@@ SYNOPSI [ \--no-merges ] [ \--remove-empty ] [ \--all ] - [ [ \--merge-order [ \--show-breaks ] ] | [ \--topo-order ] ] + [ \--topo-order ] [ \--parents ] - [ \--objects [ \--unpacked ] ] + [ [\--objects | \--objects-edge] [ \--unpacked ] ] [ \--pretty | \--header ] [ \--bisect ] ... [ \-- ... ] @@@ -53,14 -53,6 +53,14 @@@ OPTION which I need to download if I have the commit object 'bar', but not 'foo'". +--objects-edge:: + Similar to `--objects`, but also print the IDs of + excluded commits refixed with a `-` character. This is + used by `git-pack-objects` to build 'thin' pack, which + records objects in deltified form based on objects + contained in these excluded commits to reduce network + traffic. + --unpacked:: Only useful with `--objects`; print the object IDs that are not in packs. @@@ -102,57 -94,10 +102,10 @@@ topological order (i.e. descendant commits are shown before their parents). - --merge-order:: - When specified the commit history is decomposed into a unique - sequence of minimal, non-linear epochs and maximal, linear epochs. - Non-linear epochs are then linearised by sorting them into merge - order, which is described below. - + - Maximal, linear epochs correspond to periods of sequential development. - Minimal, non-linear epochs correspond to periods of divergent development - followed by a converging merge. The theory of epochs is described in more - detail at - link:http://blackcubes.dyndns.org/epoch/[http://blackcubes.dyndns.org/epoch/]. - + - The merge order for a non-linear epoch is defined as a linearisation for which - the following invariants are true: - + - 1. if a commit P is reachable from commit N, commit P sorts after commit N - in the linearised list. - 2. if Pi and Pj are any two parents of a merge M (with i < j), then any - commit N, such that N is reachable from Pj but not reachable from Pi, - sorts before all commits reachable from Pi. - + - Invariant 1 states that later commits appear before earlier commits they are - derived from. - + - Invariant 2 states that commits unique to "later" parents in a merge, appear - before all commits from "earlier" parents of a merge. - - --show-breaks:: - Each item of the list is output with a 2-character prefix consisting - of one of: (|), (^), (=) followed by a space. - + - Commits marked with (=) represent the boundaries of minimal, non-linear epochs - and correspond either to the start of a period of divergent development or to - the end of such a period. - + - Commits marked with (|) are direct parents of commits immediately preceding - the marked commit in the list. - + - Commits marked with (^) are not parents of the immediately preceding commit. - These "breaks" represent necessary discontinuities implied by trying to - represent an arbitrary DAG in a linear form. - + - `--show-breaks` is only valid if `--merge-order` is also specified. - - Author ------ Written by Linus Torvalds - Original *--merge-order* logic by Jon Seymour - Documentation -------------- Documentation by David Greaves, Junio C Hamano and the git-list . diff --combined Makefile index a5eb0c4beb,bd156d24fd..a1ec04e3a0 --- a/Makefile +++ b/Makefile @@@ -6,8 -6,8 +6,8 @@@ all # on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default # choice) has very fast version optimized for i586. # - # Define NO_OPENSSL environment variable if you do not have OpenSSL. You will - # miss out git-rev-list --merge-order. This also implies MOZILLA_SHA1. + # Define NO_OPENSSL environment variable if you do not have OpenSSL. + # This also implies MOZILLA_SHA1. # # Define NO_CURL if you do not have curl installed. git-http-pull and # git-http-push are not built, and you cannot use http:// and https:// @@@ -191,13 -191,12 +191,13 @@@ LIB_FILE=libgit. LIB_H = \ blob.h cache.h commit.h count-delta.h csum-file.h delta.h \ - diff.h epoch.h object.h pack.h pkt-line.h quote.h refs.h \ - run-command.h strbuf.h tag.h tree.h git-compat-util.h + diff.h object.h pack.h pkt-line.h quote.h refs.h \ + run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h DIFF_OBJS = \ diff.o diffcore-break.o diffcore-order.o diffcore-pathspec.o \ - diffcore-pickaxe.o diffcore-rename.o tree-diff.o combine-diff.o + diffcore-pickaxe.o diffcore-rename.o tree-diff.o combine-diff.o \ + diffcore-delta.o LIB_OBJS = \ blob.o commit.o connect.o count-delta.o csum-file.o \ @@@ -206,7 -205,7 +206,7 @@@ quote.o read-cache.o refs.o run-command.o \ server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \ tag.o tree.o usage.o config.o environment.o ctype.o copy.o \ - fetch-clone.o \ + fetch-clone.o revision.o pager.o \ $(DIFF_OBJS) LIBS = $(LIB_FILE) @@@ -224,15 -223,11 +224,15 @@@ ifeq ($(uname_S),Darwin NEEDS_SSL_WITH_CRYPTO = YesPlease NEEDS_LIBICONV = YesPlease ## fink - ALL_CFLAGS += -I/sw/include - ALL_LDFLAGS += -L/sw/lib + ifeq ($(shell test -d /sw/lib && echo y),y) + ALL_CFLAGS += -I/sw/include + ALL_LDFLAGS += -L/sw/lib + endif ## darwinports - ALL_CFLAGS += -I/opt/local/include - ALL_LDFLAGS += -L/opt/local/lib + ifeq ($(shell test -d /opt/local/lib && echo y),y) + ALL_CFLAGS += -I/opt/local/include + ALL_LDFLAGS += -L/opt/local/lib + endif endif ifeq ($(uname_S),SunOS) NEEDS_SOCKET = YesPlease @@@ -329,7 -324,6 +329,6 @@@ ifndef NO_CUR endif ifndef NO_OPENSSL - LIB_OBJS += epoch.o OPENSSL_LIBSSL = -lssl ifdef OPENSSLDIR # Again this may be problematic -- gcc does not always want -R. @@@ -455,7 -449,7 +454,7 @@@ strip: $(PROGRAMS) git$ git$X: git.c $(LIB_FILE) $(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \ - $(CFLAGS) $(COMPAT_CFLAGS) -o $@ $(filter %.c,$^) $(LIB_FILE) + $(ALL_CFLAGS) -o $@ $(filter %.c,$^) $(LIB_FILE) $(LIBS) $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh rm -f $@ diff --combined cache.h index 0d3b244ddd,3af6b868e8..8dc1de16e4 --- a/cache.h +++ b/cache.h @@@ -161,13 -161,11 +161,13 @@@ extern int hold_index_file_for_update(s extern int commit_index_file(struct cache_file *); extern void rollback_index_file(struct cache_file *); +/* Environment bits from configuration mechanism */ extern int trust_executable_bit; extern int assume_unchanged; extern int only_use_symrefs; extern int diff_rename_limit_default; extern int shared_repository; +extern const char *apply_default_whitespace; #define GIT_REPO_VERSION 0 extern int repository_format_version; @@@ -354,4 -352,7 +354,7 @@@ extern int copy_fd(int ifd, int ofd) extern int receive_unpack_pack(int fd[2], const char *me, int quiet); extern int receive_keep_pack(int fd[2], const char *me, int quiet); + /* pager.c */ + extern void setup_pager(void); + #endif /* CACHE_H */