| ... | @@ -610,6 +610,7 @@ pub fn getTags(alloc: std.mem.Allocator, dir: std.fs.Dir) ![]const Ref { | ... | @@ -610,6 +610,7 @@ pub fn getTags(alloc: std.mem.Allocator, dir: std.fs.Dir) ![]const Ref { |
| 610 | .argv = &.{ "git", "show-ref", "--tags", "--dereference" }, | 610 | .argv = &.{ "git", "show-ref", "--tags", "--dereference" }, |
| 611 | .max_output_bytes = 1024 * 1024 * 1024, | 611 | .max_output_bytes = 1024 * 1024 * 1024, |
| 612 | }); | 612 | }); |
| | 613 | if (result.term == .Exited and result.term.Exited == 1) return &.{}; // show-ref exits 1 when there are no tags |
| 613 | std.debug.assert(result.term == .Exited and result.term.Exited == 0); | 614 | std.debug.assert(result.term == .Exited and result.term.Exited == 0); |
| 614 | const output = std.mem.trimRight(u8, result.stdout, "\n"); | 615 | const output = std.mem.trimRight(u8, result.stdout, "\n"); |
| 615 | var iter = std.mem.split(u8, output, "\n"); | 616 | var iter = std.mem.split(u8, output, "\n"); |