All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"Kirill Müller" <kirill.mueller@ivt.baug.ethz.ch>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH v2] checkout: add --no-widen for restoring files in sparse checkout mode
Date: Sun, 31 Mar 2013 23:18:13 -0700	[thread overview]
Message-ID: <20130401061813.GJ11704@elie.Belkin> (raw)
In-Reply-To: <CACsJy8BVcu2VwxgQ9URViHMx2+6436npcYSHyZ5Mj0aVhVFtug@mail.gmail.com>

Duy Nguyen wrote:
> On Mon, Apr 1, 2013 at 11:48 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:

>> I'm afraid I can't imagine when --no-respect-skip-worktree would be
>> useful.  That can easily be a failure of my imagination, though.
>
> There may be scripts that expect "git checkout -- foo" to reset
> everything in "foo". Or maybe you just want to check out a single file
> and do not bother to edit sparse patterns as you won't need it for
> long.

Those scripts are bringing suffering on themselves by using porcelain
instead of "git checkout-index".  The usual way to look at a single
file from the index is "git show :git.c >git.c".

So you've convinced me.  I think --respect-skip-worktree can be just
the normal behavior (and that there's no need for a --no-respect
option).  That would let me do:

	git clone --no-checkout git://repo.or.cz/git.git
	cd git
	echo '/Documentation/' >.git/info/sparse-checkout
	git config core.sparsecheckout true
	git checkout

	printf '%s\n' /README /INSTALL /COPYING >>.git/info/sparse-checkout
	git checkout

	... hack hack hack ...

	# return to what the index has
	git checkout .

without having to see any pesky actual source (*.c) files.

  reply	other threads:[~2013-04-01  6:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 10:28 Hard reset of a subdirectory in a sparse checkout setting Kirill Müller
2013-03-23  9:59 ` Duy Nguyen
2013-03-23 13:02   ` Kirill Müller
2013-03-24  5:06 ` [PATCH] checkout: add --sparse for restoring files in sparse checkout mode Nguyễn Thái Ngọc Duy
2013-03-24  6:12   ` Eric Sunshine
2013-03-24 18:17   ` Jonathan Nieder
2013-03-24 19:50     ` Kirill Müller
2013-03-25  1:34     ` Duy Nguyen
2013-03-25  1:57       ` Jonathan Nieder
2013-03-30 10:02   ` [PATCH v2] checkout: add --no-widen " Nguyễn Thái Ngọc Duy
2013-04-01  4:48     ` Jonathan Nieder
2013-04-01  5:12       ` Junio C Hamano
2013-04-01  5:13       ` Duy Nguyen
2013-04-01  6:18         ` Jonathan Nieder [this message]
2013-04-12 23:12     ` [PATCH v3] checkout: add --ignore-skip-worktree-bits " Nguyễn Thái Ngọc Duy
2013-05-14  9:27       ` Müller  Kirill
2013-05-14 10:21         ` Duy Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130401061813.GJ11704@elie.Belkin \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kirill.mueller@ivt.baug.ethz.ch \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.