git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philippe Blain <levraiphilippeblain@gmail.com>
To: Henk Smit <hhwsmit@xs4all.nl>, Git mailing list <git@vger.kernel.org>
Subject: Re: I tried the latest git (was: A bug or issue with "git rebase --autostash" not popping the stash automatically)
Date: Mon, 13 Dec 2021 08:53:40 -0500	[thread overview]
Message-ID: <9b2c663e-9637-63b7-f42b-69a6a0b6531a@gmail.com> (raw)
In-Reply-To: <2018444639.308810.1636973639331@ox-webmail.xs4all.nl>

Hi Henk,

Le 2021-11-15 à 05:53, Henk Smit a écrit :
> Hello Philip,
> 
> I just cloned a copy of the git source code.
> And built the "next" branch.
> And tried it myself.
> 
> $ git config --get-regexp alias
> alias.up !git fetch && git rebase --autostash origin
> 
> 
> To my surprise, the stash was applied!
> And changes/conflicts were merged in.
> However, the text put out by git wasn't very clear.
> And the stash was not deleted by itself.
> 
> Created autostash: 6c072c0da335
> Applying autostash resulted in conflicts.
> Your changes are safe in the stash.
> You can run "git stash pop" or "git stash drop" at any time.
> Successfully rebased and updated refs/heads/main.
> $ git stash list
> stash@{0}: autostash
> 
> $ git --version
> git version 2.34.0.rc2.399.gc874808226
> 
> So there is progress!
> The changes are merged/edited in.
> But the stash remains. Imho it should be deleted, if the stash applied without any problems.
> What do you think?
> 

The stash was applied and it resulted in conflicts, so the stash entry stays in the stash
list. The rationale, I think, is that you might not want to deal with that conflict now,
so since the stash is kept, you can 'git checkout HEAD -- .' to remove the conflict and
get back to the file state recorded in HEAD, and deal with the stash later.

> If you and others think the stash should remain, maybe we can add a flag or config-option
> to force the deletion of the stash, after a successful apply? Or would that be too risky?

I think that it could be reasonable for that behaviour to be configurable, yes.

> Could a simple non-git expert like myself do those changes, and offer them to the git project?
> Or do they not trust strangers enough for such changes?

Yes, the Git projects welcomes contributions from everyone. I encourage you to
give 'MyFirstContribution' [1] a read :)

Cheers,

Philippe.

[1] https://git-scm.com/docs/MyFirstContribution

      parent reply	other threads:[~2021-12-13 13:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <763856358.299504.1636971571656@ox-webmail.xs4all.nl>
2021-12-13 13:46 ` A bug or issue with "git rebase --autostash" not popping the stash automatically Philippe Blain
2021-12-14 14:04   ` Henk Smit
     [not found] ` <2018444639.308810.1636973639331@ox-webmail.xs4all.nl>
2021-12-13 13:53   ` Philippe Blain [this message]

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=9b2c663e-9637-63b7-f42b-69a6a0b6531a@gmail.com \
    --to=levraiphilippeblain@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hhwsmit@xs4all.nl \
    /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).