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

Re: [PATCH v3] sha1_file: do not add own object directory as alternate

From
Ephrim Khong <dr.khong@gmail.com>
Date
Jul 16, 2014, 06:42 UTC
Message-ID
<53C61EDB.6050905@gmail.com>
In-Reply-To
<xmqqd2d6v2yf.fsf@gitster.dls.corp.google.com>
On 15.07.2014 21:26, Junio C Hamano wrote:
>> +	strbuf_addstr(&objdirbuf, absolute_path(get_object_directory()));
>> +	normalize_path_copy(objdirbuf.buf, objdirbuf.buf);
>
> This is somewhat a strange usage of a strbuf.

There might be a more elegant way, but I tried to mimic the local coding style and simply copied how the alternate paths were normalized. Let me know if you want this re-rolled without strbuf, otherwise I'll leave it as-is.

Show 7 quoted lines
>> diff --git a/t/t7702-repack-cyclic-alternate.sh b/t/t7702-repack-cyclic-alternate.sh
>> new file mode 100755
>> index 0000000..8341d46
>> --- /dev/null
>> +++ b/t/t7702-repack-cyclic-alternate.sh
>
> Do we really have to waste a new test file only for this test?
Absolutely not. I'll add it to 7700, which seems appropriate.
Previous: Junio C HamanoNext: Eric Sunshine
Message 13 of 16 in “[Bug] data loss with cyclic alternates”
  1. Ephrim KhongJul 11, 2014
  2. Junio C HamanoJul 11, 2014
  3. Keller, Jacob EJul 11, 2014
  4. Jeff KingJul 12, 2014
  5. Keller, Jacob EJul 14, 2014
  6. Ephrim KhongJul 13, 2014
  7. sha1_file: do not add own object directory as alternateEphrim Khong, Jul 14, 2014
  8. Duy NguyenJul 14, 2014
  9. Ephrim KhongJul 14, 2014
  10. Johannes SixtJul 15, 2014
  11. sha1_file: do not add own object directory as alternateEphrim Khong, Jul 15, 2014
  12. Junio C HamanoJul 15, 2014
  13. Ephrim KhongJul 16, 2014
  14. Eric SunshineJul 15, 2014
  15. Junio C HamanoJul 15, 2014
  16. Ephrim KhongJul 16, 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.