Merge branch 'lt/prune'
authorJunio C Hamano <junkio@cox.net>
Thu, 13 Jul 2006 05:31:55 +0000 (22:31 -0700)
committerJunio C Hamano <junkio@cox.net>
Thu, 13 Jul 2006 05:31:55 +0000 (22:31 -0700)
* lt/prune:
builtin "git prune"

1  2 
Makefile
git.c
diff --combined Makefile
index 649ed4cdc2eb9be953efdda57fb2de7acbf47aa4,04804c849c943b3612993a7242e716b299d4ed24..01fb9cfdbd2bc8c53366d1db6f9b7b7525823fa5
+++ b/Makefile
@@@ -33,10 -33,6 +33,10 @@@ all
  # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
  # Enable it on Windows.  By default, symrefs are still used.
  #
 +# Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability
 +# tests.  These tests take up a significant amount of the total test time
 +# but are not needed unless you plan to talk to SVN repos.
 +#
  # Define PPC_SHA1 environment variable when running make to make use of
  # a bundled SHA1 routine optimized for PowerPC.
  #
@@@ -64,7 -60,7 +64,7 @@@
  # Define NO_ACCURATE_DIFF if your diff program at least sometimes misses
  # a missing newline at the end of the file.
  #
 -# Define NO_PYTHON if you want to loose all benefits of the recursive merge.
 +# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
  #
  # Define COLLISION_CHECK below if you believe that SHA1's
  # 1461501637330902918203684832716283019655932542976 hashes do not give you
@@@ -124,7 -120,7 +124,7 @@@ SCRIPT_SH = 
        git-fetch.sh \
        git-ls-remote.sh \
        git-merge-one-file.sh git-parse-remote.sh \
-       git-prune.sh git-pull.sh git-rebase.sh \
+       git-pull.sh git-rebase.sh \
        git-repack.sh git-request-pull.sh git-reset.sh \
        git-resolve.sh git-revert.sh git-sh-setup.sh \
        git-tag.sh git-verify-tag.sh \
@@@ -138,7 -134,7 +138,7 @@@ SCRIPT_PERL = 
        git-shortlog.perl git-rerere.perl \
        git-annotate.perl git-cvsserver.perl \
        git-svnimport.perl git-mv.perl git-cvsexportcommit.perl \
 -      git-send-email.perl
 +      git-send-email.perl git-svn.perl
  
  SCRIPT_PYTHON = \
        git-merge-recursive.py
@@@ -178,7 -174,7 +178,7 @@@ BUILT_INS = git-log$X git-whatchanged$
        git-read-tree$X git-commit-tree$X git-write-tree$X \
        git-apply$X git-show-branch$X git-diff-files$X git-update-index$X \
        git-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X \
-       git-fmt-merge-msg$X
+       git-fmt-merge-msg$X git-prune$X
  
  # what 'all' will build and 'install' will install, in gitexecdir
  ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@@ -222,7 -218,7 +222,7 @@@ LIB_OBJS = 
        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 revision.o pager.o tree-walk.o xdiff-interface.o \
 -      alloc.o $(DIFF_OBJS)
 +      alloc.o merge-file.o $(DIFF_OBJS)
  
  BUILTIN_OBJS = \
        builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
        builtin-apply.o builtin-show-branch.o builtin-diff-files.o \
        builtin-diff-index.o builtin-diff-stages.o builtin-diff-tree.o \
        builtin-cat-file.o builtin-mailsplit.o builtin-stripspace.o \
-       builtin-update-ref.o builtin-fmt-merge-msg.o
+       builtin-update-ref.o builtin-fmt-merge-msg.o builtin-prune.o
  
  GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
  LIBS = $(GITLIBS) -lz
@@@ -473,7 -469,7 +473,7 @@@ ifdef NO_ACCURATE_DIF
        ALL_CFLAGS += -DNO_ACCURATE_DIFF
  endif
  
 -# Shell quote (do not use $(call) to accomodate ancient setups);
 +# Shell quote (do not use $(call) to accommodate ancient setups);
  
  SHA1_HEADER_SQ = $(subst ','\'',$(SHA1_HEADER))
  
@@@ -657,7 -653,6 +657,7 @@@ GIT-CFLAGS: .FORCE-GIT-CFLAG
  # with that.
  
  export NO_PYTHON
 +export NO_SVN_TESTS
  
  test: all
        $(MAKE) -C t/ all
diff --combined git.c
index 49062ca66e4f37d53f16d4bff10dc71b1c97e6db,16e37e5db5f406ced8711b40aa5910f82d51dc95..fee71383c6e6ca0374e8356c8b55570d00f93ea9
--- 1/git.c
--- 2/git.c
+++ b/git.c
@@@ -188,7 -188,8 +188,8 @@@ static void handle_internal_command(in
                { "stripspace", cmd_stripspace },
                { "update-index", cmd_update_index },
                { "update-ref", cmd_update_ref },
-               { "fmt-merge-msg", cmd_fmt_merge_msg }
+               { "fmt-merge-msg", cmd_fmt_merge_msg },
+               { "prune", cmd_prune },
        };
        int i;
  
@@@ -251,11 -252,6 +252,11 @@@ int main(int argc, const char **argv, c
                cmd = *++argv;
                argc--;
  
 +              if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
 +                      setup_pager();
 +                      continue;
 +              }
 +
                if (strncmp(cmd, "--", 2))
                        break;