Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-prune.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin-prune.c b/builtin-prune.c
index 286a94c3fc..8591d28b8e 100644
--- a/builtin-prune.c
+++ b/builtin-prune.c
@@ -20,10 +20,11 @@ static int prune_object(char *path, const char *filename, const unsigned char *s
const char *type;
if (show_only) {
- type = buf;
- if (sha1_object_info(sha1, type, NULL))
+ if (sha1_object_info(sha1, buf, NULL))
type = "unknown";
- printf("%s %s\n", sha1_to_hex(sha1), type );
+ else
+ type = buf;
+ printf("%s %s\n", sha1_to_hex(sha1), type);
return 0;
}
unlink(mkpath("%s/%s", path, filename));