From: Junio C Hamano <gitster@pobox.com>
To: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] restore: allow --staged on unborn branch
Date: Wed, 07 Feb 2024 08:06:58 -0800 [thread overview]
Message-ID: <xmqqle7wcl7h.fsf@gitster.g> (raw)
In-Reply-To: <20240206230357.1097505-2-shyamthakkar001@gmail.com> (Ghanshyam Thakkar's message of "Wed, 7 Feb 2024 04:33:50 +0530")
Ghanshyam Thakkar <shyamthakkar001@gmail.com> writes:
> Some users expect that being on an unborn branch is similar to having an
> empty tree checked out. However, when running "git restore --staged ."
> on unborn branch having staged changes, the follwing error gets printed,
>
> fatal: could not resolve HEAD
Sounds like a sensible behaviour---there is no HEAD so there is
nothing to resolve. With "git resetore --staged ." in such a state,
what did the user try to do? "git reset" (no other arguments)?
BTW, "follwing" -> "following".
next prev parent reply other threads:[~2024-02-07 16:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 23:03 [PATCH] restore: allow --staged on unborn branch Ghanshyam Thakkar
2024-02-07 16:06 ` Junio C Hamano [this message]
2024-02-07 16:39 ` Ghanshyam Thakkar
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=xmqqle7wcl7h.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=shyamthakkar001@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox