Re: I tried the latest git (was: A bug or issue with "git rebase --autostash" not popping the stash automatically)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux