-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add repositories quickly without full clone (was: can't add private Gitosis repos) #6
Comments
And if you clone the same repository via 'git clone' in the command line, it just clones it without asking about anything? |
Yes. It is 100% standard ssh git cloning with a key pair. $ git clone [email protected]:SearchClient Actually, it appears to be working. I tried a tiny repo (like the one above) and it worked. Perhaps the bigger repo's that I tried to add earlier were simply taking a long time to clone. Perhaps it would be a good idea to display a line or two of status scrolling in the add dialog showing the console output as it is transferring objects (only if not completed after 5 seconds). This would prevent people like me from thinking that it is hung. |
I see... I thought the "please be patient" message would be enough, but you're right that if it takes too long, you start wondering if it really is doing anything. I'll see if I can show some more info... |
It's not obvious that it is actually cloning a repo and that it may take a while. The dialog is simple enough that it appears that it is doing nothing more than simply adding a config line. Perhaps the cloning should be done in the background and the list of repos should have an icon next to each showing that it is currently cloning, cloned, checking. This way the dialog is really just a config entry and not actually performing work. At the same time, the list of repos will give better status info on each. |
Well, that's exactly why there is a spinner and a message "Please be patient, I'm cloning the repository" - so that you don't think it's just adding a config line :) I don't want to run the cloning asynchronously, because until the clone command returns, I have no idea if you've entered a correct URL - maybe you made a typo, maybe you used wrong protocol, or something. |
Try this to quickly verify that the URL is good:
This is what it looks like when the URL is bad:
You can then spawn a 'git remote update' on a thread to fetch all branches. (essentially doing a clone). |
Where is gitifier cloning to? I'm uncomfortable about two clones of the same repo on my system. |
It's mentioned in the readme, the clones are in ~/Library/Caches/net.psionides.Gitifier. Why is that a problem, is your repository very big? |
Ah ok. Didn't realize gitifier was only cloning the .git folder. Not all of the files. My concern was duplicate files showing up in a spotlight search or similar task. Does it pull every time it checks? We've had problems in the past with repo's becoming huge due to binary representations of entire graphic libraries existing in every commit object. |
Specifically, it does a git fetch. This updates the remote/* branch references, and if they did change, then git log is called in the range returned by git fetch. I'm not that familiar with the internal structure of git repos, but I imagine that if those binaries don't change, there would be only one copy stored inside .git... |
I use gitosis to host all my private repos (http://blog.ardes.com/2008/5/19/git-hosting-with-leopard, http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way, http://eagain.net/gitweb/?p=gitosis.git). It uses regular ssh protocol with standard public key - just like github. When I attempt to add any of my repos, the add dialog simply sits and spins forever. It is a little puzzling - ssh with public key works with github - but not with the repos on my own domain hosted via gitosis.
The text was updated successfully, but these errors were encountered: