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

[PATCH 1/5] fetch-pack: Properly remove the shallow file when it becomes empty.

From
AJAlexandre Julliard <julliard@winehq.org>
Date
Nov 24, 2006, 14:58 UTC
Message-ID
<871wnsvqmb.fsf@wine.dyndns.org>
The code was unlinking the lock file instead.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
 fetch-pack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fetch-pack.c b/fetch-pack.c
index d00573d..bb310b6 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -700,7 +700,7 @@ int main(int argc, char **argv)
 
 		fd = hold_lock_file_for_update(&lock, shallow, 1);
 		if (!write_shallow_commits(fd, 0)) {
-			unlink(lock.filename);
+			unlink(shallow);
 			rollback_lock_file(&lock);
 		} else {
 			close(fd);
-- 
1.4.4.1.ga335e

-- 
Alexandre Julliard
Message 1 of 1 in “fetch-pack: Properly remove the shallow file when it becomes empty.”
  1. 1/5 fetch-pack: Properly remove the shallow file when it becomes empty.Alexandre Julliard, Nov 24, 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.