summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9cebe90)
raw | patch | inline | side by side (parent: 9cebe90)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 25 Nov 2005 22:22:27 +0000 (14:22 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 5 Dec 2005 20:58:53 +0000 (12:58 -0800) |
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>
comment that says "This is the config file."
Signed-off-by: Junio C Hamano <junkio@cox.net>
config.c | patch | blob | history | |
t/t1300-repo-config.sh | patch | blob | history |
diff --git a/config.c b/config.c
index 34584f62b40ef256d1d0f75e2ee16ed30b1c11fa..5b5a9a2e4c49026db7fcb9953a0ed25432de24e0 100644 (file)
--- a/config.c
+++ b/config.c
* 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 */
}
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 5e994ff00982454d49ae8e218aa0073baadbbe66..207dd3de6484518018b4eb7efe26dc449a9f71cd 100644 (file)
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
git-repo-config core.penguin "little blue"
cat > expect << EOF
-#
-# This is the config file
-#
-
[core]
penguin = little blue
EOF
git-repo-config Core.Movie BadPhysics
cat > expect << EOF
-#
-# This is the config file
-#
-
[core]
penguin = little blue
Movie = BadPhysics
git-repo-config Cores.WhatEver Second
cat > expect << EOF
-#
-# This is the config file
-#
-
[core]
penguin = little blue
Movie = BadPhysics
git-repo-config CORE.UPPERCASE true
cat > expect << EOF
-#
-# This is the config file
-#
-
[core]
penguin = little blue
Movie = BadPhysics
'git-repo-config core.penguin "very blue" !kingpin'
cat > expect << EOF
-#
-# This is the config file
-#
-
[core]
penguin = very blue
Movie = BadPhysics