mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sergii Shkarnikov <>
Subject: Possible bug with git restore
Date: Wed, 12 Aug 2020 21:51:23 +0300	[thread overview]
Message-ID: <> (raw)


I see some strange behavior of the "git restore" command. Here is a
bug report template filled out:

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)

    I tried to restore a couple of files from an earlier commit
running the restore command with a wildcard:

    git restore -s HEAD~ -- */filename.*

    In my work tree those are .cpp and .hpp files stored in different folders.

What did you expect to happen? (Expected behavior)

    Both files are restored to what they were in HEAD~.

What happened instead? (Actual behavior)

    Both files were deleted (and got (delete) status).

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

    Files became deleted for no apparent reason instead of restoring
to expected revision.

Anything else you want to add:

    Running this command without wildcards for each file separately
works as expected.

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
cpu: x86_64
built from commit: 907ab1011dce9112700498e034b974ba60f8b407
sizeof-long: 4
sizeof-size_t: 8
uname: Windows 10.0 18363
compiler info: gnuc: 10.1
libc info: no libc information available

[Enabled Hooks]
Sergii Shkarnikov

             reply	other threads:[~2020-08-12 18:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 18:51 Sergii Shkarnikov [this message]
2020-08-14 22:41 ` Possible bug with git restore Eric Sunshine
2020-08-20 12:59   ` Sergii Shkarnikov
2020-08-20 13:40     ` Jeff King
2020-08-20 17:48       ` René Scharfe
2020-08-20 18:27         ` Jeff King
2020-08-22  8:57           ` [PATCH] checkout, restore: make pathspec recursive René Scharfe
2020-08-24 20:21             ` Jeff King
2020-08-22 10:29           ` Possible bug with git restore René Scharfe
2020-08-24 20:25             ` Jeff King
2020-08-22 19:36           ` Junio C Hamano

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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \

* 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.
Code repositories for project(s) associated with this public inbox

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