git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "Kristoffer Haugsbakk" <code@khaugsbakk.name>,
	git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Taylor Blau" <me@ttaylorr.com>
Subject: Re: [PATCH v3 1/4] Documentation/git-bundle.txt: mention full backup example
Date: Sat, 16 Nov 2024 15:28:26 +0100	[thread overview]
Message-ID: <31492b4b-e8fa-4598-a975-fef2ec861b80@app.fastmail.com> (raw)
In-Reply-To: <xmqqh68c3vr8.fsf@gitster.g>

On Tue, Nov 12, 2024, at 23:58, Junio C Hamano wrote:
> "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
>
>> Maybe it’s possible but I kind of want to say “okay just pop your
>> stashes and make regular commits/branches”.
>
> That requires _more_ than recording the value of the ref for stash,
> as data for the Nth stash is recorded as the Nth reflog entry for
> that ref, and the reflog data is not what fetch/push/clone/bundle
> commands make available.
>
>> I’m not sure how to formulate that.  Seems clumsy:
>>
>>      refs are included in the bundle (also `refs/stash` but that
>>      particular one won't be included in e.g. a clone):
>>
>> Would it be too drastic to use a footnote?
>
> I am not sure what you want to refer to with "that particular one",
> but the value of refs/stash does get recorded, and making a mirror
> clone out of the resulting bundle does give refs/stash with the
> value of the refs/stash in the original repository where the bundle
> was taken from.  So refs/stash _does_ get included.  What is not
> included is the reflog data for that ref (or any other ref, for that
> matter).
>
> Because the ref value is transferred via fetch/push/clone/bundle but
> the reflog (i.e. past values of a ref) data is *not*, "git stash
> show stash@{4}" is not something you can recreate in the copy of a
> repository, whether you create the copy with "clone" or "bundle +
> clone".  The story is the same for other refs, and stash is not that
> special in this regard.  "git show master@{yesterday}" in a freshly
> created copy would give something entirely different from what you
> would get in the original repository you mirror-cloned or took a
> bundle from.
>
> You'd need "cp -r" for that.

Thanks.  I get it now.

I always forget that the stash uses the reflog.

  reply	other threads:[~2024-11-16 14:28 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-20 19:14 [PATCH 0/4] Documentation/git-bundle.txt: promote --all for full backup kristofferhaugsbakk
2024-10-20 19:14 ` [PATCH 1/4] Documentation/git-bundle.txt: mention --all in Synopsis kristofferhaugsbakk
2024-10-20 19:33   ` Kristoffer Haugsbakk
2024-10-21 21:30     ` Taylor Blau
2024-10-20 19:15 ` [PATCH 2/4] Documentation/git-bundle.txt: mention full backup example kristofferhaugsbakk
2024-10-21 21:32   ` Taylor Blau
2024-10-22 21:18     ` Kristoffer Haugsbakk
2024-10-20 19:15 ` [PATCH 3/4] Documentation/git-bundle.txt: mention --all in spec. refs kristofferhaugsbakk
2024-10-21 21:33   ` Taylor Blau
2024-10-20 19:15 ` [PATCH 4/4] Documentation/git-bundle.txt: discuss naïve backups kristofferhaugsbakk
2024-10-21 21:36 ` [PATCH 0/4] Documentation/git-bundle.txt: promote --all for full backup Taylor Blau
2024-10-22 17:29 ` Taylor Blau
2024-10-22 21:22   ` Kristoffer Haugsbakk
2024-10-29 20:41 ` [PATCH v2 0/3] " kristofferhaugsbakk
2024-10-29 20:41   ` [PATCH v2 1/3] Documentation/git-bundle.txt: mention full backup example kristofferhaugsbakk
2024-11-02  1:27     ` Junio C Hamano
2024-11-06 19:31       ` Kristoffer Haugsbakk
2024-10-29 20:41   ` [PATCH v2 2/3] Documentation/git-bundle.txt: mention --all in spec. refs kristofferhaugsbakk
2024-10-29 20:41   ` [PATCH v2 3/3] Documentation/git-bundle.txt: discuss naïve backups kristofferhaugsbakk
2024-11-02  1:39     ` Junio C Hamano
2024-10-29 22:19   ` [PATCH v2 0/3] Documentation/git-bundle.txt: promote --all for full backup Taylor Blau
2024-11-07 11:57   ` [PATCH v3 0/4] " kristofferhaugsbakk
2024-11-07 11:57     ` [PATCH v3 1/4] Documentation/git-bundle.txt: mention full backup example kristofferhaugsbakk
2024-11-08  2:01       ` Junio C Hamano
2024-11-10 19:38         ` Kristoffer Haugsbakk
2024-11-12 17:31           ` Kristoffer Haugsbakk
2024-11-12 22:58             ` Junio C Hamano
2024-11-16 14:28               ` Kristoffer Haugsbakk [this message]
2024-11-07 11:57     ` [PATCH v3 2/4] Documentation/git-bundle.txt: remove old `--all` example kristofferhaugsbakk
2024-11-07 11:57     ` [PATCH v3 3/4] Documentation/git-bundle.txt: mention --all in spec. refs kristofferhaugsbakk
2024-11-07 11:57     ` [PATCH v3 4/4] Documentation/git-bundle.txt: discuss naïve backups kristofferhaugsbakk
2024-11-07 16:36     ` [PATCH v3 0/4] Documentation/git-bundle.txt: promote --all for full backup Junio C Hamano
2024-11-16 14:54     ` [PATCH v4 " kristofferhaugsbakk
2024-11-16 14:54       ` [PATCH v4 1/4] Documentation/git-bundle.txt: mention full backup example kristofferhaugsbakk
2024-11-16 14:54       ` [PATCH v4 2/4] Documentation/git-bundle.txt: remove old `--all` example kristofferhaugsbakk
2024-11-16 14:54       ` [PATCH v4 3/4] Documentation/git-bundle.txt: mention --all in spec. refs kristofferhaugsbakk
2024-11-16 14:54       ` [PATCH v4 4/4] Documentation/git-bundle.txt: discuss naïve backups kristofferhaugsbakk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31492b4b-e8fa-4598-a975-fef2ec861b80@app.fastmail.com \
    --to=kristofferhaugsbakk@fastmail.com \
    --cc=avarab@gmail.com \
    --cc=code@khaugsbakk.name \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).