Skip to content

Commit ff2e9d8

Browse files
pks-tgitster
authored andcommitted
odb: rename odb_write_object() flags
Rename `odb_write_object()` flags to be properly prefixed with the function name. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 75c7026 commit ff2e9d8

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

cache-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ static int update_one(struct cache_tree *it,
456456
hash_object_file(the_hash_algo, buffer.buf, buffer.len,
457457
OBJ_TREE, &it->oid);
458458
} else if (odb_write_object_ext(the_repository->objects, buffer.buf, buffer.len, OBJ_TREE,
459-
&it->oid, NULL, flags & WRITE_TREE_SILENT ? WRITE_OBJECT_SILENT : 0)) {
459+
&it->oid, NULL, flags & WRITE_TREE_SILENT ? ODB_WRITE_OBJECT_SILENT : 0)) {
460460
strbuf_release(&buffer);
461461
return -1;
462462
}

object-file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ static int start_loose_object_common(struct odb_source *source,
909909

910910
fd = create_tmpfile(source->odb->repo, tmp_file, filename);
911911
if (fd < 0) {
912-
if (flags & WRITE_OBJECT_SILENT)
912+
if (flags & ODB_WRITE_OBJECT_SILENT)
913913
return -1;
914914
else if (errno == EACCES)
915915
return error(_("insufficient permission for adding "
@@ -1042,7 +1042,7 @@ static int write_loose_object(struct odb_source *source,
10421042
utb.actime = mtime;
10431043
utb.modtime = mtime;
10441044
if (utime(tmp_file.buf, &utb) < 0 &&
1045-
!(flags & WRITE_OBJECT_SILENT))
1045+
!(flags & ODB_WRITE_OBJECT_SILENT))
10461046
warning_errno(_("failed utime() on %s"), tmp_file.buf);
10471047
}
10481048

odb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,12 +568,12 @@ enum {
568568
* changes that so that the object will be written as a loose object
569569
* and persisted.
570570
*/
571-
WRITE_OBJECT_PERSIST = (1 << 0),
571+
ODB_WRITE_OBJECT_PERSIST = (1 << 0),
572572

573573
/*
574574
* Do not print an error in case something goes wrong.
575575
*/
576-
WRITE_OBJECT_SILENT = (1 << 1),
576+
ODB_WRITE_OBJECT_SILENT = (1 << 1),
577577
};
578578

579579
/*

0 commit comments

Comments
 (0)