diff options
Diffstat (limited to 'revision.c')
| -rw-r--r-- | revision.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/revision.c b/revision.c index c4390f0938..afee111196 100644 --- a/revision.c +++ b/revision.c @@ -8,7 +8,7 @@ #include "hex.h" #include "object-name.h" #include "object-file.h" -#include "object-store-ll.h" +#include "object-store.h" #include "oidset.h" #include "tag.h" #include "blob.h" @@ -59,14 +59,6 @@ implement_shared_commit_slab(revision_sources, char *); static inline int want_ancestry(const struct rev_info *revs); -void show_object_with_name(FILE *out, struct object *obj, const char *name) -{ - fprintf(out, "%s ", oid_to_hex(&obj->oid)); - for (const char *p = name; *p && *p != '\n'; p++) - fputc(*p, out); - fputc('\n', out); -} - static void mark_blob_uninteresting(struct blob *blob) { if (!blob) @@ -2068,6 +2060,7 @@ static void prepare_show_merge(struct rev_info *revs) parse_pathspec(&revs->prune_data, PATHSPEC_ALL_MAGIC & ~PATHSPEC_LITERAL, PATHSPEC_PREFER_FULL | PATHSPEC_LITERAL_PATH, "", prune); revs->limited = 1; + free(prune); } static int dotdot_missing(const char *arg, char *dotdot, @@ -2488,10 +2481,12 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg die(_("options '%s' and '%s' cannot be used together"), "--left-only", "--right-only/--cherry"); revs->left_only = 1; + revs->limited = 1; } else if (!strcmp(arg, "--right-only")) { if (revs->left_only) die(_("options '%s' and '%s' cannot be used together"), "--right-only", "--left-only"); revs->right_only = 1; + revs->limited = 1; } else if (!strcmp(arg, "--cherry")) { if (revs->left_only) die(_("options '%s' and '%s' cannot be used together"), "--cherry", "--left-only"); @@ -3612,7 +3607,8 @@ static void set_children(struct rev_info *revs) void reset_revision_walk(void) { - clear_object_flags(SEEN | ADDED | SHOWN | TOPO_WALK_EXPLORED | TOPO_WALK_INDEGREE); + clear_object_flags(the_repository, + SEEN | ADDED | SHOWN | TOPO_WALK_EXPLORED | TOPO_WALK_INDEGREE); } static int mark_uninteresting(const struct object_id *oid, |
