summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorMatheus Tavares <matheus.bernardino@usp.br>2021-03-23 14:19:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-23 17:34:05 (GMT)
commitd052cc038270d1231a245d7ac6d60559123464d3 (patch)
tree958f3519bf0a0c57ae7cabcf4601f7aba19725d6 /builtin
parentf59d15bb420b649a6ee3163a3418aac6b813d331 (diff)
downloadgit-d052cc038270d1231a245d7ac6d60559123464d3.zip
git-d052cc038270d1231a245d7ac6d60559123464d3.tar.gz
git-d052cc038270d1231a245d7ac6d60559123464d3.tar.bz2
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 'builtin')
-rw-r--r--builtin/checkout-index.c1
-rw-r--r--builtin/checkout.c1
-rw-r--r--builtin/difftool.c1
-rw-r--r--builtin/stash.c1
4 files changed, 4 insertions, 0 deletions
diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c
index 023e49e..c0bf4ac 100644
--- a/builtin/checkout-index.c
+++ b/builtin/checkout-index.c
@@ -11,6 +11,7 @@
#include "quote.h"
#include "cache-tree.h"
#include "parse-options.h"
+#include "entry.h"
#define CHECKOUT_ALL 4
static int nul_term_line;
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 2d6550b..06c90d7 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -26,6 +26,7 @@
#include "unpack-trees.h"
#include "wt-status.h"
#include "xdiff-interface.h"
+#include "entry.h"
static const char * const checkout_usage[] = {
N_("git checkout [<options>] <branch>"),
diff --git a/builtin/difftool.c b/builtin/difftool.c
index 6e18e62..ef25729 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -23,6 +23,7 @@
#include "lockfile.h"
#include "object-store.h"
#include "dir.h"
+#include "entry.h"
static int trust_exit_code;
diff --git a/builtin/stash.c b/builtin/stash.c
index ba774cc..11f3ae3 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -15,6 +15,7 @@
#include "log-tree.h"
#include "diffcore.h"
#include "exec-cmd.h"
+#include "entry.h"
#define INCLUDE_ALL_FILES 2