Code

Merge branch 'jc/grep'
authorJunio C Hamano <junkio@cox.net>
Tue, 16 May 2006 01:12:06 +0000 (18:12 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 16 May 2006 01:12:06 +0000 (18:12 -0700)
* jc/grep: (22 commits)
  Fix silly typo in new builtin grep
  builtin-grep: unparse more command line options.
  builtin-grep: use external grep when we can take advantage of it
  builtin-grep: -F (--fixed-strings)
  builtin-grep: -w fix
  builtin-grep: typofix
  builtin-grep: tighten argument parsing.
  builtin-grep: documentation
  Teach -f <file> option to builtin-grep.
  builtin-grep: -L (--files-without-match).
  builtin-grep: binary files -a and -I
  builtin-grep: terminate correctly at EOF
  builtin-grep: tighten path wildcard vs tree traversal.
  builtin-grep: support -w (--word-regexp).
  builtin-grep: support -c (--count).
  builtin-grep: allow more than one patterns.
  builtin-grep: allow -<n> and -[ABC]<n> notation for context lines.
  builtin-grep: printf %.*s length is int, not ptrdiff_t.
  builtin-grep: do not use setup_revisions()
  builtin-grep: support '-l' option.
  ...

1  2 
Makefile
builtin.h
git.c

diff --cc Makefile
index f4b6ef8751d8db2162a6e430ebf72ef5f444ec16,8d5122bdd518e6d85d15304f7e7638b84c9b00e7..93779b06f1a12989a6920cbc2a09170d70e62730
+++ b/Makefile
@@@ -216,7 -214,7 +216,8 @@@ LIB_OBJS = 
        $(DIFF_OBJS)
  
  BUILTIN_OBJS = \
-       builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o
 -      builtin-log.o builtin-help.o builtin-grep.o
++      builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
++      builtin-grep.o
  
  GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
  LIBS = $(GITLIBS) -lz
diff --cc builtin.h
index bb63f0729a4a05e60ef3e609b971bdf57b60b06d,cf5de3b9311569293399f2abf38417711b9ff7ce..7744f7d2f64185ceac6fc79afa64f1318f9984d4
+++ b/builtin.h
@@@ -19,9 -19,6 +19,10 @@@ extern int cmd_version(int argc, const 
  extern int cmd_whatchanged(int argc, const char **argv, char **envp);
  extern int cmd_show(int argc, const char **argv, char **envp);
  extern int cmd_log(int argc, const char **argv, char **envp);
 +extern int cmd_diff(int argc, const char **argv, char **envp);
 +extern int cmd_count_objects(int argc, const char **argv, char **envp);
 +
 +extern int cmd_push(int argc, const char **argv, char **envp);
+ extern int cmd_grep(int argc, const char **argv, char **envp);
  
  #endif
diff --cc git.c
index 49ba5189d923493aaed40a6a0fccc2ead040b06a,893bddd768674e7389864510f04655615233ebe3..a94d9ee5a73bc5f81982f49c06293df5bcf2d8cc
--- 1/git.c
--- 2/git.c
+++ b/git.c
@@@ -46,9 -46,7 +46,10 @@@ static void handle_internal_command(in
                { "log", cmd_log },
                { "whatchanged", cmd_whatchanged },
                { "show", cmd_show },
 +              { "push", cmd_push },
 +              { "count-objects", cmd_count_objects },
 +              { "diff", cmd_diff },
+               { "grep", cmd_grep },
        };
        int i;