X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=revision.c;h=1f4590b89649a9d1397af2f35af142cc6ab36847;hb=952c8c56380734d45bddf369fe478895672c5a3a;hp=0a29b53673e0e44547dfe91aaede5f312530a0ec;hpb=98ee8187e4e331716be0797169ba9ddbb26efe56;p=git.git diff --git a/revision.c b/revision.c index 0a29b5367..1f4590b89 100644 --- a/revision.c +++ b/revision.c @@ -114,12 +114,7 @@ void mark_parents_uninteresting(struct commit *commit) } } -void add_pending_object(struct rev_info *revs, struct object *obj, const char *name) -{ - add_pending_object_with_mode(revs, obj, name, S_IFINVALID); -} - -void add_pending_object_with_mode(struct rev_info *revs, struct object *obj, const char *name, unsigned mode) +static void add_pending_object_with_mode(struct rev_info *revs, struct object *obj, const char *name, unsigned mode) { if (revs->no_walk && (obj->flags & UNINTERESTING)) die("object ranges do not make sense when not walking revisions"); @@ -129,6 +124,11 @@ void add_pending_object_with_mode(struct rev_info *revs, struct object *obj, con (struct commit *)obj, name); } +void add_pending_object(struct rev_info *revs, struct object *obj, const char *name) +{ + add_pending_object_with_mode(revs, obj, name, S_IFINVALID); +} + static struct object *get_reference(struct rev_info *revs, const char *name, const unsigned char *sha1, unsigned int flags) { struct object *object; @@ -262,7 +262,7 @@ static void file_change(struct diff_options *options, options->has_changes = 1; } -int rev_compare_tree(struct rev_info *revs, struct tree *t1, struct tree *t2) +static int rev_compare_tree(struct rev_info *revs, struct tree *t1, struct tree *t2) { if (!t1) return REV_TREE_NEW; @@ -276,7 +276,7 @@ int rev_compare_tree(struct rev_info *revs, struct tree *t1, struct tree *t2) return tree_difference; } -int rev_same_tree_as_empty(struct rev_info *revs, struct tree *t1) +static int rev_same_tree_as_empty(struct rev_info *revs, struct tree *t1) { int retval; void *tree; @@ -1180,7 +1180,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i); if (opts > 0) { - revs->diff = 1; + if (strcmp(argv[i], "-z")) + revs->diff = 1; i += opts - 1; continue; }