This is meant for the end user, who cannot be expected to edit .git/config by hand.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
Makefile | 3 ++- config-set.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletions(-) create mode 100644 config-set.c
applies-to: 182b0cedc3aa9a6d4afb3331a9c9472306cf77c6 ef6b137c5b90c3d0cba100d39b0fd7ed9de0dad8
Show changes to 2 files +18 −1
Makefile, config-set.c
diff --git a/Makefile b/Makefile index d20cf66..55f4d44 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,8 @@ PROGRAMS = \ git-unpack-objects$X git-update-index$X git-update-server-info$X \ git-upload-pack$X git-verify-pack$X git-write-tree$X \ git-update-ref$X git-symbolic-ref$X git-check-ref-format$X \ - git-name-rev$X git-pack-redundant$X $(SIMPLE_PROGRAMS) + git-name-rev$X git-pack-redundant$X git-config-set$X \ + $(SIMPLE_PROGRAMS) # Backward compatibility -- to be removed after 1.0 PROGRAMS += git-ssh-pull$X git-ssh-push$X diff --git a/config-set.c b/config-set.c new file mode 100644 index 0000000..fe024da --- /dev/null +++ b/config-set.c @@ -0,0 +1,16 @@ +#include "cache.h" + +static const char git_config_set_usage[] = +"git-config-set name value"; + +int main(int argc, const char **argv) +{ + setup_git_directory(); + switch (argc) { + case 3: + return git_config_set(argv[1], argv[2]); + default: + usage(git_config_set_usage); + } + return 0; +} --- 0.99.9.GIT