Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Cloning an empty repository fails. #227

Open
lirenn opened this issue Apr 11, 2019 · 8 comments
Open

Cloning an empty repository fails. #227

lirenn opened this issue Apr 11, 2019 · 8 comments
Assignees
Labels
Approved bug Something isn't working Small

Comments

@lirenn
Copy link
Collaborator

lirenn commented Apr 11, 2019

Cloning an empty repository creates an error message and also prevents any file tracking from occurring when files in the cloned repository are added locally. The graph also doesn't update.

image

image

@lirenn lirenn added bug Something isn't working Small Unapproved the issue that hasn't been approved labels Apr 11, 2019
@Shira-n
Copy link
Collaborator

Shira-n commented Apr 11, 2019

Approve. There are errors for both private and public remote empty repositories.

@theandrewfairweather
Copy link
Collaborator

Approve.

@yianni1
Copy link
Collaborator

yianni1 commented Apr 11, 2019

approve

@yianni1 yianni1 added Approved and removed Unapproved the issue that hasn't been approved labels Apr 11, 2019
@lirenn lirenn self-assigned this Apr 11, 2019
@lirenn
Copy link
Collaborator Author

lirenn commented Apr 11, 2019

After dragging myself through the call stacks of about a dozen files (repositories -> component -> repository -> index -> head -> core), I've finally narrowed it down to the incorrect awaiting of the repo head in core.ts - because the head doesn't exist, all subsequent statements depending on the head fail. There was no try/catch statement and the code assumed the head always existed. The solution I've settled on is to create an empty master/head.

@lirenn
Copy link
Collaborator Author

lirenn commented Apr 12, 2019

This appears to be much harder than anticipated due to the lack of documentation, probably because very few people have reason to create an empty repository without initializing it.

@Shira-n
Copy link
Collaborator

Shira-n commented Apr 12, 2019

Got the same error if open an empty local repository created by our Create Repository feature. Seems to be related to this issue.

image

@lirenn
Copy link
Collaborator Author

lirenn commented Apr 12, 2019

I've managed to get a bit of code working that creates an origin and commits an empty commit to it to act as HEAD, but I get a 401 when I try to push the commit programmatically. The lack of error information provided is not very useful.

image

@lirenn
Copy link
Collaborator Author

lirenn commented Apr 12, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Approved bug Something isn't working Small
Projects
None yet
Development

No branches or pull requests

4 participants