fix typo in status code name: GOT_STATUS_MODIFIY -> GOT_STATUS_MODIFY
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
diff --git a/got/got.c b/got/got.c
index a9bc81f..f2810cc 100644
--- a/got/got.c
+++ b/got/got.c
@@ -963,7 +963,7 @@ print_diff(void *arg, unsigned char status, const char *path,
char *abspath = NULL;
struct stat sb;
- if (status != GOT_STATUS_MODIFIY)
+ if (status != GOT_STATUS_MODIFY)
return NULL;
err = got_object_open_as_blob(&blob1, a->repo, id, 8192);
diff --git a/include/got_worktree.h b/include/got_worktree.h
index b8c74fd..c28e218 100644
--- a/include/got_worktree.h
+++ b/include/got_worktree.h
@@ -22,7 +22,7 @@ struct got_worktree;
#define GOT_STATUS_EXISTS 'E'
#define GOT_STATUS_UPDATE 'U'
#define GOT_STATUS_DELETE 'D'
-#define GOT_STATUS_MODIFIY 'M'
+#define GOT_STATUS_MODIFY 'M'
#define GOT_STATUS_CONFLICT 'C'
#define GOT_STATUS_MERGE 'G'
#define GOT_STATUS_MISSING '!'
diff --git a/lib/worktree.c b/lib/worktree.c
index 9a944a8..e5d3988 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -839,20 +839,20 @@ get_file_status(unsigned char *status, struct got_fileindex_entry *ie,
flen = fread(fbuf, 1, sizeof(fbuf), f);
if (blen == 0) {
if (flen != 0)
- *status = GOT_STATUS_MODIFIY;
+ *status = GOT_STATUS_MODIFY;
break;
} else if (flen == 0) {
if (blen != 0)
- *status = GOT_STATUS_MODIFIY;
+ *status = GOT_STATUS_MODIFY;
break;
} else if (blen - hdrlen == flen) {
/* Skip blob object header first time around. */
if (memcmp(bbuf + hdrlen, fbuf, flen) != 0) {
- *status = GOT_STATUS_MODIFIY;
+ *status = GOT_STATUS_MODIFY;
break;
}
} else {
- *status = GOT_STATUS_MODIFIY;
+ *status = GOT_STATUS_MODIFY;
break;
}
hdrlen = 0;
@@ -905,7 +905,7 @@ update_blob(struct got_worktree *worktree,
if (err)
goto done;
- if (status == GOT_STATUS_MODIFIY)
+ if (status == GOT_STATUS_MODIFY)
err = merge_blob(worktree, fileindex, ie, ondisk_path, path,
blob, repo, progress_cb, progress_arg);
else