help: make help_unknown_ref() NORETURN
Announce that calling help_unknown_ref() exits the program. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Aug 29, 2019 at 21:13 UTC
80e3658647561c4a8587978747752f6f63a96717
2 files changed
+3
-2
help.c
+2
-1
@@ -774,7 +774,8 @@ static struct string_list guess_refs(const char *ref)
774
return similar_refs;
775
}
776
777
-void help_unknown_ref(const char *ref, const char *cmd, const char *error)
777
+NORETURN void help_unknown_ref(const char *ref, const char *cmd,
778
+ const char *error)
779
{
780
int i;
781
struct string_list suggested_refs = guess_refs(ref);
help.h
+1
-1
@@ -43,7 +43,7 @@ void list_commands(unsigned int colopts, struct cmdnames *main_cmds, struct cmdn
43
* call this to die(), when it is suspected that the user mistyped a
44
* ref to the command, to give suggested "correct" refs.
45
*/
46
-void help_unknown_ref(const char *ref, const char *cmd, const char *error);
46
+NORETURN void help_unknown_ref(const char *ref, const char *cmd, const char *error);
47
48
static inline void list_config_item(struct string_list *list,
49
const char *prefix,