From: Phillip Wood <phillip.wood123@gmail.com>
To: Denton Liu <liu.denton@gmail.com>, Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] rebase: save autostash entry into stash reflog on --quit
Date: Thu, 30 Apr 2020 10:45:15 +0100 [thread overview]
Message-ID: <a349bc81-2098-b2ae-76be-09b18b9229ef@gmail.com> (raw)
In-Reply-To: <20200429002323.GB2570028@generichostname>
Hi Denton
On 29/04/2020 01:23, Denton Liu wrote:
> Hi Junio,
>
> On Tue, Apr 28, 2020 at 12:35:15PM -0700, Junio C Hamano wrote:
>>> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
>>> index f7a6033607..7d0c89a184 100644
>>> --- a/Documentation/git-rebase.txt
>>> +++ b/Documentation/git-rebase.txt
>>> @@ -256,7 +256,8 @@ See also INCOMPATIBLE OPTIONS below.
>>> --quit::
>>> Abort the rebase operation but HEAD is not reset back to the
>>> original branch. The index and working tree are also left
>>> - unchanged as a result.
>>> + unchanged as a result. If a temporary stash entry was created
>>> + using --autostash, it will be saved to the stash reflog.
>>
>> ... let's not do so for end-user facing documentation. "..., it
>> will be stashed away". Or we may not even want to say anything; any
>> "--autostash" user would expect that the changes that were stashed
>> before "rebase" started would not be discarded, and this change may
>> just be a bugfix.
>
> Hmm, in this case, git-merge.txt may need an update as well. From
> 'dl/merge-autostash',
>
> 'git merge --abort' is equivalent to 'git reset --merge' when
> `MERGE_HEAD` is present unless `MERGE_AUTOSTASH` is also present in
> which case 'git merge --abort' applies the stash entry to the worktree
> whereas 'git reset --merge' will save the stashed changes in the stash
> reflog.
>
> and
>
> --quit::
> Forget about the current merge in progress. Leave the index
> and the working tree as-is. If `MERGE_AUTOSTASH` is present, the
> stash entry will be saved to the stash reflog.
>
> both need to be amended to remove the reference to the "stash reflog".
I agree that it would be good to have the documentation for rebase and
merge match in this case
> When I was writing this documentation, I wanted to distinguish between
> the temporary autostash entry and the actual stash since the autostash
> entry isn't pushed to the stash unless there are conflicts or it's
> explicitly saved. I'm not sure that something like "If a temporary stash
> entry was created using --autostash, it will be stashed away" works very
> well since the word "stash" is overloaded here to mean "a random stash
> commit" and "stashed away in _the_ stash". Unfortunately, I'm also
> having trouble coming up with a suitable phrasing of my own.
It's tricky to distinguish between the two, when I was reviewing the
merge --autostash patches I was wary of the mention of the stash reflog
but could not come up with anything better to distinguish between
remembering the stash oid and saving it to the list of stashes. I'm not
too bothered what we end up doing so long as it is consistent across the
commands.
Best Wishes
Phillip
> I dunno, perhaps I'm overthinking this too and your suggested rewording
> sounds good and I'm just being too picky.
>
> Thanks,
>
> Denton
>
next prev parent reply other threads:[~2020-04-30 9:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 9:31 [PATCH] rebase: save autostash entry into stash reflog on --quit Denton Liu
2020-04-28 19:35 ` Junio C Hamano
2020-04-29 0:23 ` Denton Liu
2020-04-30 9:45 ` Phillip Wood [this message]
2020-04-30 9:41 ` Phillip Wood
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=a349bc81-2098-b2ae-76be-09b18b9229ef@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=liu.denton@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).