rename 'intent-to-add' file index flag to 'not-on-disk'
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
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.