Make "master" branch also available as "main"

Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Make "master" branch also available as "main"

Sandro Santilli-4
Following a recent chat on IRC about a motion, on mapserver-dev
mailing list, for renaming the "master" branch to "main", to
avoid a word which "trivializes a horrific time in history by
re-using the conceptual framework of legalized human ownership for
piddly computer stuff", I've been studying solutions that would make
such transition less painful then when we decided to rename the
main branch from "trunk" to "master"...

Doing a simple rename would entail:

  - Changing all "master" references in CI badges
    (in the README.md of each branch, and on the wiki)

  - Changing all "master" references in CI configurations

  - Updating all developers clones remotes HEAD refenrece
    to point to the new branch

  - Updating all pull requests on all git hosters to still
    point at the main branch (optional, for mirrors, as we
    merge those ones manually anyway).

The above can be painful, but what if we can have the _same_ branch
referenced as both "main" and "master" until all of the above is done ?

Well, the good new is that WE CAN !

The `git` tool supports "symbolic references", so we could keep a
"refs/heads/master" reference be a kind of symbolic link to
"refs/heads/main", so that all users will see 2 branches ("master"
and "main") and will be able to push to any of the two while seeing
the change effectively applied to both.

Such "symbolic references" are not supported by the git protocol,
so they cannot be created on a remote from the client, but we DO
have access to our official repository (we would NOT have this, if
our official repository was on GitHub) so we can do this.

I've done this "symbolic reference" setup on a staging host at osgeo:

  https://dev.git.osgeo.org/gitea/postgis/postgis

You'll see that the default branch there is called "main".
If you clone that repository your local clone will have the "main"
branch checked out. But you'll also see a "main" branch, and whether
you push to "main" or to "master", your changes will be visible in
both branches.

Mirroring should still work, even if mirroring will loose symbolic
references (references will become "hard"). On mirrors this should not
be a problem because branches in mirrors are always overridden by the
mirroring script, so it doesn't matter.

So, would you like me to do this in production ?

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: Make "master" branch also available as "main"

Darafei "Komяpa" Praliaskouski
Hey, the point of the thing is not to add a thing called "main" but to get rid ot the thing called "master" which your plan fails to accomplish. If we go there, go all-in. 

чц, 14 сту 2021, 01:08 карыстальнік Sandro Santilli <[hidden email]> напісаў:
Following a recent chat on IRC about a motion, on mapserver-dev
mailing list, for renaming the "master" branch to "main", to
avoid a word which "trivializes a horrific time in history by
re-using the conceptual framework of legalized human ownership for
piddly computer stuff", I've been studying solutions that would make
such transition less painful then when we decided to rename the
main branch from "trunk" to "master"...

Doing a simple rename would entail:

  - Changing all "master" references in CI badges
    (in the README.md of each branch, and on the wiki)

  - Changing all "master" references in CI configurations

  - Updating all developers clones remotes HEAD refenrece
    to point to the new branch

  - Updating all pull requests on all git hosters to still
    point at the main branch (optional, for mirrors, as we
    merge those ones manually anyway).

The above can be painful, but what if we can have the _same_ branch
referenced as both "main" and "master" until all of the above is done ?

Well, the good new is that WE CAN !

The `git` tool supports "symbolic references", so we could keep a
"refs/heads/master" reference be a kind of symbolic link to
"refs/heads/main", so that all users will see 2 branches ("master"
and "main") and will be able to push to any of the two while seeing
the change effectively applied to both.

Such "symbolic references" are not supported by the git protocol,
so they cannot be created on a remote from the client, but we DO
have access to our official repository (we would NOT have this, if
our official repository was on GitHub) so we can do this.

I've done this "symbolic reference" setup on a staging host at osgeo:

  https://dev.git.osgeo.org/gitea/postgis/postgis

You'll see that the default branch there is called "main".
If you clone that repository your local clone will have the "main"
branch checked out. But you'll also see a "main" branch, and whether
you push to "main" or to "master", your changes will be visible in
both branches.

Mirroring should still work, even if mirroring will loose symbolic
references (references will become "hard"). On mirrors this should not
be a problem because branches in mirrors are always overridden by the
mirroring script, so it doesn't matter.

So, would you like me to do this in production ?

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel

_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: Make "master" branch also available as "main"

Regina Obe
> On Thu, Jan 14, 2021 at 01:18:20AM +0300, Darafei "Kom?pa" Praliaskouski
> wrote:
> > Hey, the point of the thing is not to add a thing called "main" but to
> > get rid ot the thing called "master" which your plan fails to
> > accomplish. If we go there, go all-in.
>
> I know what's the plan, but "go all-in" takes time.
> I'm just offering a way to keep things working in the meanwhile.
>
> --strk;

I'm a -0 for any change at all.
But if we are forced into this change I do like the idea of having a soft - main launch over a no-turning back main.

I'd like to see other projects make the strong-move before we bother.


Thanks,
Regina



_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: Make "master" branch also available as "main"

Sandro Santilli-4
In reply to this post by Darafei "Komяpa" Praliaskouski
On Wed, Jan 13, 2021 at 11:30:56PM +0100, Sandro Santilli wrote:
> On Thu, Jan 14, 2021 at 01:18:20AM +0300, Darafei "Komяpa" Praliaskouski wrote:
> > Hey, the point of the thing is not to add a thing called "main" but to get
> > rid ot the thing called "master" which your plan fails to accomplish. If we
> > go there, go all-in.
>
> I know what's the plan, but "go all-in" takes time.
> I'm just offering a way to keep things working in the meanwhile.

To be more explicit: by doing the "aliasing" thing we can focus
on updating CI configs, local environment, CI badges etc.

As different people will be involved in doing these changes, each
one with at their own pace, it's nice that thing still work for
everybody.

I remember when we went from "trunk" to "master" some contributors
were too annoyed by being unable to do the "rebasing" we asked them
to do (can't remember if it was GEOS or PostGIS) and just gave up
and run away. This would not happen, as the "rebase" would not be
needed at all.

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel