git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug: git-stash fails for new file not staged for commit
@ 2021-06-24 15:42 Claas Augner
  0 siblings, 0 replies; only message in thread
From: Claas Augner @ 2021-06-24 15:42 UTC (permalink / raw)
  To: git

 > What did you do before the bug happened?

I tried to stash a new file that I added with `git add --intent-to-add`:

```
$ touch foo
$ git add --intent-to-add foo
$ git stash
```


 > What did you expect to happen?

The file should have been stashed.


 > What happened instead?

The stash failed with the following error message:

```
error: Entry 'foo' not uptodate. Cannot merge.
Cannot save the current worktree state
```


 > What's different between what you expected and what actually happened?

Instead of stashing the file, the stash fails with an error message.


 > Anything else you want to add:

Background: https://github.com/okonet/lint-staged/issues/990


[System Info]
git version:
git version 2.32.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 
UTC 2020 x86_64
compiler info: gnuc: 9.3
libc info: glibc: 2.31
$SHELL (typically, interactive shell): /usr/bin/zsh


[Enabled Hooks]
applypatch-msg
pre-applypatch
post-applypatch
pre-commit
prepare-commit-msg
commit-msg
post-commit
pre-rebase
post-checkout
post-merge
pre-push
pre-receive
update
post-receive
post-update
push-to-checkout
pre-auto-gc
post-rewrite
sendemail-validate

-------------------------------------------
LSP.net GmbH
Prinzregentenstr. 40
10715 Berlin / Germany
T +49 30 20896331
Web: https://www.LSP.net
Blog: https://blog.LSP.net

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-24 15:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 15:42 Bug: git-stash fails for new file not staged for commit Claas Augner

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).