summaryrefslogtreecommitdiff
path: root/builtin/hash-object.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/hash-object.c')
-rw-r--r--builtin/hash-object.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index 6a99ec250d..5d900a6b8c 100644
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
@@ -8,10 +8,11 @@
#include "builtin.h"
#include "abspath.h"
#include "config.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "object-file.h"
-#include "object-store.h"
+#include "odb.h"
#include "blob.h"
#include "quote.h"
#include "parse-options.h"
@@ -104,14 +105,14 @@ int cmd_hash_object(int argc,
prefix = setup_git_directory_gently(&nongit);
if (nongit && !the_hash_algo)
- repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
+ repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
if (vpath && prefix) {
vpath_free = prefix_filename(prefix, vpath);
vpath = vpath_free;
}
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
if (stdin_paths) {
if (hashstdin)