git: don't fall through to writing a literal '-' file after download already printed the object to stdout.

This commit is contained in:
Yasuhiro Matsumoto
2026-07-15 18:01:15 +09:00
parent 03432424d2
commit e493fcdb03
+2 -1
View File
@@ -635,9 +635,10 @@ aside from those, there is also:
if outputPath == "-" {
if _, err = os.Stdout.Write(obj.Data); err != nil {
log("\nprinted object %s to stdout\n", color.CyanString(obj.Hash))
return err
}
log("\nprinted object %s to stdout\n", color.CyanString(obj.Hash))
return nil
}
if err := os.WriteFile(outputPath, obj.Data, 0644); err != nil {