]> git.ipfire.org Git - thirdparty/git.git/commitdiff
stash: declare ref_stash as an array
authorDenton Liu <liu.denton@gmail.com>
Tue, 9 Feb 2021 07:28:53 +0000 (23:28 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Feb 2021 21:34:58 +0000 (13:34 -0800)
Save sizeof(const char *) bytes by declaring ref_stash as an array
instead of having a redundant pointer to an array.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/stash.c

index 9bc85f91cd004024b5bba9bf9cb587101e9dedce..6f2b58f6ab2046aebd13a1a6486f1bd59662f7f9 100644 (file)
@@ -87,7 +87,7 @@ static const char * const git_stash_save_usage[] = {
        NULL
 };
 
-static const char *ref_stash = "refs/stash";
+static const char ref_stash[] = "refs/stash";
 static struct strbuf stash_index_path = STRBUF_INIT;
 
 /*