{"thread":{"id":"43719","subject":"Patch (Re: t1300-repo-config.sh failed on CYGWIN)","startedAt":"2006-12-20T02:37:32Z","lastAt":"2006-12-20T03:22:12Z","messageCount":2,"participants":["SungHyun Nam"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"297766","messageId":"4588A1EC.7040301@gmail.com","threadId":"43719","inReplyTo":null,"subject":"t1300-repo-config.sh failed on CYGWIN","fromName":"SungHyun Nam","fromEmail":"goweol@gmail.com","sentAt":"2006-12-20T02:37:32Z","receivedAt":"2006-12-20T02:37:32Z","isPatch":false,"sender":{"key":"goweol@gmail.com","avatar":null},"body":"If I run it on CYGWIN, there's an error msg:\n\n* FAIL 39: rename section\n        git-repo-config --rename-section branch.eins branch.zwei\n* FAIL 40: rename succeeded\n        diff -u expect .git/config\n...\n\nI run some commands...\n\n$ cd t/trash\n$ rm -f .git/config.lock\n$ ../../git-repo-config.exe --rename-section branch.eins branch.zwei\nerror: Cannot commit config file!\n\nThanks,\nnamsh\n\n\n\n"},{"id":"297315","messageId":"emaa94$qn4$1@sea.gmane.org","threadId":"43719","inReplyTo":"4588A1EC.7040301@gmail.com","subject":"Patch (Re: t1300-repo-config.sh failed on CYGWIN)","fromName":"SungHyun Nam","fromEmail":"goweol@gmail.com","sentAt":"2006-12-20T03:22:12Z","receivedAt":"2006-12-20T03:22:12Z","isPatch":false,"sender":{"key":"goweol@gmail.com","avatar":null},"body":"SungHyun Nam wrote:\n> If I run it on CYGWIN, there's an error msg:\n>\n> * FAIL 39: rename section\n>         git-repo-config --rename-section branch.eins branch.zwei\n> * FAIL 40: rename succeeded\n>         diff -u expect .git/config\n\nWith a patch below, the problem gone.\n\nBTW, there's a leak for 'config_filename' in\ngit_config_rename_section().\n\nThanks,\nnamsh\n\ndiff --git a/config.c b/config.c\nindex 663993f..a23ac47 100644\n--- a/config.c\n+++ b/config.c\n@@ -806,6 +806,7 @@ int git_config_rename_section(const char *old_name,\nconst char *new_name)\n \t\t}\n \t\twrite(out_fd, buf, strlen(buf));\n \t}\n+\tfclose(config_file);\n \tif (close(out_fd) || commit_lock_file(lock) < 0)\n \t\treturn error(\"Cannot commit config file!\");\n \treturn ret;\n"}]}