Re: [PATCH] setup: update the right file in multiple checkouts
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Aug 31, 2015, 10:29 UTC
- Message-ID
- <CACsJy8AegVLNkQ9fnxXeLKdh0PaU2EKAU2ti2G7qutdtAu-xag@mail.gmail.com>
- In-Reply-To
- <xmqqlhcz1fy8.fsf@gitster.dls.corp.google.com>
On Tue, Aug 25, 2015 at 11:38 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 24 quoted lines
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes: > >> This code is introduced in 23af91d (prune: strategies for linked >> checkouts - 2014-11-30), and it's supposed to implement this rule from >> that commit's message: >> >> - linked checkouts are supposed to keep its location in $R/gitdir up >> to date. The use case is auto fixup after a manual checkout move. >> >> Note the name, "$R/gitdir", not "$R/gitfile". Correct the path to be >> updated accordingly. >> >> While at there, make sure I/O errors are not silently dropped. >> >> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> >> --- >> The code was right in v2 [1] and became "gitfile" since v3 [2]. I >> need to reconsider my code quality after this :( > > Heh, don't sweat it. Everybody makes mistakes and sometimes becomes > sloppy. > > Thanks for double checking and correcting. Perhaps this could have > caught if we had some test coverage, I wonder?
There's tests to check this prune functionality. They just don't exercise this function. Instead they manipulate "gitdir" file directly. I'll add a test to move repo around to make sure this code is exercised in the test suite.
-- Duy