setup: update the right file in multiple checkouts
commit82fde87ff3be8d10854df18964e5816417a1d7cf
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Tue, 25 Aug 2015 10:30:46 +0000 (25 17:30 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Aug 2015 16:39:08 +0000 (25 09:39 -0700)
tree673846bd0ae86a2647ad95269572c2401a65d558
parenta17c56c056d5fea0843b429132904c429a900229
setup: update the right file in multiple checkouts

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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
setup.c