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 <junkio@cox.net>
Junio C Hamano committed
Nov 25, 2005 at 14:22 UTC
53e7181cd9927a8a194f4770c597744d96a113a2
2 files changed
-28
config.c
-8
@@ -458,12 +458,6 @@ int git_config_set_multivar(const char* key, const char* value,
458
* If .git/config does not exist yet, write a minimal version.
459
*/
460
if (stat(config_filename, &st)) {
461
- static const char contents[] =
462
- "#\n"
463
- "# This is the config file\n"
464
- "#\n"
465
- "\n";
466
-
461
free(store.key);
462
463
/* if nothing to unset, error out */
@@ -474,8 +468,6 @@ int git_config_set_multivar(const char* key, const char* value,
468
}
469
470
store.key = (char*)key;
477
-
478
- write(fd, contents, sizeof(contents)-1);
471
store_write_section(fd, key);
472
store_write_pair(fd, key, value);
473
} else{
t/t1300-repo-config.sh
-20
@@ -12,10 +12,6 @@ test -f .git/config && rm .git/config
12
git-repo-config core.penguin "little blue"
13
14
cat > expect << EOF
15
-#
16
-# This is the config file
17
-#
18
-
15
[core]
16
penguin = little blue
17
EOF
@@ -25,10 +21,6 @@ test_expect_success 'initial' 'cmp .git/config expect'
21
git-repo-config Core.Movie BadPhysics
22
23
cat > expect << EOF
28
-#
29
-# This is the config file
30
-#
31
-
24
[core]
25
penguin = little blue
26
Movie = BadPhysics
@@ -39,10 +31,6 @@ test_expect_success 'mixed case' 'cmp .git/config expect'
31
git-repo-config Cores.WhatEver Second
32
33
cat > expect << EOF
42
-#
43
-# This is the config file
44
-#
45
-
34
[core]
35
penguin = little blue
36
Movie = BadPhysics
@@ -55,10 +43,6 @@ test_expect_success 'similar section' 'cmp .git/config expect'
43
git-repo-config CORE.UPPERCASE true
44
45
cat > expect << EOF
58
-#
59
-# This is the config file
60
-#
61
-
46
[core]
47
penguin = little blue
48
Movie = BadPhysics
@@ -76,10 +60,6 @@ test_expect_success 'replace with non-match (actually matching)' \
60
'git-repo-config core.penguin "very blue" !kingpin'
61
62
cat > expect << EOF
79
-#
80
-# This is the config file
81
-#
82
-
63
[core]
64
penguin = very blue
65
Movie = BadPhysics