worktree.c: add is_main_worktree()
commit984ad9e56c9d884f7f1aa7d6b2052f3fb082ee5d
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 3 Jun 2016 12:19:40 +0000 (3 19:19 +0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 4 Jun 2016 04:58:35 +0000 (3 21:58 -0700)
treed286f5932f63dc4005655468cb6fa520b3539dba
parent6835314459794831a1b88bed56549653710e910c
worktree.c: add is_main_worktree()

Main worktree _is_ different. You can lock (*) a linked worktree but not
the main one, for example. Provide an API for checking that.

(*) Add the file $GIT_DIR/worktrees/xxx/locked to avoid worktree xxx
from being removed or moved.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
worktree.c
worktree.h