From: Joshua Jensen <jjensen@workspacewhiz.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
git@drmicha.warpmail.net
Subject: Re: [PATCH 1/2] sparse checkout: show error messages when worktree shaping fails
Date: Wed, 21 Sep 2011 13:15:29 -0600 [thread overview]
Message-ID: <4E7A37D1.1020501@workspacewhiz.com> (raw)
In-Reply-To: <1316602259-22576-1-git-send-email-pclouds@gmail.com>
----- Original Message -----
From: Nguyễn Thái Ngọc Duy
Date: 9/21/2011 4:50 AM
> if (ce->ce_flags& CE_ADDED&&
> verify_absent(ce, ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN, o))
> - return -1;
> + goto return_failed;
>
> - if (apply_sparse_checkout(ce, o)) {
> - ret = -1;
> - goto done;
> - }
> + if (apply_sparse_checkout(ce, o))
> + goto return_failed;
> if (!ce_skip_worktree(ce))
> empty_worktree = 0;
Unfortunately, this patch only collects and displays the first untracked
file for me. It does not display all of the files that would be
overwritten (desired behavior, IMHO).
This script illustrates:
#!/bin/sh
rm -Rf utest || exit 1
mkdir utest || exit 1
cd utest || 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
echo tracked>c
git add b c
git commit -m bc
cat b
git checkout side
cat b
echo untracked>b
echo untracked>c
cat b
git checkout master
cat b
-Josh
next parent reply other threads:[~2011-09-21 19:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1316602259-22576-1-git-send-email-pclouds@gmail.com>
2011-09-21 19:15 ` Joshua Jensen [this message]
2011-09-21 20:50 ` [PATCH 1/2] sparse checkout: show error messages when worktree shaping fails Junio C Hamano
2011-09-22 11:24 ` [PATCH v2 " Nguyễn Thái Ngọc Duy
2011-09-22 19:57 ` Joshua Jensen
2011-09-22 11:24 ` [PATCH v2 2/2] Add explanation why we do not allow to sparse checkout to empty working tree Nguyễn Thái Ngọc 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=4E7A37D1.1020501@workspacewhiz.com \
--to=jjensen@workspacewhiz.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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.