From 7d3d226e700904d6fbf3d9a1b351ebeb02f2cf04 Mon Sep 17 00:00:00 2001 From: John Cai Date: Wed, 2 Mar 2022 22:27:23 +0000 Subject: reflog: libify delete reflog function and helpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently stash shells out to reflog in order to delete refs. In an effort to reduce how much we shell out to a subprocess, libify the functionality that stash needs into reflog.c. Add a reflog_delete function that is pretty much the logic in the while loop in builtin/reflog.c cmd_reflog_delete(). This is a function that builtin/reflog.c and builtin/stash.c can both call. Also move functions needed by reflog_delete and export them. Helped-by: Ævar Arnfjörð Bjarmason Signed-off-by: John Cai Signed-off-by: Junio C Hamano --- object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'object.h') diff --git a/object.h b/object.h index cb556ab775..a2219464c2 100644 --- a/object.h +++ b/object.h @@ -75,7 +75,7 @@ struct object_array { * builtin/fsck.c: 0--3 * builtin/gc.c: 0 * builtin/index-pack.c: 2021 - * builtin/reflog.c: 10--12 + * reflog.c: 10--12 * builtin/show-branch.c: 0-------------------------------------------26 * builtin/unpack-objects.c: 2021 */ -- cgit v1.2.3