git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul A. Kennedy" <pakenned@pobox.com>
To: git@vger.kernel.org
Cc: "Paul A. Kennedy" <pakenned@pobox.com>
Subject: unexpected file deletion after using git rebase --abort
Date: Wed, 3 Jul 2013 18:44:02 -0400	[thread overview]
Message-ID: <20130703224402.GF9016@localhost.localdomain> (raw)

Hello!

I lost a previously untracked file that I added to the index in the
middle of a git rebase --interactive session after a git rebase --abort.
This was unexpected.

    $ ls forgotten_file
    forgotten_file
    $ git rebase --interactive HEAD~3 
      [change first rebase command from pick to  edit]
    $ git add forgotten_file
    $ git rebase --abort
    $ ls forgotten_file
    ls: cannot access forgotten_file: No such file or directory
    $

I was (of course) able to find the SHA-1 of the dangling blob using 'git
fsck', and then retrieve the file using 'git cat-file -p SHA1'

Should this behaviour be considered a bug?  That is, should the contents
of the working directory (including untracked files) before the git
rebase invocation be returned (as if preserved by a git stash
--include-untracked)?  

If we don't expect this, should we update the documentation for the
--abort heading in the git rebase man page to indicate that newly
staged content will be lost after a git rebase --abort?

This is for git version 1.8.3

Paul

--
Paul A. Kennedy
pakenned@pobox.com

             reply	other threads:[~2013-07-03 22:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 22:44 Paul A. Kennedy [this message]
2013-07-03 22:56 ` unexpected file deletion after using git rebase --abort Jonathan Nieder
2013-07-03 23:04   ` Junio C Hamano
2013-07-04 19:35     ` Paul A. Kennedy
2013-07-04 23:27       ` Eric Sunshine
2013-07-05  7:07       ` 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:
  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=20130703224402.GF9016@localhost.localdomain \
    --to=pakenned@pobox.com \
    --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 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).