All of lore.kernel.org
 help / color / mirror / Atom feed
From: Claas Augner <claas.augner@lsp.net>
To: git@vger.kernel.org
Subject: Bug: git-stash fails for new file not staged for commit
Date: Thu, 24 Jun 2021 17:42:39 +0200	[thread overview]
Message-ID: <f139a5e1-242a-e23b-6eda-b8b49423d70b@lsp.net> (raw)

 > 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

                 reply	other threads:[~2021-06-24 15:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=f139a5e1-242a-e23b-6eda-b8b49423d70b@lsp.net \
    --to=claas.augner@lsp.net \
    --cc=git@vger.kernel.org \
    /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.