Git development
 help / color / mirror / Atom feed
* [RFC] git stash: add porcelain for sharing stashes through remotes
@ 2026-09-28 14:27 Hanan Arshad
  2026-09-29 22:19 ` brian m. carlson
  0 siblings, 1 reply; 13+ messages in thread
From: Hanan Arshad @ 2026-09-28 14:27 UTC (permalink / raw)
  To: git

Hi,

I'd like to propose adding a small porcelain workflow for sharing
stashes through a Git remote.

git stash export and git stash import already provide a transportable
representation of stashes. I tested the following workflow using
existing commands:

Alice:
  git stash export --print stash@{0}
  git push origin <export-tip>:refs/stashes/alice/wip

Bob:
  git fetch origin refs/stashes/alice/wip:refs/shared-stashes/origin/alice/wip
  git stash import refs/shared-stashes/origin/alice/wip
The imported stash is a normal local stash and retains the original
stash object ID. Removing the remote ref afterward does not affect
Bob's imported stash.

I'd like to add porcelain around this existing mechanism for four operations:

1- publish a selected stash to a remote
2- list available shared stashes
3- get a shared stash as a normal local stash
4- remove a shared stash from the remote

This would not introduce a new stash object format, server-side
service, or synchronization model. It would essentially compose the
existing export/import mechanism with normal push/fetch operations.
Before working on an implementation, I'd appreciate feedback on a few
design points:
1- What remote ref namespace would be appropriate?
2- Should shared stashes use an explicit user-provided name or an
object-derived identifier?
3- Should listing only inspect remote refs, or fetch the export
commits so stash messages can also be displayed?
4- What command naming would fit best with the existing git stash interface?

If the general direction seems reasonable, I can follow up with a more
concrete interface and implementation.

Thanks,
Hanan Arshad

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [RFC] git stash: add porcelain for sharing stashes through remotes
@ 2026-10-01  8:53 Hanan Arshad
  2026-10-01 22:02 ` D. Ben Knoble
  0 siblings, 1 reply; 13+ messages in thread
From: Hanan Arshad @ 2026-10-01  8:53 UTC (permalink / raw)
  To: git

Hi,

I'd like to propose adding a small porcelain workflow for sharing
stashes through a Git remote.

git stash export and git stash import already provide a transportable
representation of stashes. I tested the following workflow using
existing commands:

Alice:
  git stash export --print stash@{0}
  git push origin <export-tip>:refs/stashes/alice/wip

Bob:
  git fetch origin refs/stashes/alice/wip:refs/shared-stashes/origin/alice/wip
  git stash import refs/shared-stashes/origin/alice/wip

The imported stash is a normal local stash and retains the original
stash object ID. Removing the remote ref afterward does not affect
Bob's imported stash.

I'd like to add porcelain around this existing mechanism for four operations:

1. publish a selected stash to a remote
2. list available shared stashes
3. get a shared stash as a normal local stash
4. remove a shared stash from the remote

This would not introduce a new stash object format, server-side
service, or synchronization model. It would essentially compose the
existing export/import mechanism with normal push/fetch operations.
Before working on an implementation, I'd appreciate feedback on a few
design points:
1. What remote ref namespace would be appropriate?
2. Should shared stashes use an explicit user-provided name or an object-derived identifier?
3. Should listing only inspect remote refs, or fetch the export commits so stash messages can also be displayed?
4. What command naming would fit best with the existing git stash interface?

If the general direction seems reasonable, I can follow up with a more
concrete interface and implementation.

Thanks,
Hanan Arshad


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-10-07 10:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28 14:27 [RFC] git stash: add porcelain for sharing stashes through remotes Hanan Arshad
2026-09-29 22:19 ` brian m. carlson
2026-10-05  5:53   ` Hanan Arshad
2026-10-05  7:47     ` Johannes Sixt
2026-10-05  8:03       ` Hanan Arshad
2026-10-05  8:21         ` Johannes Sixt
2026-10-05  9:06           ` Hanan Arshad
2026-10-05 15:25             ` Junio C Hamano
2026-10-07  6:31               ` Hanan Arshad
2026-10-07 10:36                 ` Johannes Sixt
  -- strict thread matches above, loose matches on Subject: below --
2026-10-01  8:53 Hanan Arshad
2026-10-01 22:02 ` D. Ben Knoble
2026-10-01 22:16   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox