git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug/regression report - 'git stash push -u' fatal errors when sub-repo present
@ 2021-09-30  0:49 Robert Leftwich
  2021-09-30 10:06 ` René Scharfe
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Robert Leftwich @ 2021-09-30  0:49 UTC (permalink / raw)
  To: git

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
  Initialised a repo and added a file or cloned a repo inside an existing
repo (think dependencies).
  See https://github.com/gitpod-io/gitpod/issues/5675 for background.

  In an existing repo:
    $ mkdir sub_test && cd sub_test/ && git init . && touch test.txt && git
add test.txt
    OR
    $ git clone https://github.com/stencila/test.git sub_test
    THEN
    $ git stash push -u

What did you expect to happen? (Expected behavior)
  Command should complete without error but ignore the directory (this is
the existing behavior prior to v2.31)
    $ git stash push -u
    Ignoring path sub_test
    Saved working directory and index state WIP on (no branch): 94f6e3e283
Git 2.30.2

What happened instead? (Actual behavior)
  Command failed
    $ git stash push -u
    error: sub_test/: is a directory - add files inside instead
    fatal: Unable to process path sub_test/
    Cannot save the untracked files

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

Anything else you want to add:
  It happens on all versions from v2.31 to current master.
  It is specifically related to this change:

https://github.com/git/git/commit/6e773527b6b03976cefbb0f9571bd40dd5995e6c#diff-70525b6b89c7cac91e520085d954a68671038d218b77d22855e938ab075a68d8L1006

  If this is the new expected behavior perhaps it can result in a better
error message and related documentation?

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.33.0.610.gcefe983a32
cpu: x86_64
built from commit: cefe983a320c03d7843ac78e73bd513a27806845
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.4.0-1051-gke #54-Ubuntu SMP Thu Aug 5 18:52:13 UTC 2021
x86_64
compiler info: gnuc: 9.3
libc info: glibc: 2.31
$SHELL (typically, interactive shell): /bin/bash


[Enabled Hooks]

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

end of thread, other threads:[~2021-10-08  9:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30  0:49 Bug/regression report - 'git stash push -u' fatal errors when sub-repo present Robert Leftwich
2021-09-30 10:06 ` René Scharfe
2021-09-30 16:35   ` Junio C Hamano
2021-10-01 14:25     ` René Scharfe
2021-10-04 20:06       ` Derrick Stolee
2021-10-04 20:52         ` Junio C Hamano
2021-10-04 22:29           ` Derrick Stolee
2021-10-07 20:31 ` [PATCH 1/3] t3905: show failure to ignore sub-repo René Scharfe
2021-10-07 20:31 ` [PATCH 2/3] read-cache: add verify_path_internal() René Scharfe
2021-10-07 20:31 ` [PATCH 3/3] read-cache: let verify_path() reject trailing dir separators again René Scharfe
2021-10-08  9:04   ` Junio C Hamano

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 NNTP newsgroup(s).