Skip to content

Commit 1b5c8aa

Browse files
committed
libutil: Use correct argument to Error format ctor
It seems that the intention was to format a number in base 8 (as suggested by the %o format specifier), but `perms` is a `std::string` and not a number. Looks like `rawMode` is the correct thing to use here.
1 parent b287f33 commit 1b5c8aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libutil/git.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void parseTree(
134134
RawMode rawMode = std::stoi(perms, 0, 8);
135135
auto modeOpt = decodeMode(rawMode);
136136
if (!modeOpt)
137-
throw Error("Unknown Git permission: %o", perms);
137+
throw Error("Unknown Git permission: %o", rawMode);
138138
auto mode = std::move(*modeOpt);
139139

140140
std::string name = getStringUntil(source, '\0');

0 commit comments

Comments
 (0)