Commit Diff


commit - a0eb853d32cc94d03606c9a395ba1d462ef02585
commit + eecfbcd1f57266e4d9f0d6a45e2cd968aa527630
blob - 72da6f6f2dfc5a00ea5f8f8dab286e38bee5c81c
blob + aa7c545c7fa2e55ec8ce54f936a4e7138510a161
--- include/got_worktree.h
+++ include/got_worktree.h
@@ -16,6 +16,10 @@
 
 struct got_worktree;
 
+/* status codes */
+#define GOT_STATUS_ADD		'A'
+#define GOT_STATUS_EXISTS	'E'
+
 /*
  * Attempt to initialize a new work tree on disk.
  * The first argument is the path to a directory where the work tree
blob - 4579ebe2bced0be65b47adb6f0011bf7a564283f
blob + dd167105ba3b5b1500f5da9dd81752f9c0fea4de
--- lib/worktree.c
+++ lib/worktree.c
@@ -430,7 +430,7 @@ add_file_on_disk(struct got_worktree *worktree, struct
 				err = got_error(GOT_ERR_FILE_OBSTRUCTED);
 			} else {
 				/* TODO: Merge the file! */
-				(*progress_cb)(progress_arg, 'E',
+				(*progress_cb)(progress_arg, GOT_STATUS_EXISTS,
 				    progress_path);
 				return NULL;
 			}
@@ -438,7 +438,7 @@ add_file_on_disk(struct got_worktree *worktree, struct
 		return err;
 	}
 
-	(*progress_cb)(progress_arg, 'A', progress_path);
+	(*progress_cb)(progress_arg, GOT_STATUS_ADD, progress_path);
 
 	hdrlen = got_object_blob_get_hdrlen(blob);
 	do {