diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2014-07-25 23:11:34 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-25 23:23:06 +0400 |
commit | 9830534e40bd15231357965441d4fe02a6a4810e (patch) | |
tree | 964385ea647fd36afc22d792c8541b460405a838 /cache.h | |
parent | 740c281d21ef5b27f6f1b942a4f2fc20f51e8c7e (diff) |
config --global --edit: create a template file if needed
When the user has no ~/.gitconfig file, git config --global --edit used
to launch an editor on an nonexistant file name.
Instead, create a file with a default content before launching the
editor. The template contains only commented-out entries, to save a few
keystrokes for the user. If the values are guessed properly, the user
will only have to uncomment the entries.
Advanced users teaching newbies can create a minimalistic configuration
faster for newbies. Beginners reading a tutorial advising to run "git
config --global --edit" as a first step will be slightly more guided for
their first contact with Git.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1025,6 +1025,7 @@ extern const char *git_author_info(int); extern const char *git_committer_info(int); extern const char *fmt_ident(const char *name, const char *email, const char *date_str, int); extern const char *fmt_name(const char *name, const char *email); +extern const char *ident_default_name(void); extern const char *ident_default_email(void); extern const char *git_editor(void); extern const char *git_pager(int stdout_is_tty); |