Skip to content

Commit

Permalink
Merge branch 'rs/help-unknown-ref-does-not-return'
Browse files Browse the repository at this point in the history
Code cleanup.

* rs/help-unknown-ref-does-not-return:
  help: make help_unknown_ref() NORETURN
  • Loading branch information
gitster committed Sep 30, 2019
2 parents 3ff6af7 + 80e3658 commit 8e111e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion help.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion help.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8e111e4

Please sign in to comment.