git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* BUG: cannot remove new staged files in sparse checkout
@ 2022-04-06 12:51 Erik Cervin Edin
  2022-04-06 13:52 ` Erik Cervin Edin
  0 siblings, 1 reply; 2+ messages in thread
From: Erik Cervin Edin @ 2022-04-06 12:51 UTC (permalink / raw)
  To: Git Mailing List

Hi friends!

I've stumbled across what I believe is a bug

I've found myself with new files that are staged, not part of the
sparse-checkout, that I cannot unstage using git restore --staged, ie
  git restore --staged :\
does nothing.

I'm able to get rid of the using
  git stash && git stash drop
but intuitively I would expect restore --staged to work, even if the
files are not part of the sparse checkout

I end up in this peculiar situation by doing the following.
Having branches:
  foo/bar
  origin/foo
and then running
  git switch -c foo
Updatings files: 100% (X/X) done.
fatal: cannot lock ref 'refs/heads/foo': 'refs/heads/foo/bar' exists;
cannot create 'refs/heads/foo'

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: BUG: cannot remove new staged files in sparse checkout
  2022-04-06 12:51 BUG: cannot remove new staged files in sparse checkout Erik Cervin Edin
@ 2022-04-06 13:52 ` Erik Cervin Edin
  0 siblings, 0 replies; 2+ messages in thread
From: Erik Cervin Edin @ 2022-04-06 13:52 UTC (permalink / raw)
  To: Git Mailing List

I should add this behavior was seen in
  git version 2.35.1.windows.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-06 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 12:51 BUG: cannot remove new staged files in sparse checkout Erik Cervin Edin
2022-04-06 13:52 ` Erik Cervin Edin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).