diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-09-03 23:49:27 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-03 23:49:27 +0300 |
commit | a5619d4f8d91a179d0e21aa16fda52fb4f0f7eaf (patch) | |
tree | 1c49fce2c9c7752763bbb5693be246b128ae5626 /builtin | |
parent | 6c40894d2466d4e7fddc047a05116aa9d14712ee (diff) | |
parent | f559d6d45e7e58ae1f922213948723de77ea77bd (diff) |
Merge branch 'ps/connectivity-optim'
The revision traversal API has been optimized by taking advantage
of the commit-graph, when available, to determine if a commit is
reachable from any of the existing refs.
* ps/connectivity-optim:
revision: avoid hitting packfiles when commits are in commit-graph
commit-graph: split out function to search commit position
revision: stop retrieving reference twice
connected: do not sort input revisions
revision: separate walk and unsorted flags
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/log.c | 2 | ||||
-rw-r--r-- | builtin/revert.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/builtin/log.c b/builtin/log.c index 3d7717ba5c..f75d87e8d7 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -637,7 +637,7 @@ int cmd_show(int argc, const char **argv, const char *prefix) repo_init_revisions(the_repository, &rev, prefix); rev.diff = 1; rev.always_show_header = 1; - rev.no_walk = REVISION_WALK_NO_WALK_SORTED; + rev.no_walk = 1; rev.diffopt.stat_width = -1; /* Scale to real terminal size */ memset(&opt, 0, sizeof(opt)); diff --git a/builtin/revert.c b/builtin/revert.c index 237f2f18d4..2e13660e4b 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -191,7 +191,8 @@ static int run_sequencer(int argc, const char **argv, struct replay_opts *opts) struct setup_revision_opt s_r_opt; opts->revs = xmalloc(sizeof(*opts->revs)); repo_init_revisions(the_repository, opts->revs, NULL); - opts->revs->no_walk = REVISION_WALK_NO_WALK_UNSORTED; + opts->revs->no_walk = 1; + opts->revs->unsorted_input = 1; if (argc < 2) usage_with_options(usage_str, options); if (!strcmp(argv[1], "-")) |