From: Junio C Hamano <gitster@pobox.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] rebase: add --forget to cleanup rebase, leave HEAD untouched
Date: Mon, 31 Oct 2016 12:25:48 -0700 [thread overview]
Message-ID: <xmqqshrctj5v.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CACsJy8CSz-2A56okV6kWBjGqUgiL7DrmmVJ=2jEQhKmqe41cRg@mail.gmail.com> (Duy Nguyen's message of "Thu, 27 Oct 2016 17:40:43 +0700")
Duy Nguyen <pclouds@gmail.com> writes:
> On Wed, Oct 26, 2016 at 11:51 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>>
>>> There are occasions when you decide to abort an in-progress rebase and
>>> move on to do something else but you forget to do "git rebase --abort"
>>> first. Or the rebase has been in progress for so long you forgot about
>>> it. By the time you realize that (e.g. by starting another rebase)
>>> it's already too late to retrace your steps. The solution is normally
>>>
>>> rm -r .git/<some rebase dir>
>>>
>>> and continue with your life. But there could be two different
>>> directories for <some rebase dir> (and it obviously requires some
>>> knowledge of how rebase works), and the ".git" part could be much
>>> longer if you are not at top-dir, or in a linked worktree. And
>>> "rm -r" is very dangerous to do in .git, a mistake in there could
>>> destroy object database or other important data.
>>>
>>> Provide "git rebase --forget" for this exact use case.
>>
>> Two and a half comments.
>>
>> - The title says "leave HEAD untouched". Are my working tree files
>> and my index also safe from this operation, or is HEAD the only
>> thing that is protected?
>
> Everything is protected. I will rephrase the title a bit. The option
> is basically a safe form of "rm -r .git/rebase-{apply,merge}".
We are not in a hurry, as it is not likely that this will hit 2.11
even if we saw a rerolled version yesterday, but it would be nice to
cook it on 'next' so that it can be on 'master' early after the
upcoming release.
Thanks.
next prev parent reply other threads:[~2016-10-31 19:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 9:46 [PATCH] rebase: add --forget to cleanup rebase, leave HEAD untouched Nguyễn Thái Ngọc Duy
2016-10-26 16:51 ` Junio C Hamano
2016-10-27 10:40 ` Duy Nguyen
2016-10-31 19:25 ` Junio C Hamano [this message]
2016-11-09 9:11 ` [PATCH v2] rebase: add --forget to cleanup rebase, leave everything else untouched Nguyễn Thái Ngọc Duy
2016-11-09 20:12 ` Junio C Hamano
2016-11-10 11:09 ` Duy Nguyen
2016-11-10 11:22 ` Duy Nguyen
2016-11-10 19:07 ` Junio C Hamano
2016-11-12 2:00 ` [PATCH v3] " Nguyễn Thái Ngọc Duy
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqshrctj5v.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pclouds@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).