From: Junio C Hamano Date: Fri, 25 Nov 2005 22:22:27 +0000 (-0800) Subject: config.c: remove unnecessary header in minimum configuration file. X-Git-Tag: v0.99.9m^2~66 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=53e7181cd9927a8a194f4770c597744d96a113a2;p=git.git config.c: remove unnecessary header in minimum configuration file. It is just silly to start the file called "config" with a comment that says "This is the config file." Signed-off-by: Junio C Hamano --- diff --git a/config.c b/config.c index 34584f62..5b5a9a2e 100644 --- a/config.c +++ b/config.c @@ -458,12 +458,6 @@ int git_config_set_multivar(const char* key, const char* value, * If .git/config does not exist yet, write a minimal version. */ if (stat(config_filename, &st)) { - static const char contents[] = - "#\n" - "# This is the config file\n" - "#\n" - "\n"; - free(store.key); /* if nothing to unset, error out */ @@ -474,8 +468,6 @@ int git_config_set_multivar(const char* key, const char* value, } store.key = (char*)key; - - write(fd, contents, sizeof(contents)-1); store_write_section(fd, key); store_write_pair(fd, key, value); } else{ diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 5e994ff0..207dd3de 100644 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -12,10 +12,6 @@ test -f .git/config && rm .git/config git-repo-config core.penguin "little blue" cat > expect << EOF -# -# This is the config file -# - [core] penguin = little blue EOF @@ -25,10 +21,6 @@ test_expect_success 'initial' 'cmp .git/config expect' git-repo-config Core.Movie BadPhysics cat > expect << EOF -# -# This is the config file -# - [core] penguin = little blue Movie = BadPhysics @@ -39,10 +31,6 @@ test_expect_success 'mixed case' 'cmp .git/config expect' git-repo-config Cores.WhatEver Second cat > expect << EOF -# -# This is the config file -# - [core] penguin = little blue Movie = BadPhysics @@ -55,10 +43,6 @@ test_expect_success 'similar section' 'cmp .git/config expect' git-repo-config CORE.UPPERCASE true cat > expect << EOF -# -# This is the config file -# - [core] penguin = little blue Movie = BadPhysics @@ -76,10 +60,6 @@ test_expect_success 'replace with non-match (actually matching)' \ 'git-repo-config core.penguin "very blue" !kingpin' cat > expect << EOF -# -# This is the config file -# - [core] penguin = very blue Movie = BadPhysics