Merge branch 'jc/diff' into next
authorJunio C Hamano <junkio@cox.net>
Tue, 11 Apr 2006 21:34:53 +0000 (14:34 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 11 Apr 2006 21:34:53 +0000 (14:34 -0700)
* jc/diff:
  blame and friends: adjust to multiple pathspec change.
  git log --full-diff
  tree-diff: do not assume we use only one pathspec

1  2 
diff.h
http-push.c

diff --combined diff.h
--- 1/diff.h
--- 2/diff.h
+++ b/diff.h
@@@ -24,7 -24,6 +24,7 @@@ struct diff_options 
        const char *orderfile;
        const char *pickaxe;
        unsigned recursive:1,
 +               with_raw:1,
                 tree_in_recursive:1,
                 full_index:1;
        int break_opt;
        int setup;
        int abbrev;
  
+       int nr_paths;
+       const char **paths;
+       int *pathlens;
        change_fn_t change;
        add_remove_fn_t add_remove;
  };
  
- extern void diff_tree_setup_paths(const char **paths);
+ extern void diff_tree_setup_paths(const char **paths, struct diff_options *);
+ extern void diff_tree_release_paths(struct diff_options *);
  extern int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
                     const char *base, struct diff_options *opt);
  extern int diff_tree_sha1(const unsigned char *old, const unsigned char *new,
@@@ -113,8 -116,6 +117,8 @@@ extern void diffcore_std_no_resolve(str
  "  -z            output diff-raw with lines terminated with NUL.\n" \
  "  -p            output patch format.\n" \
  "  -u            synonym for -p.\n" \
 +"  --patch-with-raw\n" \
 +"                output both a patch and the diff-raw format.\n" \
  "  --name-only   show only names of changed files.\n" \
  "  --name-status show names and status of changed files.\n" \
  "  --full-index  show full object name on index lines.\n" \
diff --combined http-push.c
@@@ -6,6 -6,7 +6,7 @@@
  #include "blob.h"
  #include "http.h"
  #include "refs.h"
+ #include "diff.h"
  #include "revision.h"
  #include "exec_cmd.h"
  
@@@ -1211,7 -1212,7 +1212,7 @@@ static voi
  xml_start_tag(void *userData, const char *name, const char **atts)
  {
        struct xml_ctx *ctx = (struct xml_ctx *)userData;
 -      const char *c = index(name, ':');
 +      const char *c = strchr(name, ':');
        int new_len;
  
        if (c == NULL)
@@@ -1240,7 -1241,7 +1241,7 @@@ static voi
  xml_end_tag(void *userData, const char *name)
  {
        struct xml_ctx *ctx = (struct xml_ctx *)userData;
 -      const char *c = index(name, ':');
 +      const char *c = strchr(name, ':');
        char *ep;
  
        ctx->userFunc(ctx, 1);
@@@ -2350,7 -2351,7 +2351,7 @@@ int main(int argc, char **argv
                        char *path = strstr(arg, "//");
                        remote->url = arg;
                        if (path) {
 -                              path = index(path+2, '/');
 +                              path = strchr(path+2, '/');
                                if (path)
                                        remote->path_len = strlen(path);
                        }