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

[PATCH v2 8/8] sha1_file: do write objects even if found in ODB_EXTALT database

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Apr 30, 2013, 03:42 UTC
Message-ID
<1367293372-1958-9-git-send-email-pclouds@gmail.com>
In-Reply-To
<1367293372-1958-1-git-send-email-pclouds@gmail.com>

Those in ODB_EXTALT are temporary and will be gone soon. Make a permanent copy for safety.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 sha1_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sha1_file.c b/sha1_file.c
index b8f2afe..ce3698a 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2880,7 +2880,7 @@ int write_sha1_file(const void *buf, unsigned long len, const char *type, unsign
 	write_sha1_file_prepare(buf, len, type, sha1, hdr, &hdrlen);
 	if (returnsha1)
 		hashcpy(returnsha1, sha1);
-	if (has_sha1_file(sha1))
+	if (has_sha1_file_proper(sha1))
 		return 0;
 	return write_loose_object(sha1, hdr, hdrlen, buf, len, 0);
 }
-- 
1.8.2.83.gc99314b
Previous: Nguyễn Thái Ngọc DuyNext: Thomas Rast
Message 12 of 14 in “Some object db protection when add_submodule_odb is used”
  1. 0/8 Some object db protection when add_submodule_odb is usedNguyễn Thái Ngọc Duy, Apr 30, 2013
  2. 1/8 sha1_file: allow to select pack origin when looking up an objectNguyễn Thái Ngọc Duy, Apr 30, 2013
  3. Eric SunshineApr 30, 2013
  4. 2/8 sha1_file: keep track of alternate source of objectsNguyễn Thái Ngọc Duy, Apr 30, 2013
  5. 3/8 sha1_file: mark alt object database from add_submodule_odb()Nguyễn Thái Ngọc Duy, Apr 30, 2013
  6. Eric SunshineApr 30, 2013
  7. 4/8 sha1_file: new object source for submodule's alt object databaseNguyễn Thái Ngọc Duy, Apr 30, 2013
  8. Eric SunshineApr 30, 2013
  9. 5/8 commit.c: refuse to write commits referring to external objectsNguyễn Thái Ngọc Duy, Apr 30, 2013
  10. 6/8 cache-tree.c: refuse to write trees referring to external objectsNguyễn Thái Ngọc Duy, Apr 30, 2013
  11. 7/8 mktag: refuse to write tags referring to external objectsNguyễn Thái Ngọc Duy, Apr 30, 2013
  12. 8/8 sha1_file: do write objects even if found in ODB_EXTALT databaseNguyễn Thái Ngọc Duy, Apr 30, 2013
  13. Thomas RastApr 30, 2013
  14. Duy NguyenApr 30, 2013

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.