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.