Thread (2 messages) flat view 2 messages, 2 authors, 2026-02-13

Re: [PATCH 2/4] builtin/history: check for merges before asking for user input

From: Patrick Steinhardt <hidden>
Date: 2026-02-13 05:51:25

On Thu, Feb 12, 2026 at 02:26:46PM -0800, Junio C Hamano wrote:
"D. Ben Knoble" [off-list ref] writes:
quoted
On Thu, Feb 12, 2026 at 7:45 AM Patrick Steinhardt [off-list ref] wrote:
quoted
diff --git a/builtin/history.c b/builtin/history.c
index 1de51372ea..ca0cdb6a58 100644
--- a/builtin/history.c
+++ b/builtin/history.c
@@ -177,6 +177,42 @@ static int parse_ref_action(const struct option *opt, const char *value, int uns
        return 0;
 }

+static int revwalk_contains_merges(struct repository *repo,
+                                  const struct strvec *revwalk_args)
+{
+       struct strvec args = STRVEC_INIT;
+       struct rev_info revs;
+       int ret;
+
+       for (size_t i = 0; i < revwalk_args->nr; i++)
+               strvec_push(&args, revwalk_args->v[i]);
I'm surprised we don't have anything like Rust's Vec::append or
Vec::extend_from_slice
strvec_pushv() is what you are looking for.
Ah, indeed, will use.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help