libgit2 / libgit2/rugged

Cannot add repository as a submodule if it does not have master branch

Open
#668 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2.3k
Forks
293
PR merge metrics
No merged PRs in 30d

Description

Rugged::SubmoduleCollection#clone_submodule assumes that every repository has master branch. It is usually true but not generally correct. For instance xcode-test-engine for arc has only stable and develop, last one is default. That means I cannot add mentioned repository as a submodule using rugged.

I did a search and found an explanation of how git determines default branch to checkout after git clone.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/rugged/submodule_collection.rb at Rugged::SubmoduleCollection#clone_submodule, where the issue identifies the hard-coded master branch assumption. Review how git chooses a repository's default branch, then verify that adding a repository with stable and develop branches succeeds without master.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, ruby
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.