From: "Stefan (metze) Metzmacher" <metze@samba•org>
To: git@vger•kernel.org
Subject: git fetch-pack can't fetch refs/stash
Date: Thu, 29 Apr 2010 12:24:51 +0200 [thread overview]
Message-ID: <4BD95E73.6040709@samba.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 865 bytes --]
Hi,
I tried to fetch refs/stash from my repository (for backup),
however 'git fetch myremote +refs/stash:refs/remotes/myremote/stash'
just fails with $? = 1 (without any output).
That's confusing because 'git ls-remote myremote' shows refs/stash.
After some debugging I found the reason for the problem.
'git fetch-pack /path/to/myremote refs/stash' also just returns
$? = 1.
filter_refs() skips 'refs/stash', because check_ref_format()
returns CHECK_REF_FORMAT_ONELEVEL.
Is that a bug or a feature?
The easiest fix would be to allow CHECK_REF_FORMAT_ONELEVEL to pass in
the same way as CHECK_REF_FORMAT_OK. But I'm not sure if that would
have other side effects.
For now I work around it by doing:
'mkdir stash.d; cd stash.d; ln -s ../stash .'
and use
git fetch myremote +refs/stash.d/stash:refs/remotes/myremote/stash
metze
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
reply other threads:[~2010-05-01 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4BD95E73.6040709@samba.org \
--to=metze@samba$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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