make "git var" a built-in
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
8b187e6b0e
commit
55b6745d63
2
Makefile
2
Makefile
@ -397,7 +397,6 @@ PROGRAMS += git-shell$X
|
|||||||
PROGRAMS += git-show-index$X
|
PROGRAMS += git-show-index$X
|
||||||
PROGRAMS += git-unpack-file$X
|
PROGRAMS += git-unpack-file$X
|
||||||
PROGRAMS += git-upload-pack$X
|
PROGRAMS += git-upload-pack$X
|
||||||
PROGRAMS += git-var$X
|
|
||||||
PROGRAMS += git-http-backend$X
|
PROGRAMS += git-http-backend$X
|
||||||
|
|
||||||
# List built-in command $C whose implementation cmd_$C() is not in
|
# List built-in command $C whose implementation cmd_$C() is not in
|
||||||
@ -704,6 +703,7 @@ BUILTIN_OBJS += builtin-update-index.o
|
|||||||
BUILTIN_OBJS += builtin-update-ref.o
|
BUILTIN_OBJS += builtin-update-ref.o
|
||||||
BUILTIN_OBJS += builtin-update-server-info.o
|
BUILTIN_OBJS += builtin-update-server-info.o
|
||||||
BUILTIN_OBJS += builtin-upload-archive.o
|
BUILTIN_OBJS += builtin-upload-archive.o
|
||||||
|
BUILTIN_OBJS += builtin-var.o
|
||||||
BUILTIN_OBJS += builtin-verify-pack.o
|
BUILTIN_OBJS += builtin-verify-pack.o
|
||||||
BUILTIN_OBJS += builtin-verify-tag.o
|
BUILTIN_OBJS += builtin-verify-tag.o
|
||||||
BUILTIN_OBJS += builtin-write-tree.o
|
BUILTIN_OBJS += builtin-write-tree.o
|
||||||
|
@ -72,7 +72,7 @@ static int show_config(const char *var, const char *value, void *cb)
|
|||||||
return git_default_config(var, value, cb);
|
return git_default_config(var, value, cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int cmd_var(int argc, const char **argv, const char *prefix)
|
||||||
{
|
{
|
||||||
const char *val;
|
const char *val;
|
||||||
int nongit;
|
int nongit;
|
||||||
@ -80,8 +80,6 @@ int main(int argc, char **argv)
|
|||||||
usage(var_usage);
|
usage(var_usage);
|
||||||
}
|
}
|
||||||
|
|
||||||
git_extract_argv0_path(argv[0]);
|
|
||||||
|
|
||||||
setup_git_directory_gently(&nongit);
|
setup_git_directory_gently(&nongit);
|
||||||
val = NULL;
|
val = NULL;
|
||||||
|
|
@ -106,6 +106,7 @@ extern int cmd_update_ref(int argc, const char **argv, const char *prefix);
|
|||||||
extern int cmd_update_server_info(int argc, const char **argv, const char *prefix);
|
extern int cmd_update_server_info(int argc, const char **argv, const char *prefix);
|
||||||
extern int cmd_upload_archive(int argc, const char **argv, const char *prefix);
|
extern int cmd_upload_archive(int argc, const char **argv, const char *prefix);
|
||||||
extern int cmd_upload_tar(int argc, const char **argv, const char *prefix);
|
extern int cmd_upload_tar(int argc, const char **argv, const char *prefix);
|
||||||
|
extern int cmd_var(int argc, const char **argv, const char *prefix);
|
||||||
extern int cmd_verify_tag(int argc, const char **argv, const char *prefix);
|
extern int cmd_verify_tag(int argc, const char **argv, const char *prefix);
|
||||||
extern int cmd_version(int argc, const char **argv, const char *prefix);
|
extern int cmd_version(int argc, const char **argv, const char *prefix);
|
||||||
extern int cmd_whatchanged(int argc, const char **argv, const char *prefix);
|
extern int cmd_whatchanged(int argc, const char **argv, const char *prefix);
|
||||||
|
1
git.c
1
git.c
@ -372,6 +372,7 @@ static void handle_internal_command(int argc, const char **argv)
|
|||||||
{ "update-ref", cmd_update_ref, RUN_SETUP },
|
{ "update-ref", cmd_update_ref, RUN_SETUP },
|
||||||
{ "update-server-info", cmd_update_server_info, RUN_SETUP },
|
{ "update-server-info", cmd_update_server_info, RUN_SETUP },
|
||||||
{ "upload-archive", cmd_upload_archive },
|
{ "upload-archive", cmd_upload_archive },
|
||||||
|
{ "var", cmd_var },
|
||||||
{ "verify-tag", cmd_verify_tag, RUN_SETUP },
|
{ "verify-tag", cmd_verify_tag, RUN_SETUP },
|
||||||
{ "version", cmd_version },
|
{ "version", cmd_version },
|
||||||
{ "whatchanged", cmd_whatchanged, RUN_SETUP | USE_PAGER },
|
{ "whatchanged", cmd_whatchanged, RUN_SETUP | USE_PAGER },
|
||||||
|
Loading…
Reference in New Issue
Block a user