7 * To add a new advice, you need to:
8 * Define a new advice_type.
9 * Add a new entry to advice_setting array.
10 * Add the new config variable to Documentation/config/advice.txt.
11 * Call advise_if_enabled to print your advice.
14 ADVICE_ADD_EMBEDDED_REPO
,
15 ADVICE_ADD_EMPTY_PATHSPEC
,
16 ADVICE_ADD_IGNORED_FILE
,
17 ADVICE_AMBIGUOUS_FETCH_REFSPEC
,
19 ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME
,
20 ADVICE_COMMIT_BEFORE_MERGE
,
23 ADVICE_FETCH_SHOW_FORCED_UPDATES
,
24 ADVICE_FORCE_DELETE_BRANCH
,
25 ADVICE_GRAFT_FILE_DEPRECATED
,
27 ADVICE_IMPLICIT_IDENTITY
,
29 ADVICE_OBJECT_NAME_WARNING
,
30 ADVICE_PUSH_ALREADY_EXISTS
,
31 ADVICE_PUSH_FETCH_FIRST
,
32 ADVICE_PUSH_NEEDS_FORCE
,
33 ADVICE_PUSH_NON_FF_CURRENT
,
34 ADVICE_PUSH_NON_FF_MATCHING
,
35 ADVICE_PUSH_REF_NEEDS_UPDATE
,
36 ADVICE_PUSH_UNQUALIFIED_REF_NAME
,
37 ADVICE_PUSH_UPDATE_REJECTED
,
38 ADVICE_PUSH_UPDATE_REJECTED_ALIAS
,
39 ADVICE_RESET_NO_REFRESH_WARNING
,
40 ADVICE_RESOLVE_CONFLICT
,
42 ADVICE_SEQUENCER_IN_USE
,
43 ADVICE_SET_UPSTREAM_FAILURE
,
44 ADVICE_SKIPPED_CHERRY_PICKS
,
45 ADVICE_STATUS_AHEAD_BEHIND_WARNING
,
47 ADVICE_STATUS_U_OPTION
,
48 ADVICE_SUBMODULES_NOT_UPDATED
,
49 ADVICE_SUBMODULE_ALTERNATE_ERROR_STRATEGY_DIE
,
50 ADVICE_SUBMODULE_MERGE_CONFLICT
,
51 ADVICE_SUGGEST_DETACHING_HEAD
,
52 ADVICE_UPDATE_SPARSE_PATH
,
53 ADVICE_WAITING_FOR_EDITOR
,
54 ADVICE_WORKTREE_ADD_ORPHAN
,
57 int git_default_advice_config(const char *var
, const char *value
);
58 __attribute__((format (printf
, 1, 2)))
59 void advise(const char *advice
, ...);
62 * Checks if advice type is enabled (can be printed to the user).
63 * Should be called before advise().
65 int advice_enabled(enum advice_type type
);
68 * Checks the visibility of the advice before printing.
70 __attribute__((format (printf
, 2, 3)))
71 void advise_if_enabled(enum advice_type type
, const char *advice
, ...);
73 int error_resolve_conflict(const char *me
);
74 void NORETURN
die_resolve_conflict(const char *me
);
75 void NORETURN
die_conclude_merge(void);
76 void NORETURN
die_ff_impossible(void);
77 void advise_on_updating_sparse_paths(struct string_list
*pathspec_list
);
78 void detach_advice(const char *new_name
);
79 void advise_on_moving_dirty_path(struct string_list
*pathspec_list
);