Skip to content
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

Couldn't find GitHub repo from '.' #16

Closed
zenspider opened this issue Oct 19, 2023 · 7 comments
Closed

Couldn't find GitHub repo from '.' #16

zenspider opened this issue Oct 19, 2023 · 7 comments

Comments

@zenspider
Copy link

given a branch configured like so:

[branch "mybranch"]
	remote = .
	merge = refs/heads/main

(and all of my branches are configured as such (and work fine with other tooling))

it appears that dulwich.porcelain.get_remote_repo comes back with ..

@nedbat
Copy link
Owner

nedbat commented Oct 19, 2023

I haven't seen that before. What sets remote = .? And what does it mean?

@zenspider
Copy link
Author

I had to look this up myself:

   branch.<name>.remote
       ...

       Additionally, . (a period) is the current local repository
       (a dot-repository), see branch.<name>.merge's final note
       below.

   branch.<name>.merge
       ...

       If you wish to setup git pull so that it merges into <name>
       from another branch in the local repository, you can point
       branch.<name>.merge to the desired branch, and use the
       relative path setting . (a period) for
       branch.<name>.remote.

@zenspider
Copy link
Author

Guessing... if the remote url doesn't resolve via branch.<name>.remote, you should fall back to (the python equivalent of):

git config "remote.$(git config remote.pushdefault).url"

@nedbat
Copy link
Owner

nedbat commented Oct 19, 2023

Could you share your full configuration? I don't seem to have git config remote.pushdefault defined.

@zenspider
Copy link
Author

Here's some of it:

advice.skippedcherrypicks=true
core.bare=false
core.filemode=true
core.ignorecase=true
core.logallrefupdates=true
core.precomposeunicode=true
core.repositoryformatversion=0
core.untrackedcache=true
feature.manyfiles=true
index.skiphash=false
merge.ours.driver=true
remote.origin.tagopt=--no-tags
remote.origin.url=git@github.com:zendesk/zendesk.git
remote.pushdefault=origin
taggrouping.groups=v:refs/tags/v(?<name>.*)
taggrouping.singles=

@nedbat
Copy link
Owner

nedbat commented Jan 11, 2024

If this is still happening, can you show the output of git remote -v, and possibly the full .git/config file? I don't understand how to find a GitHub url from what you have.

@zenspider
Copy link
Author

It probably still is happening. I don't know. I wrote my own replacement.

@nedbat nedbat closed this as completed Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants