Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !1375

Merged
Created 12 years ago by Administrator@rootOwner

Default branch auto-discovery

  • Overview 3
  • Commits 6
  • Changes 8

Created by: rspeicher

A Project's default_branch will now be null by default. Upon the first repository push, discover_default_branch gets called. If only one branch exists, we use that. If two branches exist, we prefer the one called master.

Includes a migration, so run those migrations, people!

Closes #803 (closed)

Request to merge github/fork/rspeicher/discover_default_branch into master
  • Download as
  • Email patches

  • Plain diff

Checking approval status

Merged by (Jun 20, 2025 11:06am UTC)

The changes were merged into master with 5e1c63d3

The source branch has been deleted

Mentions #803 (closed)


  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: travisbot

    This pull request passes (merged 5e1c63d3 into 42032956).

    By Administrator on 2012-09-05T05:27:52 (imported from GitLab project)

  • Administrator
    Administrator @root started a thread on commit 5e1c63d3 12 years ago
    app/controllers/commits_controller.rb
    67 67 filename: (@commit.id.to_s + ".patch")
    68 68 )
    69 69 end
    70
    71 protected
    72
    73 def load_refs
    74 if params[:ref].blank?
    75 @branch = params[:branch].blank? ? nil : params[:branch]
    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: NARKOZ

      params[:branch].presence

      By Administrator on 2012-09-05T06:58:13 (imported from GitLab project)

  • Administrator
    Administrator @root · 12 years ago
    Owner

    Created by: dolanor

    I installed the stable version of gitlab 1 day ago (v3.0.3) and I pushed the stable branch of gitlab to my freshly installed gitlab instance. Gitlab still showed me the "new repo" information instead of giving me access to the default branch which was "stable". I tried to force the access by going to /project/tree/stable and it gave me a 404.

    By Administrator on 2012-11-22T17:00:16 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Milestone
No milestone
None
None
Time tracking
No estimate or time spent
0
Labels
None
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
1
1 participant
user avatar
Reference: gpt/large_projects/gitlabhq1!1375
Source branch: github/fork/rspeicher/discover_default_branch

    0 pending comments

Menu

Projects Groups Snippets
Help