Skip to content

Commit ae56354

Browse files
Linus TorvaldsJunio C Hamano
authored andcommitted
First cut at libifying revlist generation
This really just splits things up partially, and creates the interface to set things up by parsing the command line. No real code changes so far, although the parsing of filenames is a bit stricter. In particular, if there is a "--", then we do not accept any filenames before it, and if there isn't any "--", then we check that _all_ paths listed are valid, not just the first one. The new argument parsing automatically also gives us "--default" and "--not" handling as in git-rev-parse. Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ac5f7c6 commit ae56354

File tree

6 files changed

+464
-357
lines changed

6 files changed

+464
-357
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ LIB_FILE=libgit.a
192192
LIB_H = \
193193
blob.h cache.h commit.h count-delta.h csum-file.h delta.h \
194194
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
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 \
@@ -205,7 +205,7 @@ LIB_OBJS = \
205205
quote.o read-cache.o refs.o run-command.o \
206206
server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \
207207
tag.o tree.o usage.o config.o environment.o ctype.o copy.o \
208-
fetch-clone.o \
208+
fetch-clone.o revision.o \
209209
$(DIFF_OBJS)
210210

211211
LIBS = $(LIB_FILE)

epoch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include "cache.h"
1717
#include "commit.h"
18+
#include "revision.h"
1819
#include "epoch.h"
1920

2021
struct fraction {

epoch.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ typedef int (*emitter_func) (struct commit *);
1111
int sort_list_in_merge_order(struct commit_list *list, emitter_func emitter);
1212

1313
/* Low bits are used by rev-list */
14-
#define UNINTERESTING (1u<<10)
1514
#define BOUNDARY (1u<<11)
1615
#define VISITED (1u<<12)
1716
#define DISCONTINUITY (1u<<13)

0 commit comments

Comments
 (0)