Skip to content

Impact on the git-scm site if ProGit2 English book changes default branch from master to main? #1501

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

Closed
HonkingGoose opened this issue Sep 9, 2020 · 7 comments

Comments

@HonkingGoose
Copy link
Contributor

I've been figuring out what it would take to change the ProGit2 project's default branch from master to main. I've done a lot of preparatory work already. But I still want to check with you guys what the impact on your end would be. 😉

I made a basic "checklist" issue at progit/progit2#1463, and opened a ProGit2 pull with the necessary changes to their build process at progit/progit2#1464.

Questions:

  • Are you hard-coupled somewhere to fetch stuff from our master branch?
  • Or do you just grab a release from https://github.com/progit/progit2/releases?
  • Is there some other way in which you rely on ProGit2 having a master branch?
  • Maybe there's some other thing that I really should know about from your side?
@peff
Copy link
Member

peff commented Sep 10, 2020

@HonkingGoose Thanks for the heads-up! The main interaction with progit2 repositories is via a nightly job. And it looks like it does refer to master. We really ought to be just using HEAD there (assuming it works via octokit, but I expect it would).

It's also not that big a deal if the job is broken for a day or two (the site would continue to work; we just wouldn't pull new nightly updates). So if we have to just coordinate a flip-over of s/master/main/ that's not that big a deal. However, we pull from translation repositories, too, so we'd really need a per-repo notion of the main branch. But if HEAD is an option, then everything should Just Work as repositories flip their default branches.

@peff
Copy link
Member

peff commented Sep 10, 2020

We really ought to be just using HEAD there (assuming it works via octokit, but I expect it would).

This wasn't quite as trivial as I'd expected, but wasn't too bad: #1502. Once that's merged, then I think we should continue to do the right thing even if the progit2 repo switches its default branch.

@HonkingGoose
Copy link
Contributor Author

On git-scm build process.

Checking if I understand your site-build process correctly:

  • git-scm generates a .html file via the script you linked. This .html build is hard-coded to a master branch for now. prefer HEAD to master in update tasks #1502 makes it so the .html build is no longer hard-coded to a master branch. You host the ProGit2 .html content you generated on your website directly.

  • git-scm just links to the .pdf, .epub (and if present .mobi 👻 ) files from the GitHub hosted ProGit2 release files.


What process should ProGit2 follow with regards to git-scm?

Can you please say what you would like us (ProGit2) to do? That way I can put it in the checklist to increase the chance of a smooth move. 😄 👍

About pulling from translation repositories, per-repo notion of main branch?

I'm not sure what you mean here:

However, we pull from translation repositories, too, so we'd really need a per-repo notion of the main branch.

@peff
Copy link
Member

peff commented Sep 11, 2020

@HonkingGoose I've merged #1502, so I think everything should just work automatically now if you change branch names. When you do, it's probably worth double-checking that any changes that came after the branch name change are reflected on the site after 24 hours. But I don't think we need to otherwise coordinate from here out.

As you noted, the book links just point directly to the release files, so I don't think we should need any change there.

I'm not sure what you mean here:

However, we pull from translation repositories, too, so we'd really need a per-repo notion of the main branch.

We use that same code to pull updates from progit2/progit2 as well as translation repositories (listed here). If we just swapped out heads/master for heads/main in the code, then we'd do the right thing for some repositories but not others (assuming not all of them switched their branch names at the same time). But since we've switched to HEAD, we will just automatically do the right thing for each repository.

I'm going to close this, because I don't think there are any further steps on our side. Thanks again for letting us know. I think the only thing to put on your checklist is confirming that book changes continue to get picked up even after the branch changes.

@HonkingGoose
Copy link
Contributor Author

Hi @peff, thanks for your explanations on how it works at your end! 👍

I've updated my checklist at progit/progit2#1463 to include your advice.

Thanks again for your kind words, and for your help! 👍 😄

@peff peff closed this as completed Sep 11, 2020
@Mohamad1-1994
Copy link

src/KX11/KenticoCleanUpWebFarmServersAndTasks.v11.sql

@Mohamad1-1994
Copy link

src/KX11/KenticoCleanUpWebFarmServersAndTasks.v11.sql

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

3 participants