Re: [PATCH 14/16] clone: support narrow checkout with --path option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 15, 2008, 20:27 UTC
- Message-ID
- <7vy71t9muf.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <m3r67mmu0v.fsf@localhost.localdomain>
Jakub Narebski <jnareb@gmail.com> writes:
> Second, how `--path=<narrow_spec>` interacts with `-n' (no checkout). > Does it even have any sense? Perhaps those options should be mutually > incompatibile (and --bare and this option too)?
Technically you could mark the index entries with no-checkout bits even with -n, so that later checkout or branch switching would honor that, but the branch switching would make paths that do not exist in the remote HEAD branch but do exist in the switched-to branch appear, which would be confusing. So instead of supporting:
$ git clone -n --path=Documentation/ $there work
$ cd work
$ git checkout nextwe can support:
$ git clone -n $there work
$ cd work
$ git checkout --path=Documentation/ nextwhich is much easier to explain and understand.