]> asedeno.scripts.mit.edu Git - git.git/blobdiff - hash-object.c
Merge branch 'maint'
[git.git] / hash-object.c
index 1e6f6bf7061d57bcfa194b3b7b3e45f6a3f7b54c..0a58f3f1267dcb4dbd67c89fc165367c6840f1da 100644 (file)
@@ -15,7 +15,7 @@ static void hash_object(const char *path, enum object_type type, int write_objec
        fd = open(path, O_RDONLY);
        if (fd < 0 ||
            fstat(fd, &st) < 0 ||
-           index_fd(sha1, fd, &st, write_object, type))
+           index_fd(sha1, fd, &st, write_object, type, path))
                die(write_object
                    ? "Unable to add %s to database"
                    : "Unable to hash %s", path);
@@ -42,6 +42,8 @@ int main(int argc, char **argv)
        int prefix_length = -1;
        int no_more_flags = 0;
 
+       git_config(git_default_config);
+
        for (i = 1 ; i < argc; i++) {
                if (!no_more_flags && argv[i][0] == '-') {
                        if (!strcmp(argv[i], "-t")) {