Re: [feature suggestion] Add 'git stash export', 'git stash import' commands to allow to backup stash externally

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

 



"Randall S. Becker" <rsbecker@xxxxxxxxxxxxx> writes:

> I would like to suggest another option: Teach clone and fetch to
> transfer stash commits. They are filtered out normally. It might
> be straightforward to preserve the stashed commits. A mirror
> approach is probably not appropriate since that needs the repo to
> be bare and Yuri's situation is unlikely to support that. So
> something like --include-stashes, which would be off by default.

It would unfortunately not work, since stash is not implemented as a
set of regular refs.  Instead its entries are kept in reflogs.  And
because the reflog is treated as an entierly local matter, reflog
entries are not transfered across fetches and clones.

If stash are redesigned so that each of its entry becomes a separate
ref (e.g. refs/stash/0 refs/stash/1 refs/stash/2 ...), then

    git bundle stash.bndl $(git for-each-ref --format='%(refname)' refs/stash/\*)

might become the beginning of a viable implementation of "stash
export" (but note that the above does not list any stopping point of
the history traversal, so it is just the beginning and does not make
a practical solution).




[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