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

Re: [PATCH] Fix "t0001: test git init when run via an alias"

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 10, 2014, 18:53 UTC
Message-ID
<xmqqzjhk8ukk.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1402220230-799-1-git-send-email-pclouds@gmail.com>
I'd squash this in, though.
 git.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/git.c b/git.c
index 6bb2043..9bfa8fb 100644
--- a/git.c
+++ b/git.c
@@ -36,7 +36,8 @@ static void save_env(void)
 	if (saved_environment)
 		return;
 	saved_environment = 1;
-	getcwd(orig_cwd, sizeof(orig_cwd));
+	if (getcwd(orig_cwd, sizeof(orig_cwd)))
+		die_errno("cannot getcwd");
 	for (i = 0; i < ARRAY_SIZE(env_names); i++) {
 		orig_env[i] = getenv(env_names[i]);
 		if (orig_env[i])
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 12 in “Git autocorrect bug”
  1. David TurnerJun 5, 2014
  2. Øystein WalleJun 5, 2014
  3. Øystein WalleJun 5, 2014
  4. Duy NguyenJun 5, 2014
  5. David TurnerJun 5, 2014
  6. Duy NguyenJun 6, 2014
  7. Fix "t0001: test git init when run via an alias"Nguyễn Thái Ngọc Duy, Jun 8, 2014
  8. Junio C HamanoJun 10, 2014
  9. Duy NguyenJun 11, 2014
  10. Junio C HamanoJun 12, 2014
  11. Junio C HamanoJun 10, 2014
  12. Junio C HamanoJun 10, 2014

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.