Skip to content

Commit 1eb729b

Browse files
committed
Reapply "build: Don't check parent directories for git tag"
This reverts commit 7e0c25e. The `--git-dir` argument is relative to the `-C` argument, making this patch OK after all. I added a comment to go along with this since I found it confusing. Apologies for the revert.
1 parent 0bce4a4 commit 1eb729b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

build.zig

+4-7
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,10 @@ pub fn build(b: *std.Build) !void {
257257
var code: u8 = undefined;
258258
const git_describe_untrimmed = b.runAllowFail(&[_][]const u8{
259259
"git",
260-
"-C",
261-
b.build_root.path orelse ".",
262-
"describe",
263-
"--match",
264-
"*.*.*",
265-
"--tags",
266-
"--abbrev=9",
260+
"-C", b.build_root.path orelse ".", // affects the --git-dir argument
261+
"--git-dir", ".git", // affected by the -C argument
262+
"describe", "--match", "*.*.*", //
263+
"--tags", "--abbrev=9",
267264
}, &code, .Ignore) catch {
268265
break :v version_string;
269266
};

0 commit comments

Comments
 (0)