···458458 * If .git/config does not exist yet, write a minimal version.
459459 */
460460 if (stat(config_filename, &st)) {
461461- static const char contents[] =
462462- "#\n"
463463- "# This is the config file\n"
464464- "#\n"
465465- "\n";
466466-467461 free(store.key);
468462469463 /* if nothing to unset, error out */
···474468 }
475469476470 store.key = (char*)key;
477477-478478- write(fd, contents, sizeof(contents)-1);
479471 store_write_section(fd, key);
480472 store_write_pair(fd, key, value);
481473 } else{
-20
t/t1300-repo-config.sh
···1212git-repo-config core.penguin "little blue"
13131414cat > expect << EOF
1515-#
1616-# This is the config file
1717-#
1818-1915[core]
2016 penguin = little blue
2117EOF
···2521git-repo-config Core.Movie BadPhysics
26222723cat > expect << EOF
2828-#
2929-# This is the config file
3030-#
3131-3224[core]
3325 penguin = little blue
3426 Movie = BadPhysics
···3931git-repo-config Cores.WhatEver Second
40324133cat > expect << EOF
4242-#
4343-# This is the config file
4444-#
4545-4634[core]
4735 penguin = little blue
4836 Movie = BadPhysics
···5543git-repo-config CORE.UPPERCASE true
56445745cat > expect << EOF
5858-#
5959-# This is the config file
6060-#
6161-6246[core]
6347 penguin = little blue
6448 Movie = BadPhysics
···7660 'git-repo-config core.penguin "very blue" !kingpin'
77617862cat > expect << EOF
7979-#
8080-# This is the config file
8181-#
8282-8363[core]
8464 penguin = very blue
8565 Movie = BadPhysics