Bug 580877 - doesn't support defining a URL in remote of a branch directly.
Summary: doesn't support defining a URL in remote of a branch directly.
Status: NEW
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: All Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-08 17:14 EDT by teo tei CLA
Modified: 2022-10-08 17:14 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description teo tei CLA 2022-10-08 17:14:55 EDT
I observed the bug in MeGit so I reported it to them, but they say the bug belongs to JGit which they are using.

https://github.com/eclipsesource/megit/issues/22

These two configurations are equally valid in `.git/config` for a repository as far as Git is concerned:

A:
```
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[branch "master"]
        remote = git@github.com:xxxxxxx/yyyyyyy.git
        merge = refs/heads/master
```

B:
```
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        url = git@github.com:xxxxxxx/yyyyyyy.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master
```

and they both result in being able to do "git push" and "git pull" from the command line with no errors.

However, JGit doesn't seem to support the first one.

In MeGit I get the following error when trying to pull:

"The current branch is not configured for pull
No value for key remote.git@github.com:xxxxxxx/yyyyyyy.git.url found in configuration"

I'm not sure whether the actual error message comes from JGit directly.