Commit a0bf6e7678e8d1b26d81d20cd746b85bf9bb9676

Stefan Sperling 2019-03-15T16:35:47

rename 'intent-to-add' file index flag to 'not-on-disk'

diff --git a/lib/fileindex.c b/lib/fileindex.c
index 25d5b3b..58b78e5 100644
--- a/lib/fileindex.c
+++ b/lib/fileindex.c
@@ -122,7 +122,7 @@ got_fileindex_entry_add(struct got_fileindex *fileindex,
     struct got_fileindex_entry *entry)
 {
 	/* Flag this entry until it gets written out to disk. */
-	entry->flags |= GOT_FILEIDX_F_INTENT_TO_ADD;
+	entry->flags |= GOT_FILEIDX_F_NOT_ON_DISK;
 
 	return add_entry(fileindex, entry);
 }
@@ -328,7 +328,7 @@ got_fileindex_write(struct got_fileindex *fileindex, FILE *outfile)
 		return got_ferror(outfile, GOT_ERR_IO);
 
 	RB_FOREACH(entry, got_fileindex_tree, &fileindex->entries) {
-		entry->flags &= ~GOT_FILEIDX_F_INTENT_TO_ADD;
+		entry->flags &= ~GOT_FILEIDX_F_NOT_ON_DISK;
 		err = write_fileindex_entry(&ctx, entry, outfile);
 		if (err)
 			return err;
@@ -561,7 +561,7 @@ walk_fileindex(struct got_fileindex *fileindex, struct got_fileindex_entry *ie)
 	next = RB_NEXT(got_fileindex_tree, &fileindex->entries, ie);
 
 	/* Skip entries which were newly added by diff callbacks. */
-	while (next && (next->flags & GOT_FILEIDX_F_INTENT_TO_ADD))
+	while (next && (next->flags & GOT_FILEIDX_F_NOT_ON_DISK))
 		next = RB_NEXT(got_fileindex_tree, &fileindex->entries, next);
 
 	return next;
diff --git a/lib/got_lib_fileindex.h b/lib/got_lib_fileindex.h
index aa91c66..3131286 100644
--- a/lib/got_lib_fileindex.h
+++ b/lib/got_lib_fileindex.h
@@ -53,7 +53,7 @@ struct got_fileindex_entry {
 #define GOT_FILEIDX_F_STAGE		0x00003000
 #define GOT_FILEIDX_F_EXTENDED		0x00004000
 #define GOT_FILEIDX_F_ASSUME_VALID	0x00008000
-#define GOT_FILEIDX_F_INTENT_TO_ADD	0x20000000
+#define GOT_FILEIDX_F_NOT_ON_DISK	0x20000000
 
 	/*
 	 * UNIX-style path, relative to work tree root.