[PATCH v6 02/25] refs/files-backend.c: new file, renamed from refs.c
From: Michael Haggerty <hidden>
Date: 2016-06-15 23:07:09
Subsystem:
kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers:
Nathan Chancellor, Nicolas Schier, Linus Torvalds
From: Ronnie Sahlberg <redacted> We are about to split up the reference code into multiple source files, to separate the generic code from the code that is specific to the current files-based backend. To keep things organized, we will move the reference-related code to a subdirectory, "refs/". Over time, more files will appear in this subdirectory. As the first step, rename refs.c to refs/files-backend.c. This file will eventually contain only the code specific to the files-based backend. In subsequent commits we will move backend-agnostic code to a new refs/refs.c file that will hold the common refs code that is shared across backends. The reason for first moving all the code to refs/files-backend.c and then moving the backend agnostic code back to refs/refs.c instead of moving refs.c to refs/refs.c first is because the code that will eventually remain in this new files-backend.c file is so entangled that it would then be very difficult to break the split up into small independent patches/chunks. Signed-off-by: Ronnie Sahlberg <redacted> Signed-off-by: Junio C Hamano <redacted> Signed-off-by: Michael Haggerty <redacted> --- Makefile | 4 ++-- refs.c => refs/files-backend.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) rename refs.c => refs/files-backend.c (99%)
diff --git a/Makefile b/Makefile
index 0d9f5dd..1a63383 100644
--- a/Makefile
+++ b/Makefile@@ -762,8 +762,8 @@ LIB_OBJS += quote.o LIB_OBJS += reachable.o LIB_OBJS += read-cache.o LIB_OBJS += reflog-walk.o -LIB_OBJS += refs.o LIB_OBJS += ref-filter.o +LIB_OBJS += refs/files-backend.o LIB_OBJS += remote.o LIB_OBJS += replace_object.o LIB_OBJS += rerere.o
@@ -2412,7 +2412,7 @@ profile-clean: $(RM) $(addsuffix *.gcno,$(addprefix $(PROFILE_DIR)/, $(object_dirs))) clean: profile-clean coverage-clean - $(RM) *.o *.res block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o + $(RM) *.o *.res refs/*.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o $(RM) xdiff/*.o vcs-svn/*.o ewah/*.o builtin/*.o $(RM) $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB) $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
diff --git a/refs.c b/refs/files-backend.c
similarity index 99%
rename from refs.c
rename to refs/files-backend.c
index 132eff5..dc39b36 100644
--- a/refs.c
+++ b/refs/files-backend.c@@ -1,10 +1,10 @@ -#include "cache.h" -#include "lockfile.h" -#include "refs.h" -#include "object.h" -#include "tag.h" -#include "dir.h" -#include "string-list.h" +#include "../cache.h" +#include "../refs.h" +#include "../lockfile.h" +#include "../object.h" +#include "../tag.h" +#include "../dir.h" +#include "../string-list.h" struct ref_lock { char *ref_name;
--
2.6.2