🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
2 messages
2 total messages Started by Hanan Arshad Wed, 07 Oct 2026 06:31
Re: [RFC] git stash: add porcelain for sharing stashes through remotes
#6
Author: Hanan Arshad
Date: Wed, 07 Oct 2026 06:31
48 lines
10355 bytes
> All of the three you listed (discovery, transfer, clean-up) become
> easier to work with if you used branches, branches have always had
> good support for these three (and other) operations, and I do not
> see a good reason to add a parallel support to do something similar.

I understand the concern. I think I did not explain the workflow that
originally motivated the RFC clearly enough.

The idea came from a workflow I used with Perforce shelves. One concrete
case is build configuration. The repository contains configuration
templates, while I may have several local configuration variants that
should not become part of the normal project history.

A tester may need to apply the same configuration while testing
different branches or revisions, for example:

    branch A       + configuration X
    branch B       + configuration X
    release branch + configuration X

Using a branch for configuration X makes it another line of history
based on some revision. When the code being tested changes, that
configuration then has to be merged, rebased, cherry-picked, or
otherwise combined with the revision being tested.

What I want instead is an overlay: the tester chooses the code revision
and the temporary configuration independently, applies the
configuration for the test, and then discards it.

Perforce shelves give this kind of temporary handoff a straightforward
user-facing workflow. Git already has the underlying functionality as
well; that became clearer to me during this discussion. A stash can
already be pushed as a ref, so I agree that adding a separate
"publish" command would not be justified.

My motivation for the RFC is therefore not to add another transport or
storage mechanism. It is to see whether the existing stash/ref
functionality could have a more coherent UX for this kind of temporary
handoff, instead of requiring users to compose the generic ref,
push/fetch, and stash operations themselves.

This configuration-overlay workflow is one concrete use case that
motivated the idea. There may be other temporary handoff use cases, but
I do not want to rely on hypothetical cases to justify it.

Thanks,
Hanan
Re: [RFC] git stash: add porcelain for sharing stashes through remotes
#7
Author: Johannes Sixt
Date: Wed, 07 Oct 2026 10:36
43 lines
6638 bytes
Am 07.10.26 um 08:31 schrieb Hanan Arshad:
> A tester may need to apply the same configuration while testing
> different branches or revisions, for example:
> 
>     branch A       + configuration X
>     branch B       + configuration X
>     release branch + configuration X
> 
> Using a branch for configuration X makes it another line of history
> based on some revision. When the code being tested changes, that
> configuration then has to be merged, rebased, cherry-picked, or
> otherwise combined with the revision being tested.
You are overthinking the required workflow.

Nobody claims that you have to keep the configuration X change on an
additional branch for each of the working branches. You would use a
branch only to transfer the configuration X change to other clones. You
don't work on that branch.

In the repository that wants to publish configuration X, you commit the
modifications on ONE branch (doesn't matter which one, say "release"):

	git switch -c configuration-X
	git commit -m"configuration X" -a  # or the config file name
	git push origin +configuration-X
	git checkout release

At this point the state is as if you had run `git stash push` on branch
"release", except the change is on a branch, not in a stash.

Then while on the first branch in a new (or old) clone that needs
configuration X, you run

	git fetch origin
	git show origin/configuration-X | git apply -3

ONCE, which leaves the modifications uncommitted (if there are no
conflicts). From here on, you would use the local stash to transfer the
modifications to other branches, just as you would have done with a
transferred stash.

-- Hannes
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads