From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: Possible regression: overwriting untracked files in a fresh repo
Date: Mon, 24 Aug 2009 15:39:26 -0700 [thread overview]
Message-ID: <7viqgc3kgx.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20090824190710.GB25168@coredump.intra.peff.net> (Jeff King's message of "Mon\, 24 Aug 2009 15\:07\:10 -0400")
Jeff King <peff@peff.net> writes:
> However, if I then do this:
>
> (cd parent && echo content >another && git add . && git commit -m more)
> (cd child && git fetch ../parent && git checkout -b new FETCH_HEAD)
>
> then it does complain. I'm guessing there is a different code path for
> the case that we have no index at all, and that it is not properly
> checking for overwrites.
I think it is this "opts->force = 1" done when you are on an unborn
branch.
if (!old.commit && !opts->force) {
if (!opts->quiet) {
warning("You appear to be on a branch yet to be born.");
warning("Forcing checkout of %s.", new->name);
}
opts->force = 1;
}
next prev parent reply other threads:[~2009-08-24 22:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-24 16:31 Possible regression: overwriting untracked files in a fresh repo Johannes Schindelin
2009-08-24 19:07 ` Jeff King
2009-08-24 22:39 ` Junio C Hamano [this message]
2009-08-24 23:20 ` Junio C Hamano
2009-08-25 1:36 ` Jeff King
2009-08-25 1:47 ` Jeff King
2009-08-25 2:11 ` Junio C Hamano
2009-08-25 3:03 ` Jeff King
2009-08-25 11:34 ` Johannes Schindelin
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=7viqgc3kgx.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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