Skip to content

Commit 7d3d226

Browse files
john-caigitster
authored andcommitted
reflog: libify delete reflog function and helpers
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 <[email protected]> Signed-off-by: John Cai <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 76bccbc commit 7d3d226

File tree

5 files changed

+481
-452
lines changed

5 files changed

+481
-452
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,7 @@ LIB_OBJS += rebase-interactive.o
989989
LIB_OBJS += rebase.o
990990
LIB_OBJS += ref-filter.o
991991
LIB_OBJS += reflog-walk.o
992+
LIB_OBJS += reflog.o
992993
LIB_OBJS += refs.o
993994
LIB_OBJS += refs/debug.o
994995
LIB_OBJS += refs/files-backend.o

0 commit comments

Comments
 (0)