git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Patch (Re: t1300-repo-config.sh failed on CYGWIN)

From
SNSungHyun Nam <goweol@gmail.com>
Date
Dec 20, 2006, 03:22 UTC
Message-ID
<emaa94$qn4$1@sea.gmane.org>
In-Reply-To
<4588A1EC.7040301@gmail.com>
SungHyun Nam wrote:
Show 6 quoted lines
> If I run it on CYGWIN, there's an error msg:
>
> * FAIL 39: rename section
>         git-repo-config --rename-section branch.eins branch.zwei
> * FAIL 40: rename succeeded
>         diff -u expect .git/config
With a patch below, the problem gone.

BTW, there's a leak for 'config_filename' in git_config_rename_section().

Thanks, namsh

diff --git a/config.c b/config.c
index 663993f..a23ac47 100644
--- a/config.c
+++ b/config.c
@@ -806,6 +806,7 @@ int git_config_rename_section(const char *old_name,
const char *new_name)
 		}
 		write(out_fd, buf, strlen(buf));
 	}
+	fclose(config_file);
 	if (close(out_fd) || commit_lock_file(lock) < 0)
 		return error("Cannot commit config file!");
 	return ret;
Previous: SungHyun Nam
Message 2 of 2 in “t1300-repo-config.sh failed on CYGWIN”
  1. SungHyun NamDec 20, 2006
  2. Patch (Re: t1300-repo-config.sh failed on CYGWIN)SungHyun Nam, Dec 20, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.