{"thread":{"id":"66432","subject":"[RFC] git stash: add porcelain for sharing stashes through remotes","startedAt":"2026-10-01T08:53:37Z","lastAt":"2026-10-01T22:16:21Z","messageCount":3,"participants":["Hanan Arshad","D. Ben Knoble","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"553819","messageId":"20261001085330.73586-1-hananarshad619@gmail.com","threadId":"66432","inReplyTo":null,"subject":"[RFC] git stash: add porcelain for sharing stashes through remotes","fromName":"Hanan Arshad","fromEmail":"hananarshad619@gmail.com","sentAt":"2026-10-01T08:53:09Z","receivedAt":"2026-10-01T08:53:37Z","isPatch":false,"body":"Hi,\n\nI'd like to propose adding a small porcelain workflow for sharing\nstashes through a Git remote.\n\ngit stash export and git stash import already provide a transportable\nrepresentation of stashes. I tested the following workflow using\nexisting commands:\n\nAlice:\n  git stash export --print stash@{0}\n  git push origin <export-tip>:refs/stashes/alice/wip\n\nBob:\n  git fetch origin refs/stashes/alice/wip:refs/shared-stashes/origin/alice/wip\n  git stash import refs/shared-stashes/origin/alice/wip\n\nThe imported stash is a normal local stash and retains the original\nstash object ID. Removing the remote ref afterward does not affect\nBob's imported stash.\n\nI'd like to add porcelain around this existing mechanism for four operations:\n\n1. publish a selected stash to a remote\n2. list available shared stashes\n3. get a shared stash as a normal local stash\n4. remove a shared stash from the remote\n\nThis would not introduce a new stash object format, server-side\nservice, or synchronization model. It would essentially compose the\nexisting export/import mechanism with normal push/fetch operations.\nBefore working on an implementation, I'd appreciate feedback on a few\ndesign points:\n1. What remote ref namespace would be appropriate?\n2. Should shared stashes use an explicit user-provided name or an object-derived identifier?\n3. Should listing only inspect remote refs, or fetch the export commits so stash messages can also be displayed?\n4. What command naming would fit best with the existing git stash interface?\n\nIf the general direction seems reasonable, I can follow up with a more\nconcrete interface and implementation.\n\nThanks,\nHanan Arshad\n\n"},{"id":"553872","messageId":"CALnO6CBL552Ny8-cqo9EE0uy6j-TMszJFRrRuTOFC=nRJEv5qw@mail.gmail.com","threadId":"66432","inReplyTo":"20261001085330.73586-1-hananarshad619@gmail.com","subject":"Re: [RFC] git stash: add porcelain for sharing stashes through remotes","fromName":"D. Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2026-10-01T22:02:39Z","receivedAt":"2026-10-01T22:02:52Z","isPatch":false,"body":"On Thu, Oct 1, 2026 at 5:37 AM Hanan Arshad <hananarshad619@gmail.com> wrote:\n>\n> Hi,\n\nHi Hanan, did you mean to send a copy of your prior thread\n(https://lore.kernel.org/git/CAKPibBw2XxjGpE_DZrWLZmMHs7kAyvOaP8504kfoh61c4UkGyg@mail.gmail.com/)\n?\n\n-- \nD. Ben Knoble\n"},{"id":"553873","messageId":"xmqqzewx2hji.fsf@gitster.g","threadId":"66432","inReplyTo":"CALnO6CBL552Ny8-cqo9EE0uy6j-TMszJFRrRuTOFC=nRJEv5qw@mail.gmail.com","subject":"Re: [RFC] git stash: add porcelain for sharing stashes through remotes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-10-01T22:16:17Z","receivedAt":"2026-10-01T22:16:21Z","isPatch":false,"body":"\"D. Ben Knoble\" <ben.knoble@gmail.com> writes:\n\n> On Thu, Oct 1, 2026 at 5:37 AM Hanan Arshad <hananarshad619@gmail.com> wrote:\n>>\n>> Hi,\n>\n> Hi Hanan, did you mean to send a copy of your prior thread\n> (https://lore.kernel.org/git/CAKPibBw2XxjGpE_DZrWLZmMHs7kAyvOaP8504kfoh61c4UkGyg@mail.gmail.com/)\n> ?\n\nPerhaps they sent a wrong message after they composed a message to\nrespond to the excellent idea-review made by Brian?\n"}]}