Merge pull request #180 from mattn/fix/git-download-stdout

git: don't write a literal '-' file after download printed to stdout
This commit is contained in:
mattn
2026-07-15 09:12:05 +00:00
committed by GitHub
+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 {