git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Braun <thomas.braun@virtuell-zuhause.de>
To: Elijah Newren <newren@gmail.com>, Md Naeim <naeim249@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"SZEDER Gábor" <szeder.dev@gmail.com>
Subject: Re: [BUG?] 'git rebase --abort' couldn't abort aborted rebase
Date: Wed, 3 Jun 2020 18:09:07 +0200	[thread overview]
Message-ID: <63139842-8548-6c64-1214-5469eedb8d4f@virtuell-zuhause.de> (raw)
In-Reply-To: <CABPp-BGh0T1xio-pRb=JVNbJDK1PWpo+v877nDfjcm6khn6NDg@mail.gmail.com>

On 30.05.2020 18:24, Elijah Newren wrote:
> On Sat, May 30, 2020 at 3:52 AM Md Naeim <naeim249@gmail.com> wrote:

[...]

> Could you provide any details beyond the subject, such as the output
> from 'git rebase --abort', your git version, the output of `git
> status`, whether there are any untracked files with special status
> (e.g. ignored but a submodule in the way of something?), any special
> file permissions (does root own some files and prevent git from
> updating things?), operating system you are on, link to a repository
> people can use to reproduce?  Without more details, this report is
> unactionable.
> 

I don't know the OPs details but I can reproduce with the following
clumsy snippet:

#!/bin/sh

git init
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config rebase.autostash true
git config core.autocrlf false
echo "*.abcd !eol" > .gitattributes
git add .gitattributes
git commit -m "Add attributes"
echo -e "1\r\n" > test.abcd
git add test.abcd
git commit --no-verify -m "Added test.abcd" test.abcd
echo "*.abcd eol=lf" > .gitattributes
git add .gitattributes
git commit -m "Add attributes (LF)"
git rebase --root --interactive
git rebase --abort
which gives

 ./run.sh
Initialized empty Git repository in E:/projekte/test-init/.git/
[master (root-commit) 7169943] Add attributes
 1 file changed, 1 insertion(+)
 create mode 100644 .gitattributes
[master 61f0599] Added test.abcd
 1 file changed, 2 insertions(+)
 create mode 100644 test.abcd
[master 0acd46a] Add attributes (LF)
 1 file changed, 1 insertion(+), 1 deletion(-)
warning: CRLF will be replaced by LF in test.abcd.
The file will have its original line endings in your working directory
Created autostash: 310f745
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
error: could not read '.git/rebase-merge/head-name': No such file or
directory

and

$ ls -la .git/rebase-merge/
total 5
drwxr-xr-x 1 thomas 197121  0 Jun  3 17:57 ./
drwxr-xr-x 1 thomas 197121  0 Jun  3 17:57 ../
-rw-r--r-- 1 thomas 197121 41 Jun  3 17:57 autostash

I'm running on Windows, both 2.27.0.windows.1 and 2.26.2.windows.1 show
the problem. And I'm pretty sure it is not Windows specific.

Although my test case uses EOL normalization, I think the real issue is
that autostashing for the rebase fails (in the sense that the working
tree is clean afterwards) and that is unexpected.

  reply	other threads:[~2020-06-03 16:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CADhmr77EbC+3f=Oa+bm18Z_SSEMK8vCjNHQniuvkdfaZdRT_5A@mail.gmail.com>
2020-05-30 16:24 ` [BUG?] 'git rebase --abort' couldn't abort aborted rebase Elijah Newren
2020-06-03 16:09   ` Thomas Braun [this message]
2020-06-04 10:19     ` Phillip Wood
2020-06-05 15:29       ` Junio C Hamano
2020-02-07 11:10 SZEDER Gábor
2020-02-07 11:49 ` SZEDER Gábor
2020-02-07 13:21   ` SZEDER Gábor
2020-02-07 17:52     ` Elijah Newren

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=63139842-8548-6c64-1214-5469eedb8d4f@virtuell-zuhause.de \
    --to=thomas.braun@virtuell-zuhause.de \
    --cc=git@vger.kernel.org \
    --cc=naeim249@gmail.com \
    --cc=newren@gmail.com \
    --cc=szeder.dev@gmail.com \
    /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).