commit a0bf6e7678e8d1b26d81d20cd746b85bf9bb9676 from: Stefan Sperling date: Fri Mar 15 15:35:47 2019 UTC rename 'intent-to-add' file index flag to 'not-on-disk' commit - 598a8b9185ce08f22aa1d6e100dc6614f5ef2ba6 commit + a0bf6e7678e8d1b26d81d20cd746b85bf9bb9676 blob - 25d5b3b4111387762e2eadfea8235930b44f0bdc blob + 58b78e5b17bd3786d0a0e8189b389f2116f67aad --- lib/fileindex.c +++ lib/fileindex.c @@ -122,7 +122,7 @@ got_fileindex_entry_add(struct got_fileindex *fileinde 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, F 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 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; blob - aa91c6643eb06a9a52b12801b94593ca38102c5b blob + 31312868a6f9071306b347c0ebf4421f16ece641 --- lib/got_lib_fileindex.h +++ 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.