diff options
author | Matheus Tavares <matheus.bernardino@usp.br> | 2021-03-23 11:19:32 -0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-23 10:34:05 -0700 |
commit | d052cc038270d1231a245d7ac6d60559123464d3 (patch) | |
tree | 958f3519bf0a0c57ae7cabcf4601f7aba19725d6 /entry.c | |
parent | convert: add classification for conv_attrs struct (diff) | |
download | tgif-d052cc038270d1231a245d7ac6d60559123464d3.tar.xz |
entry: extract a header file for entry.c functions
The declarations of entry.c's public functions and structures currently
reside in cache.h. Although not many, they contribute to the size of
cache.h and, when changed, cause the unnecessary recompilation of
modules that don't really use these functions. So let's move them to a
new entry.h header. While at it let's also move a comment related to
checkout_entry() from entry.c to entry.h as it's more useful to describe
the function there.
Original-patch-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'entry.c')
-rw-r--r-- | entry.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -6,6 +6,7 @@ #include "submodule.h" #include "progress.h" #include "fsmonitor.h" +#include "entry.h" static void create_directories(const char *path, int path_len, const struct checkout *state) @@ -429,14 +430,6 @@ static void mark_colliding_entries(const struct checkout *state, } } -/* - * Write the contents from ce out to the working tree. - * - * When topath[] is not NULL, instead of writing to the working tree - * file named by ce, a temporary file is created by this function and - * its name is returned in topath[], which must be able to hold at - * least TEMPORARY_FILENAME_LENGTH bytes long. - */ int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath, int *nr_checkouts) { |