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
+++ 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
+++ 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
--- 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;