Commit Diff


commit - a1f06df2e1e5a293a55ebaf1b6707de629843295
commit + baf338b8486ea41a65c0a04ae966baf3d6bb5ff0
blob - b507b207a3c163a0492722f3e42ea689dacbf7e6
blob + 19ccafb66697e5da1851da0e5a3c5f72295068bc
--- include/got_repository.h
+++ include/got_repository.h
@@ -35,6 +35,9 @@ const char *got_repo_get_path_git_dir(struct got_repos
 /* Obtain the file descriptor of the repository's .git directory. */
 int got_repo_get_fd(struct got_repository *);
 
+/* Obtain the object format */
+enum got_hash_algorithm got_repo_get_hash_algorithm(struct got_repository *);
+
 /* Obtain the commit author name if parsed from gitconfig, else NULL. */
 const char *got_repo_get_gitconfig_author_name(struct got_repository *);
 
blob - 0bd411b20d1f896f8ebc8062476aa5c3c3593dcc
blob + a8c4aac0b9ae220bc77e40c1222dbee1ca8c14ed
--- lib/repository.c
+++ lib/repository.c
@@ -91,6 +91,12 @@ int
 got_repo_get_fd(struct got_repository *repo)
 {
 	return repo->gitdir_fd;
+}
+
+enum got_hash_algorithm
+got_repo_get_hash_algorithm(struct got_repository *repo)
+{
+	return repo->algo;
 }
 
 const char *