From: Michael J Gruber <git@drmicha•warpmail.net>
To: unlisted-recipients:; (no To-header on input)
Cc: Joshua Jensen <jjensen@workspacewhiz•com>,
"git@vger•kernel.org" <git@vger•kernel.org>,
Nguyen Thai Ngoc Duy <pclouds@gmail•com>
Subject: Re: git checkout under 1.7.6 does not properly list untracked files and aborts
Date: Wed, 21 Sep 2011 10:28:59 +0200 [thread overview]
Message-ID: <4E79A04B.7080607@drmicha.warpmail.net> (raw)
In-Reply-To: <4E7996AA.4040909@drmicha.warpmail.net>
Michael J Gruber venit, vidit, dixit 21.09.2011 09:47:
> Interesting. So, it is related to sparse, it seems, and there is also a
> mistake in the documentation (which contradicts itself, btw). With your
> script, since all files are requested to be checked out ('*'), none
> should have skip-worktree set, and the result should be the same as with
> my version. But I get this:
>
> Initialized empty Git repository in /tmp/t/utest/.git/
> [master (root-commit) 5929c8b] a
> 1 files changed, 1 insertions(+), 0 deletions(-)
> create mode 100644 a
> [master 60ad69e] b
> 1 files changed, 1 insertions(+), 0 deletions(-)
> create mode 100644 b
> tracked
> Switched to branch 'side'
> cat: b: No such file or directory
> untracked
> untracked
>
> That is probably the same output as for you. The final "git checkout
> master" errored out without doing anything and without message. I'll
> send a few cleanups now, and do some bisecting and thinking later;
> though there are people whose sparse-knowledge is way less sparse than
> mine ;)
So, I bisected it. The first bad commit is
9037026 (unpack-trees: fix sparse checkout's "unable to match
directories", 2010-11-27)
although the real culprit may be its predecessor
2431afb (unpack-trees: move all skip-worktree checks back to
unpack_trees(), 2010-11-27)
which does not compile:
CC unpack-trees.o
unpack-trees.c: In function 'mark_new_skip_worktree':
unpack-trees.c:852:75: error: 'o' undeclared (first use in this function)
unpack-trees.c:852:75: note: each undeclared identifier is reported only
once for each function it appears in
make: *** [unpack-trees.o] Error 1
So, this problem was introduced after v1.7.3.2. Given the extent of
those two commits, I can't help further (but your proposed fix may be fine).
Duy, sorry for prodding you again. My bisect script was (based on
Joshua's, based on mine):
#!/bin/sh
GIT_EXEC_DIR=~/src/git
PATH=$GIT_EXEC_DIR:$PATH
export GIT_EXEC_DIR
d=/tmp/t/utest
rm -Rf $d || exit 1
mkdir $d || exit 1
cd $d || exit 1
git init
git config core.sparseCheckout true
echo *>.git/info/sparse-checkout
echo tracked>a
git add a
git commit -m a a
git branch side
echo tracked>b
git add b
git commit -m b
git checkout side
echo untracked>b
git checkout master 2>&1 | grep "would be"
Hope this helps.
Michael
next prev parent reply other threads:[~2011-09-21 8:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-09 20:04 git checkout under 1.7.6 does not properly list untracked files and aborts Joshua Jensen
2011-09-19 19:44 ` Joshua Jensen
2011-09-19 20:06 ` Joshua Jensen
2011-09-20 15:10 ` Michael J Gruber
2011-09-20 18:26 ` Joshua Jensen
2011-09-21 7:47 ` Michael J Gruber
2011-09-21 7:48 ` [PATCH 0/3] read-tree cleanups Michael J Gruber
2011-09-21 7:48 ` [PATCH 1/3] unpack-trees: print "Aborting" to stderr Michael J Gruber
2011-09-21 22:02 ` Junio C Hamano
2011-09-21 22:40 ` Junio C Hamano
2011-09-22 5:58 ` Michael J Gruber
2011-09-21 7:48 ` [PATCH 2/3] git-read-tree.txt: language and typography fixes Michael J Gruber
2011-09-21 7:48 ` [PATCH 3/3] git-read-tree.txt: correct sparse-checkout and skip-worktree description Michael J Gruber
2011-09-21 9:26 ` Nguyen Thai Ngoc Duy
2011-09-21 9:33 ` Michael J Gruber
2011-09-21 9:39 ` Nguyen Thai Ngoc Duy
2011-09-21 7:51 ` [PATCH 0/3] read-tree cleanups Michael J Gruber
2011-09-21 12:14 ` Junio C Hamano
2011-09-21 8:28 ` Michael J Gruber [this message]
2011-09-21 8:58 ` git checkout under 1.7.6 does not properly list untracked files and aborts Nguyen Thai Ngoc Duy
2011-09-21 9:16 ` Michael J Gruber
2011-09-21 10:28 ` Nguyen Thai Ngoc Duy
2011-09-21 10:31 ` Nguyen Thai Ngoc Duy
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=4E79A04B.7080607@drmicha.warpmail.net \
--to=git@drmicha$(echo .)warpmail.net \
--cc=git@vger$(echo .)kernel.org \
--cc=jjensen@workspacewhiz$(echo .)com \
--cc=pclouds@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox