Project

General

Profile

Misc #15843

Make "trunk" a symbolic-ref of "master" on git.ruby-lang.org

Added by k0kubun (Takashi Kokubun) 3 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
[ruby-core:92625]

Description

Background

  • We're using trunk branch as a canonical development branch because it has been mirrored to there by git-svn.
  • In a usual git repository, a HEAD branch is master by default. Using trunk instead of master is confusing and causes typo on git operations or typing git-related URLs.
  • We can make an alias branch by using symbolic-ref on git.ruby-lang.org:ruby.git. We can start using master branch without disturbing any trunk usage. Why not use it?

Proposed schedule

  • 2019
    • 5/22: Announce this schedule (done)
    • 5/23: Make master symbolic-ref pointing to trunk on git.ruby-lang.org (done)
    • 5/23~6/30: Ask maintainers of CI (or whatever integrated with the repository) to explicitly use master branch instead of trunk at ruby-core mailing list. (asked)
    • 7/1: Switch HEAD on git.ruby-lang.org from trunk to master, and reverse the symbolic-ref direction (change the default branch of GitHub ruby/ruby to master too) (done)
      • sudo -u git bash -c "cd /var/git/ruby.git && mv refs/heads/trunk refs/heads/master && git symbolic-ref refs/heads/trunk refs/heads/master"
  • 2020
    • 1/1: Drop trunk branch on git.ruby-lang.org
      • sudo -u git bash -c "cd /var/git/ruby.git && rm refs/heads/trunk"

Expected outcome

  • 2019
    • 5/23:
      • git push to trunk branch of git.ruby-lang.org will be reflected to both trunk and master branches of git.ruby-lang.org immediately.
      • git push to master branch of git.ruby-lang.org will also be reflected to both trunk and master branches of git.ruby-lang.org immediately.
      • Both of trunk and master branches on GitHub will be always mirrored.
    • 7/1:
      • git clone checks out master instead of trunk by default.
  • 2020
    • 1/1:
      • trunk branch cannot be git fetched and git pushed anymore.

Related issues

Related to Ruby master - Misc #14632: [ANN] git.ruby-lang.orgClosedActions

History

#1

Updated by k0kubun (Takashi Kokubun) 3 months ago

  • Related to Misc #14632: [ANN] git.ruby-lang.org added

Updated by usa (Usaku NAKAMURA) 3 months ago

I don't disagree this proposal.
But, I want to know what do you mean in the term "Out of scope (for a short term)".
What is "short" ?

Updated by ko1 (Koichi Sasada) 3 months ago

If you change something, pls tell your schedule and we can check the CI system.

Updated by nobu (Nobuyoshi Nakada) 3 months ago

I'm negative against the Main part (moving the branch) immediately, which seems a too big change.
Why not making "master" as a symbolic-ref at first?

Updated by k0kubun (Takashi Kokubun) 3 months ago

  • Description updated (diff)

If you change something, pls tell your schedule and we can check the CI system.

Sure. I updated the description.
Once I make a symbolic-ref tomorrow, I'll post an email to ruby-core to share the schedule and ask for updating CI system to use master branch.

But, I want to know what do you mean in the term "Out of scope (for a short term)".
What is "short" ?

I included a concrete schedule for all related operations in the new description. Because mame (Yusuke Endoh) is going to make a big change in ruby-commit-hook check-email.rb in 2020, I'm thinking about making the last operation happen at the similar timing.

I'm negative against the Main part (moving the branch) immediately, which seems a too big change.
Why not making "master" as a symbolic-ref at first?

The new schedule adopted your proposal. "making master as a symbolic-ref at first" will be done tomorrow as the first step.

For "moving the branch", I split the operation to "changing HEAD" and "mv refs/heads/trunk refs/heads/master", and planned to make the former on 2019/7/1 and the latter on 2020/1/1.

#6

Updated by k0kubun (Takashi Kokubun) 3 months ago

  • Description updated (diff)
#7

Updated by k0kubun (Takashi Kokubun) 3 months ago

  • Description updated (diff)

Updated by k0kubun (Takashi Kokubun) 3 months ago

  • Assignee set to k0kubun (Takashi Kokubun)
  • Status changed from Open to Assigned

Updated by duerst (Martin Dürst) 3 months ago

Please not only give us a schedule, but tell us exactly (in terms of git commands) what this means for people which are not totally familiar with git. Please do NOT assume that everybody "just knows".

Updated by k0kubun (Takashi Kokubun) 3 months ago

  • Description updated (diff)

Sorry for your inconvenience, it was originally written in the ticket but I somehow deleted that in the later edit. I just resurrected the "Expected outcome" section in the original description.

#11

Updated by k0kubun (Takashi Kokubun) 3 months ago

  • Description updated (diff)
#12

Updated by k0kubun (Takashi Kokubun) 3 months ago

  • Description updated (diff)
#13

Updated by k0kubun (Takashi Kokubun) 3 months ago

  • Description updated (diff)

Updated by MSP-Greg (Greg L) 3 months ago

Maybe the changes to RUBY_DESCRIPTION (ruby -v) and RUBY_REVISION could be noted somewhere...

Updated by k0kubun (Takashi Kokubun) 3 months ago

If you're talking about 5da52d1210625fb00acd573b3f32281b4bde1730 and a205e24747497391390ef7c004293a8a7934dd96, that's not related to this ticket. Please comment on #14632 or in a new ticket instead.

Updated by k0kubun (Takashi Kokubun) about 2 months ago

Log:

k0kubun@svn:/var/git/ruby.git$ pwd
/var/git/ruby.git
k0kubun@svn:/var/git/ruby.git$ cat refs/heads/trunk
c5eb24349a4535948514fe765c3ddb0628d81004
k0kubun@svn:/var/git/ruby.git$ cat refs/heads/master
ref: refs/heads/trunk
k0kubun@svn:/var/git/ruby.git$ sudo -u git bash -c "mv refs/heads/trunk refs/heads/master && git symbolic-ref refs/heads/trunk refs/heads/mast
er"
[sudo] password for k0kubun:
k0kubun@svn:/var/git/ruby.git$ cat refs/heads/master
c5eb24349a4535948514fe765c3ddb0628d81004
k0kubun@svn:/var/git/ruby.git$ cat refs/heads/trunk
ref: refs/heads/master

Updated by k0kubun (Takashi Kokubun) about 2 months ago

Switching "trunk" to "master" in both git.ruby-lang.org/ruby.git and github.com/ruby.git is finished. I'll update some CI configurations and notify some details to you after that.

Updated by k0kubun (Takashi Kokubun) about 2 months ago

  • Status changed from Assigned to Closed

Hi all,

Switching the default branch "trunk" to "master" is successfully completed.
You can continue to git push to trunk, but it's recommended to switch to use master on your local workflow.

For your pull requests on GitHub, if your base revision is newer than 3d1536e61812dab1f4c226eb60356fd238ab6bb8, you'd like to point your PR to master, and trunk otherwise, so that CIs on PR will run correctly.
This applies to your old PRs too. If you rebase your PR against a revision newer than 3d1536e61812dab1f4c226eb60356fd238ab6bb8, that's the time you should switch your PR's merge target from trunk to master.

I'm going to close this ticket now. Though there's still a remaining operation, deleting the trunk branch on Jan 1st, 2020.
From now on, you're encouraged to stop referring to trunk branch at all, while it's supposed to work for about 6 months from now.

Thank you,
k0kubun

#19

Updated by k0kubun (Takashi Kokubun) about 2 months ago

  • Description updated (diff)

Updated by k0kubun (Takashi Kokubun) about 2 months ago

In https://bugs.ruby-lang.org/issues/15843#note-16, I forgot to switch git.ruby-lang.org's HEAD to master (but it actually worked maybe because symbolic-ref is recursively resolved). Anyway, now I did:

k0kubun@svn:/var/git/ruby.git$ cat HEAD
ref: refs/heads/trunk
k0kubun@svn:/var/git/ruby.git$ cat refs/heads/trunk
ref: refs/heads/master
k0kubun@svn:/var/git/ruby.git$ cat refs/heads/master
dbe834ab5ac4f90df5db9fc314b45890726cca3b
k0kubun@svn:/var/git/ruby.git$ sudo -u git bash -c "git symbolic-ref HEAD refs/heads/master"
[sudo] password for k0kubun:
k0kubun@svn:/var/git/ruby.git$ cat HEAD
ref: refs/heads/master
k0kubun@svn:/var/git/ruby.git$ cat refs/heads/trunk
ref: refs/heads/master
k0kubun@svn:/var/git/ruby.git$ cat refs/heads/master
dbe834ab5ac4f90df5db9fc314b45890726cca3b

Also available in: Atom PDF