Merge branch 'js/rerere'
authorJunio C Hamano <junkio@cox.net>
Sun, 24 Dec 2006 10:10:55 +0000 (02:10 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 24 Dec 2006 10:10:55 +0000 (02:10 -0800)
* js/rerere:
Make git-rerere a builtin
Add a test for git-rerere
move read_mmfile() into xdiff-interface

1  2 
Makefile
git.c
diff --combined Makefile
index d56970c569985c956d2ba6a373ac4b90e9cdd636,154bf4cf52db44088e123b208b2dd07713bcfde1..8827dee59ccee9365b19113e28034ef822776026
+++ b/Makefile
@@@ -79,6 -79,9 +79,6 @@@ all
  #
  # Define NO_ICONV if your libc does not properly support iconv.
  #
 -# Define NO_ACCURATE_DIFF if your diff program at least sometimes misses
 -# a missing newline at the end of the file.
 -#
  # Define USE_NSEC below if you want git to care about sub-second file mtimes
  # and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and
  # it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely
@@@ -171,7 -174,6 +171,6 @@@ SCRIPT_SH = 
  
  SCRIPT_PERL = \
        git-archimport.perl git-cvsimport.perl git-relink.perl \
-       git-rerere.perl \
        git-cvsserver.perl \
        git-svnimport.perl git-cvsexportcommit.perl \
        git-send-email.perl git-svn.perl
@@@ -230,8 -232,7 +229,8 @@@ LIB_H = 
        archive.h blob.h cache.h commit.h csum-file.h delta.h grep.h \
        diff.h object.h pack.h pkt-line.h quote.h refs.h list-objects.h sideband.h \
        run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h \
 -      tree-walk.h log-tree.h dir.h path-list.h unpack-trees.h builtin.h
 +      tree-walk.h log-tree.h dir.h path-list.h unpack-trees.h builtin.h \
 +      utf8.h
  
  DIFF_OBJS = \
        diff.o diff-lib.o diffcore-break.o diffcore-order.o \
@@@ -250,8 -251,7 +249,8 @@@ LIB_OBJS = 
        revision.o pager.o tree-walk.o xdiff-interface.o \
        write_or_die.o trace.o list-objects.o grep.o \
        alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \
 -      color.o wt-status.o archive-zip.o archive-tar.o
 +      color.o wt-status.o archive-zip.o archive-tar.o \
 +      utf8.o
  
  BUILTIN_OBJS = \
        builtin-add.o \
        builtin-push.o \
        builtin-read-tree.o \
        builtin-repo-config.o \
+       builtin-rerere.o \
        builtin-rev-list.o \
        builtin-rev-parse.o \
        builtin-rm.o \
@@@ -548,6 -549,9 +548,6 @@@ els
  endif
  endif
  endif
 -ifdef NO_ACCURATE_DIFF
 -      BASIC_CFLAGS += -DNO_ACCURATE_DIFF
 -endif
  ifdef NO_PERL_MAKEMAKER
        export NO_PERL_MAKEMAKER
  endif
@@@ -826,8 -830,6 +826,8 @@@ install: al
  install-doc:
        $(MAKE) -C Documentation install
  
 +quick-install-doc:
 +      $(MAKE) -C Documentation quick-install
  
  
  
diff --combined git.c
index 7bb61d8375e5f4c3fe3f5b7dfa85d7f1f3fff997,7a01e02f2b21c029277564ad104c512cbc68b7ba..e732a098fc164da10ed9f41113c7d32d1b022966
--- 1/git.c
--- 2/git.c
+++ b/git.c
@@@ -59,10 -59,8 +59,10 @@@ static int handle_options(const char**
                } else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
                        setup_pager();
                } else if (!strcmp(cmd, "--git-dir")) {
 -                      if (*argc < 1)
 -                              return -1;
 +                      if (*argc < 2) {
 +                              fprintf(stderr, "No directory given for --git-dir.\n" );
 +                              usage(git_usage_string);
 +                      }
                        setenv("GIT_DIR", (*argv)[1], 1);
                        (*argv)++;
                        (*argc)--;
@@@ -247,6 -245,7 +247,7 @@@ static void handle_internal_command(in
                { "push", cmd_push, RUN_SETUP },
                { "read-tree", cmd_read_tree, RUN_SETUP },
                { "repo-config", cmd_repo_config },
+               { "rerere", cmd_rerere, RUN_SETUP },
                { "rev-list", cmd_rev_list, RUN_SETUP },
                { "rev-parse", cmd_rev_parse, RUN_SETUP },
                { "rm", cmd_rm, RUN_SETUP },