Topic on Talk:Download from Git

Keeping up to date (with extensions)

6
Berot3 (talkcontribs)

So I tried to make update. git pull in the mediawiki-folder worked fine. but than the page says:

The new version of core may require newer versions of extensions and skins, so you must go into each extension and skin directory and update it with a command like git pull --recurse-submodules.

so I went to extensions/ and into any folder and run git pull. I always got this error:

You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>

Did I miss something?

Shirayuki (talkcontribs)
Berot3 (talkcontribs)

Thanks. But I wonder if this is necessary? I already pulled the core-repo. Shouldn't there be a command like git submodule update --init to also update all the sub-modules? I don't think it makes sense to go into every extension-subfolder/module and switch branch and pull manually.

Maybe git submodule update --recursive --remote ?

MarkAHershberger (talkcontribs)

When you checkout a submodule (for example, Vector via git submodule update --init skins/Vector), the repository for the submodule is on a specific commit, not a branch. That is the cause of the You are not currently on a branch message.

Release branches for MediaWiki have submodules for all the extensions but the measter branch does not. Which means that, yes, you can use git submodule update --init --recursive on release branches for those extensions included in the release branch, but not on master, as a general rule. (That last submodule command will not change anything if your parent repository is on the same revision as it was when you initially checked out the submodules.)

The exception to this rule for master is if you used git to create submodules for the extensions you install. If you add the Foo extension via git submodule add -f http://example.com/foo.git extensions/Foo, then you can update it later using a git submodule command. If you just want to update the already checked-out branches for any submodules, then the command you're looking for is git submodule foreach git pull.

Berot3 (talkcontribs)

ok, I think I should have clarified that I not intend to be on master. sorry.

I want to clone stable:

  1. clone -b 1.35.1 --depth=1
  2. git submodule update --init

That means I have also the bundled extensions with stable version.

My question now is: Should I update the bundled extensions from time to time when they release new version (or don't they?)?

Or should I wait for the next stable release of mediawiki where I will clone the new bundled extensions?

MarkAHershberger (talkcontribs)
ok, I think I should have clarified that I not intend to be on master. sorry.
No, I understood that. What I said stands.
Should I update the bundled extensions from time to time when they release new version (or don't they?)?
If any of the bundled extensions has a back-ported fix, the MediaWiki version will change. Because of the development that most of core MW and the bundled extensions have used, they tend not to back-port anything but security fixes. Announcements for these updates are made on the announcements mailing list.

So, unless you want to spend the time to follow master or the WMF branches, you don't have to worry about upgrading your extensions outside of the MW update cycle.

Reply to "Keeping up to date (with extensions)"