repository: Indentation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
diff --git a/src/repository.c b/src/repository.c
index ba29203..a4eb718 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -1076,51 +1076,50 @@ int git_repository_head_tree(git_tree **tree, git_repository *repo)
int git_repository_message(char *buffer, size_t len, git_repository *repo)
{
- git_buf buf = GIT_BUF_INIT, path = GIT_BUF_INIT;
- struct stat st;
- ssize_t size;
- int error;
+ git_buf buf = GIT_BUF_INIT, path = GIT_BUF_INIT;
+ struct stat st;
+ ssize_t size;
+ int error;
- if (git_buf_joinpath(&path, repo->path_repository, MERGE_MSG_FILE) < 0)
- return -1;
+ if (git_buf_joinpath(&path, repo->path_repository, MERGE_MSG_FILE) < 0)
+ return -1;
- error = p_stat(git_buf_cstr(&path), &st);
- if (error < 0) {
+ error = p_stat(git_buf_cstr(&path), &st);
+ if (error < 0) {
if (errno == ENOENT)
error = GIT_ENOTFOUND;
- git_buf_free(&path);
- return error;
- }
+ git_buf_free(&path);
+ return error;
+ }
- if (buffer == NULL) {
- git_buf_free(&path);
- return st.st_size;
- }
+ if (buffer == NULL) {
+ git_buf_free(&path);
+ return st.st_size;
+ }
- if (git_futils_readbuffer(&buf, git_buf_cstr(&path)) < 0)
- goto on_error;
+ if (git_futils_readbuffer(&buf, git_buf_cstr(&path)) < 0)
+ goto on_error;
- memcpy(buffer, git_buf_cstr(&buf), len);
- size = git_buf_len(&buf);
+ memcpy(buffer, git_buf_cstr(&buf), len);
+ size = git_buf_len(&buf);
- git_buf_free(&path);
- git_buf_free(&buf);
- return size;
+ git_buf_free(&path);
+ git_buf_free(&buf);
+ return size;
on_error:
- git_buf_free(&path);
- return -1;
-
+ git_buf_free(&path);
+ return -1;
}
int git_repository_message_remove(git_repository *repo)
{
- git_buf path = GIT_BUF_INIT;
- int error;
+ git_buf path = GIT_BUF_INIT;
+ int error;
- if (git_buf_joinpath(&path, repo->path_repository, MERGE_MSG_FILE) < 0)
- return -1;
+ if (git_buf_joinpath(&path, repo->path_repository, MERGE_MSG_FILE) < 0)
+ return -1;
error = p_unlink(git_buf_cstr(&path));
git_buf_free(&path);