THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

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>
tags/v2.24.0-rc0
René Scharfe Junio C Hamano 2 months ago
parent
commit
80e3658647
2 changed files with 3 additions and 2 deletions
  1. +2
    -1
      help.c
  2. +1
    -1
      help.h

+ 2
- 1
help.c View File

@@ -774,7 +774,8 @@ static struct string_list guess_refs(const char *ref)
return similar_refs;
}

void help_unknown_ref(const char *ref, const char *cmd, const char *error)
NORETURN void help_unknown_ref(const char *ref, const char *cmd,
const char *error)
{
int i;
struct string_list suggested_refs = guess_refs(ref);


+ 1
- 1
help.h View File

@@ -43,7 +43,7 @@ void list_commands(unsigned int colopts, struct cmdnames *main_cmds, struct cmdn
* call this to die(), when it is suspected that the user mistyped a
* ref to the command, to give suggested "correct" refs.
*/
void help_unknown_ref(const char *ref, const char *cmd, const char *error);
NORETURN void help_unknown_ref(const char *ref, const char *cmd, const char *error);

static inline void list_config_item(struct string_list *list,
const char *prefix,


Loading…
Cancel
Save