git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Joshua Jensen <jjensen@workspacewhiz.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git checkout under 1.7.6 does not properly list untracked files and aborts
Date: Wed, 21 Sep 2011 18:58:42 +1000	[thread overview]
Message-ID: <20110921085842.GA29768@duynguyen-vnpc> (raw)
In-Reply-To: <4E79A04B.7080607@drmicha.warpmail.net>

On Wed, Sep 21, 2011 at 10:28:59AM +0200, Michael J Gruber wrote:
> 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

This may help

--8<--
diff --git a/unpack-trees.c b/unpack-trees.c
index a6518db..a239af7 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -245,13 +245,13 @@ static int check_updates(struct unpack_trees_options *o)
 static int verify_uptodate_sparse(struct cache_entry *ce, struct unpack_trees_options *o);
 static int verify_absent_sparse(struct cache_entry *ce, enum unpack_trees_error_types, struct unpack_trees_options *o);
 
-static int will_have_skip_worktree(const struct cache_entry *ce, struct unpack_trees_options *o)
+static int will_have_skip_worktree(const struct cache_entry *ce, struct exclude_list *el)
 {
 	const char *basename;
 
 	basename = strrchr(ce->name, '/');
 	basename = basename ? basename+1 : ce->name;
-	return excluded_from_list(ce->name, ce_namelen(ce), basename, NULL, o->el) <= 0;
+	return excluded_from_list(ce->name, ce_namelen(ce), basename, NULL, el) <= 0;
 }

 static int apply_sparse_checkout(struct cache_entry *ce, struct unpack_trees_options *o)
@@ -849,7 +849,7 @@ static void mark_new_skip_worktree(struct exclude_list *el,
 		if (select_flag && !(ce->ce_flags & select_flag))
 			continue;
 
-		if (!ce_stage(ce) && will_have_skip_worktree(ce, o))
+		if (!ce_stage(ce) && will_have_skip_worktree(ce, el))
 			ce->ce_flags |= skip_wt_flag;
 		else
 			ce->ce_flags &= ~skip_wt_flag;
--8<--

> Duy, sorry for prodding you again.

No problem (and sorry for breaking the build). I'll also have a look
at this problem.

  reply	other threads:[~2011-09-21  8:58 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         ` git checkout under 1.7.6 does not properly list untracked files and aborts Michael J Gruber
2011-09-21  8:58           ` Nguyen Thai Ngoc Duy [this message]
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=20110921085842.GA29768@duynguyen-vnpc \
    --to=pclouds@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=jjensen@workspacewhiz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).