Merge branch 'js/fmt-patch' into next
authorJunio C Hamano <junkio@cox.net>
Sun, 21 May 2006 09:59:51 +0000 (02:59 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 21 May 2006 09:59:51 +0000 (02:59 -0700)
* js/fmt-patch:
git-format-patch: now built-in.
fmt-patch: Support --attach
diff family: add --check option
Document that "git add" only adds non-ignored files.

1  2 
Makefile
git.c
diff --combined Makefile
index 1d265a4d4f96eb8f0de8d14d8306b9818fd018fd,fbb3dca2f3d4ccd981f1becefcaa7ba478951030..d171829e02cbc22cd4d9299b10f282d71a248a5f
+++ b/Makefile
@@@ -113,14 -113,14 +113,14 @@@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__pow
  ### --- END CONFIGURATION SECTION ---
  
  SCRIPT_SH = \
 -      git-add.sh git-bisect.sh git-branch.sh git-checkout.sh \
 +      git-bisect.sh git-branch.sh git-checkout.sh \
        git-cherry.sh git-clean.sh git-clone.sh git-commit.sh \
        git-fetch.sh \
-       git-format-patch.sh git-ls-remote.sh \
+       git-ls-remote.sh \
        git-merge-one-file.sh git-parse-remote.sh \
        git-prune.sh git-pull.sh git-rebase.sh \
        git-repack.sh git-request-pull.sh git-reset.sh \
 -      git-resolve.sh git-revert.sh git-rm.sh git-sh-setup.sh \
 +      git-resolve.sh git-revert.sh git-sh-setup.sh \
        git-tag.sh git-verify-tag.sh \
        git-applymbox.sh git-applypatch.sh git-am.sh \
        git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \
@@@ -161,7 -161,7 +161,7 @@@ PROGRAMS = 
        git-receive-pack$X git-rev-parse$X \
        git-send-pack$X git-show-branch$X git-shell$X \
        git-show-index$X git-ssh-fetch$X \
 -      git-ssh-upload$X git-tar-tree$X git-unpack-file$X \
 +      git-ssh-upload$X git-unpack-file$X \
        git-unpack-objects$X git-update-index$X git-update-server-info$X \
        git-upload-pack$X git-verify-pack$X git-write-tree$X \
        git-update-ref$X git-symbolic-ref$X \
  
  BUILT_INS = git-log$X git-whatchanged$X git-show$X \
        git-count-objects$X git-diff$X git-push$X \
 -      git-grep$X git-rev-list$X git-check-ref-format$X \
 -      git-init-db$X git-format-patch$X
 +      git-grep$X git-add$X git-rm$X git-rev-list$X \
 +      git-check-ref-format$X \
-       git-init-db$X git-tar-tree$X git-upload-tar$X
++      git-init-db$X git-tar-tree$X git-upload-tar$X git-format-patch$X
  
  # what 'all' will build and 'install' will install, in gitexecdir
  ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@@ -201,7 -200,7 +201,7 @@@ LIB_H = 
        blob.h cache.h commit.h csum-file.h delta.h \
        diff.h object.h pack.h pkt-line.h quote.h refs.h \
        run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h \
 -      tree-walk.h log-tree.h
 +      tree-walk.h log-tree.h dir.h
  
  DIFF_OBJS = \
        diff.o diff-lib.o diffcore-break.o diffcore-order.o \
        diffcore-delta.o log-tree.o
  
  LIB_OBJS = \
 -      blob.o commit.o connect.o csum-file.o base85.o \
 +      blob.o commit.o connect.o csum-file.o cache-tree.o base85.o \
        date.o diff-delta.o entry.o exec_cmd.o ident.o index.o \
        object.o pack-check.o patch-delta.o path.o pkt-line.o \
 -      quote.o read-cache.o refs.o run-command.o \
 +      quote.o read-cache.o refs.o run-command.o dir.o \
        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 \
  
  BUILTIN_OBJS = \
        builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
 -      builtin-grep.o builtin-rev-list.o builtin-check-ref-format.o \
 -      builtin-init-db.o
 +      builtin-grep.o builtin-add.o builtin-rev-list.o builtin-check-ref-format.o \
 +      builtin-rm.o builtin-init-db.o builtin-tar-tree.o builtin-upload-tar.o
  
  GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
  LIBS = $(GITLIBS) -lz
@@@ -610,9 -609,6 +610,9 @@@ test-date$X: test-date.c date.o ctype.
  test-delta$X: test-delta.c diff-delta.o patch-delta.o
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $^
  
 +test-dump-cache-tree$X: dump-cache-tree.o $(GITLIBS)
 +      $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
 +
  check:
        for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done
  
diff --combined git.c
index a5690e3ea89aa714701b70c918dc47844a73178f,ff498e674a7505ecc2f94a4fd813b81983f0bbf7..a4ddac71cabffb45be19b9c7a31fc5cbb3da9683
--- 1/git.c
--- 2/git.c
+++ b/git.c
@@@ -47,16 -47,12 +47,16 @@@ static void handle_internal_command(in
                { "whatchanged", cmd_whatchanged },
                { "show", cmd_show },
                { "push", cmd_push },
-               { "fmt-patch", cmd_format_patch },
+               { "format-patch", cmd_format_patch },
                { "count-objects", cmd_count_objects },
                { "diff", cmd_diff },
                { "grep", cmd_grep },
 +              { "rm", cmd_rm },
 +              { "add", cmd_add },
                { "rev-list", cmd_rev_list },
                { "init-db", cmd_init_db },
 +              { "tar-tree", cmd_tar_tree },
 +              { "upload-tar", cmd_upload_tar },
                { "check-ref-format", cmd_check_ref_format }
        };
        int i;