git_path(): keep "info/sparse-checkout" per work-tree
commit6cfbdcb2ab70b238fca9b3811f5b58368fd077c6
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 30 Nov 2014 08:24:55 +0000 (30 15:24 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Dec 2014 19:00:18 +0000 (1 11:00 -0800)
tree103b13703ff6f02ea1dcbfd8d38b4f4672c99932
parent77a6d84045c8b558d1e08ff2ffe70347b19be6ef
git_path(): keep "info/sparse-checkout" per work-tree

Currently git_path("info/sparse-checkout") resolves to
$GIT_COMMON_DIR/info/sparse-checkout in multiple worktree mode. It
makes more sense for the sparse checkout patterns to be per worktree,
so you can have multiple checkouts with different parts of the tree.

With this, "git checkout --to <new>" on a sparse checkout will create
<new> as a full checkout. Which is expected, it's how a new checkout
is made. The user can reshape the worktree afterwards.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
path.c
t/t0060-path-utils.sh