aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/sparse-checkout.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/sparse-checkout.c')
-rw-r--r--builtin/sparse-checkout.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
index 8d5ae6f2a6..090bf33510 100644
--- a/builtin/sparse-checkout.c
+++ b/builtin/sparse-checkout.c
@@ -2,6 +2,8 @@
#include "cache.h"
#include "config.h"
#include "dir.h"
+#include "environment.h"
+#include "gettext.h"
#include "parse-options.h"
#include "pathspec.h"
#include "repository.h"
@@ -14,6 +16,7 @@
#include "unpack-trees.h"
#include "wt-status.h"
#include "quote.h"
+#include "setup.h"
#include "sparse-index.h"
#include "worktree.h"
@@ -469,7 +472,7 @@ static int sparse_checkout_init(int argc, const char **argv, const char *prefix)
return update_working_directory(NULL);
}
- if (get_oid("HEAD", &oid)) {
+ if (repo_get_oid(the_repository, "HEAD", &oid)) {
FILE *fp;
/* assume we are in a fresh repo, but update the sparse-checkout file */