* git fetch-pack can't fetch refs/stash
@ 2010-04-29 10:24 Stefan (metze) Metzmacher
0 siblings, 0 replies; only message in thread
From: Stefan (metze) Metzmacher @ 2010-04-29 10:24 UTC (permalink / raw)
To: git
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-01 4:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-29 10:24 git fetch-pack can't fetch refs/stash Stefan (metze) Metzmacher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.