Skip to content

Commit

Permalink
repo-config: add deprecation warning
Browse files Browse the repository at this point in the history
repo-config was deprecated in 5c66d0d on 2008-01-17.  Warn the
remaining users that it has been replaced by config and is going to
be removed eventually.

Signed-off-by: Rene Scharfe <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
René Scharfe authored and gitster committed Feb 13, 2011
1 parent 00e6ee7 commit 6390c90
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ extern int cmd_clone(int argc, const char **argv, const char *prefix);
extern int cmd_clean(int argc, const char **argv, const char *prefix);
extern int cmd_commit(int argc, const char **argv, const char *prefix);
extern int cmd_commit_tree(int argc, const char **argv, const char *prefix);
extern int cmd_config(int argc, const char **argv, const char *prefix);
extern int cmd_count_objects(int argc, const char **argv, const char *prefix);
extern int cmd_describe(int argc, const char **argv, const char *prefix);
extern int cmd_diff_files(int argc, const char **argv, const char *prefix);
Expand Down Expand Up @@ -110,7 +111,7 @@ extern int cmd_reflog(int argc, const char **argv, const char *prefix);
extern int cmd_remote(int argc, const char **argv, const char *prefix);
extern int cmd_remote_ext(int argc, const char **argv, const char *prefix);
extern int cmd_remote_fd(int argc, const char **argv, const char *prefix);
extern int cmd_config(int argc, const char **argv, const char *prefix);
extern int cmd_repo_config(int argc, const char **argv, const char *prefix);
extern int cmd_rerere(int argc, const char **argv, const char *prefix);
extern int cmd_reset(int argc, const char **argv, const char *prefix);
extern int cmd_rev_list(int argc, const char **argv, const char *prefix);
Expand Down
6 changes: 6 additions & 0 deletions builtin/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,3 +500,9 @@ int cmd_config(int argc, const char **argv, const char *prefix)

return 0;
}

int cmd_repo_config(int argc, const char **argv, const char *prefix)
{
fprintf(stderr, "WARNING: git repo-config is deprecated in favor of git config.\n");
return cmd_config(argc, argv, prefix);
}
2 changes: 1 addition & 1 deletion git.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ static void handle_internal_command(int argc, const char **argv)
{ "remote-ext", cmd_remote_ext },
{ "remote-fd", cmd_remote_fd },
{ "replace", cmd_replace, RUN_SETUP },
{ "repo-config", cmd_config, RUN_SETUP_GENTLY },
{ "repo-config", cmd_repo_config, RUN_SETUP_GENTLY },
{ "rerere", cmd_rerere, RUN_SETUP },
{ "reset", cmd_reset, RUN_SETUP },
{ "rev-list", cmd_rev_list, RUN_SETUP },
Expand Down

0 comments on commit 6390c90

Please sign in to comment.