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

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui-snapshot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-snapshot.c b/ui-snapshot.c
index f68e877..c6c3656 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -174,10 +174,10 @@ static const char *get_ref_from_filename(const char *url, const char *filename,
goto out;
result = 0;
- strbuf_release(&snapshot);
out:
- return result ? strbuf_detach(&snapshot, NULL) : NULL;
+ strbuf_release(&snapshot);
+ return result ? xstrdup(sha1_to_hex(sha1)) : NULL;
}
void cgit_print_snapshot(const char *head, const char *hex,