Thread (7 messages) 7 messages, 6 authors, 2016-06-15

Re: Alternates and push

flat view

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:19

Jon Smirl [off-list ref] wrote:
On 9/6/08, Junio C Hamano [off-list ref] wrote:
quoted
Theodore Tso [off-list ref] writes:

 > Long-standing mis-feature in git's logic in deciding what to push.
 > It's been reported a few times, but apparently it's hard to fix, or at
 > least it never hsa been fixed as far as I know.


This comes from an early (mis)design of git.
What happens if I set a remote in my github digispeaker repo pointing
to github's linus repo and the set a chron script to fetch it once a
day? The alternates link is still in place.
github should do what repo.or.cz does:

	ln -s .../linus.git/refs digispeaker.git/refs/forkee

That way the refs available in Linus' tree are also available
in your tree as Git will transparently follow the symlink.

However you have to be careful to make sure `git pack-refs` isn't
run with `--all --prune` as it will delete the refs from linus.git
when executed in digispeaker.git.  Fun times when I did that to my
own repository one day.  ;-)

Though we probably should fix Git to be somewhat smarter.  But
until that stable binary is available, the symlink trick above
is a good work around.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help