{"thread":{"id":"2676","subject":"[PATCH] config.c: remove unnecessary header in minimum configuration file.","startedAt":"2005-11-25T22:22:14Z","lastAt":"2005-11-25T22:22:14Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"12744","messageId":"7vbr08mkq1.fsf@assigned-by-dhcp.cox.net","threadId":"2676","inReplyTo":null,"subject":"[PATCH] config.c: remove unnecessary header in minimum configuration file.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-25T22:22:14Z","receivedAt":"2005-11-25T22:22:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"It is just silly to start the file called \"config\" a comment\nthat says \"This is the config file.\"\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\n\n config.c               |    8 --------\n t/t1300-repo-config.sh |   20 --------------------\n 2 files changed, 0 insertions(+), 28 deletions(-)\n\napplies-to: f316bfd81eaa2064c1d9e01a336eaed8d7a5bd4f\n55c2454c6f18323b5ff04504593603848084aa4d\ndiff --git a/config.c b/config.c\nindex 5cc8535..52659f9 100644\n--- a/config.c\n+++ b/config.c\n@@ -445,12 +445,6 @@ int git_config_set_multivar(const char* \n \t * If .git/config does not exist yet, write a minimal version.\n \t */\n \tif (stat(config_filename, &st)) {\n-\t\tstatic const char contents[] =\n-\t\t\t\"#\\n\"\n-\t\t\t\"# This is the config file\\n\"\n-\t\t\t\"#\\n\"\n-\t\t\t\"\\n\";\n-\n \t\tfree(store.key);\n \n \t\t/* if nothing to unset, error out */\n@@ -461,8 +455,6 @@ int git_config_set_multivar(const char* \n \t\t}\n \n \t\tstore.key = (char*)key;\n-\n-\t\twrite(fd, contents, sizeof(contents)-1);\n \t\tstore_write_section(fd, key);\n \t\tstore_write_pair(fd, key, value);\n \t} else{\ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex 5e994ff..207dd3d 100644\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -12,10 +12,6 @@ test -f .git/config && rm .git/config\n git-repo-config core.penguin \"little blue\"\n \n cat > expect << EOF\n-#\n-# This is the config file\n-#\n-\n [core]\n \tpenguin = little blue\n EOF\n@@ -25,10 +21,6 @@ test_expect_success 'initial' 'cmp .git/\n git-repo-config Core.Movie BadPhysics\n \n cat > expect << EOF\n-#\n-# This is the config file\n-#\n-\n [core]\n \tpenguin = little blue\n \tMovie = BadPhysics\n@@ -39,10 +31,6 @@ test_expect_success 'mixed case' 'cmp .g\n git-repo-config Cores.WhatEver Second\n \n cat > expect << EOF\n-#\n-# This is the config file\n-#\n-\n [core]\n \tpenguin = little blue\n \tMovie = BadPhysics\n@@ -55,10 +43,6 @@ test_expect_success 'similar section' 'c\n git-repo-config CORE.UPPERCASE true\n \n cat > expect << EOF\n-#\n-# This is the config file\n-#\n-\n [core]\n \tpenguin = little blue\n \tMovie = BadPhysics\n@@ -76,10 +60,6 @@ test_expect_success 'replace with non-ma\n \t'git-repo-config core.penguin \"very blue\" !kingpin'\n \n cat > expect << EOF\n-#\n-# This is the config file\n-#\n-\n [core]\n \tpenguin = very blue\n \tMovie = BadPhysics\n---\n0.99.9.GIT\n"}]}