You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by Steve Lawrence <sl...@apache.org> on 2021/09/02 16:55:25 UTC

Re: Main development branch name change?

I opened a ticket with INFRA and this has been completed. The master
branch has been renamed to 'main' for the following repos:

  https://github.com/apache/daffodil
  https://github.com/apache/daffodil-site
  https://github.com/apache/daffodil-vscode
  https://github.com/apache/daffodil-schema.g8

To update your local master branch to track the ain branch, you can run
the following updates if each of your local clones.

  git branch -m master main
  git fetch asf
  git branch -u asf/main main

If you'd like your forked repo to match, you can go to your forked repo
on GitHub, click Settings > click Branches > click the pencil icon next
to master > enter main > Click Rename branch.

I'll update our wiki and open a pull request to update places where we
still reference the master branch.

- Steve


On 8/30/21 7:33 AM, Steve Lawrence wrote:
> Apache just released the Conscious Language Checker:
> 
>   https://clc.diversity.apache.org/
> 
> Which scans repositories looking for potential issues in conscious
> language. The findings for our repos are here:
> 
>   https://clc.diversity.apache.org/analysis.html?project=daffodil.git
> 
>   https://clc.diversity.apache.org/analysis.html?project=daffodil-site.git
> 
> All of these are easy to fix and I've opened DAFFODIL-2557 to take care
> of them.
> 
> One change that I think requires some discussion/consensus is the use of
> the "master" branch name. Many projects have switched to an alternative,
> and I suggest we do the same. The two most common alternatives I've seen
> are "main" and "develop", which I think "main" being more common. Many
> Apache projects now use this, this is now the default branch for new
> GitHub repos, and I believe git is planning to make the change as well.
> 
> So I suggest we switch to "main" as well.
> 
> Any thoughts on "main" vs "develop", or any other alternatives?
> 
> - Steve
> 


Enable CLC Scans? (was "Main development branch name change?")

Posted by Steve Lawrence <sl...@apache.org>.
Looks like the Conscious Language Checker scans are now opt-in.

Adding our repos to the scans doesn't seem unreasonable to me,
especially since when I saw the scan a few days ago there were very few
findings, and I've opened some PR's to remove most of them. There will
likely continue to be false positives from time to time, but considering
this code base represents many years of development, and there were only
20 or so findings, I'd guess it will require a pretty small effort to
keep up with it.

So, I suggest that we opt-in to continue these scans. If there's no
objections, I'll send an email as Dave suggests and add us back to the
scanner.

Any objections/concerns?

- Steve

On 9/2/21 1:02 PM, Dave Fisher wrote:
> Does the project wish to add these repositories to clc.diversity.apache.org? If so then send an email to dev@diversity.apache.org
> 
> 
>> On Sep 2, 2021, at 9:55 AM, Steve Lawrence <sl...@apache.org> wrote:
>>
>> I opened a ticket with INFRA and this has been completed. The master
>> branch has been renamed to 'main' for the following repos:
>>
>>  https://github.com/apache/daffodil
>>  https://github.com/apache/daffodil-site
>>  https://github.com/apache/daffodil-vscode
>>  https://github.com/apache/daffodil-schema.g8
>>
>> To update your local master branch to track the ain branch, you can run
>> the following updates if each of your local clones.
>>
>>  git branch -m master main
>>  git fetch asf
>>  git branch -u asf/main main
>>
>> If you'd like your forked repo to match, you can go to your forked repo
>> on GitHub, click Settings > click Branches > click the pencil icon next
>> to master > enter main > Click Rename branch.
>>
>> I'll update our wiki and open a pull request to update places where we
>> still reference the master branch.
>>
>> - Steve
>>
>>
>> On 8/30/21 7:33 AM, Steve Lawrence wrote:
>>> Apache just released the Conscious Language Checker:
>>>
>>>  https://clc.diversity.apache.org/
>>>
>>> Which scans repositories looking for potential issues in conscious
>>> language. The findings for our repos are here:
>>>
>>>  https://clc.diversity.apache.org/analysis.html?project=daffodil.git
>>>
>>>  https://clc.diversity.apache.org/analysis.html?project=daffodil-site.git
>>>
>>> All of these are easy to fix and I've opened DAFFODIL-2557 to take care
>>> of them.
>>>
>>> One change that I think requires some discussion/consensus is the use of
>>> the "master" branch name. Many projects have switched to an alternative,
>>> and I suggest we do the same. The two most common alternatives I've seen
>>> are "main" and "develop", which I think "main" being more common. Many
>>> Apache projects now use this, this is now the default branch for new
>>> GitHub repos, and I believe git is planning to make the change as well.
>>>
>>> So I suggest we switch to "main" as well.
>>>
>>> Any thoughts on "main" vs "develop", or any other alternatives?
>>>
>>> - Steve
>>>
>>
> 


Re: Main development branch name change?

Posted by Dave Fisher <wa...@apache.org>.
Does the project wish to add these repositories to clc.diversity.apache.org? If so then send an email to dev@diversity.apache.org


> On Sep 2, 2021, at 9:55 AM, Steve Lawrence <sl...@apache.org> wrote:
> 
> I opened a ticket with INFRA and this has been completed. The master
> branch has been renamed to 'main' for the following repos:
> 
>  https://github.com/apache/daffodil
>  https://github.com/apache/daffodil-site
>  https://github.com/apache/daffodil-vscode
>  https://github.com/apache/daffodil-schema.g8
> 
> To update your local master branch to track the ain branch, you can run
> the following updates if each of your local clones.
> 
>  git branch -m master main
>  git fetch asf
>  git branch -u asf/main main
> 
> If you'd like your forked repo to match, you can go to your forked repo
> on GitHub, click Settings > click Branches > click the pencil icon next
> to master > enter main > Click Rename branch.
> 
> I'll update our wiki and open a pull request to update places where we
> still reference the master branch.
> 
> - Steve
> 
> 
> On 8/30/21 7:33 AM, Steve Lawrence wrote:
>> Apache just released the Conscious Language Checker:
>> 
>>  https://clc.diversity.apache.org/
>> 
>> Which scans repositories looking for potential issues in conscious
>> language. The findings for our repos are here:
>> 
>>  https://clc.diversity.apache.org/analysis.html?project=daffodil.git
>> 
>>  https://clc.diversity.apache.org/analysis.html?project=daffodil-site.git
>> 
>> All of these are easy to fix and I've opened DAFFODIL-2557 to take care
>> of them.
>> 
>> One change that I think requires some discussion/consensus is the use of
>> the "master" branch name. Many projects have switched to an alternative,
>> and I suggest we do the same. The two most common alternatives I've seen
>> are "main" and "develop", which I think "main" being more common. Many
>> Apache projects now use this, this is now the default branch for new
>> GitHub repos, and I believe git is planning to make the change as well.
>> 
>> So I suggest we switch to "main" as well.
>> 
>> Any thoughts on "main" vs "develop", or any other alternatives?
>> 
>> - Steve
>> 
> 


Main development branch name change?

Posted by "Interrante, John A (GE Research, US)" <Jo...@ge.com>.
Right, the downside of running "git fetch" is that it makes it harder to see changes to the current branch.  I like to run "git pull --all" (especially in my "daffodil-asf" checkout) and then "git log ORIG_HEAD..HEAD" and "git diff ORIG_HEAD..HEAD" which shows me what changed in the current (main) branch since my last pull.  That's why I like to have two checkouts, one of the upstream repo as well as one of my forked repo, so I can run these git pull/log/diff commands.

-----Original Message-----
From: Steve Lawrence <sl...@apache.org> 
Sent: Thursday, September 2, 2021 4:37 PM
To: dev@daffodil.apache.org
Subject: EXT: Re: Main development branch name change?

Yeah, it's probably safer to track your forks main branch instead, e.g.

 git branch -u origin/main main

The idea of separate 'main' branches for asf or origin is also probably a good idea as well to be extra safe.

Another thought if you want to be super safe, it might even make sense to not even have a local main branch. There's really nothing that requires it.

Our workflow recommends to do all work in a bug specific branch based off of main, e.g.

  git checkout -b daffodil-123-foo asf/main

Which doesn't need a local main, and makes it pretty hard to push to asf/main accidentally.

And if you ever need to build from asf/main just to test or make a quick experimental change or something, you can always go into a detached HEAD state, e.g.

  git checkout asf/main
  edit ...
  sbt test

Since you're on a detached HEAD, it would be pretty difficult to accidentally push to main.

And if you ever want to update your fork's main, you can do something like

  git fetch asf
  git push origin asf/main:main

And in the rare case we need to force push main (maybe to undo a bad merge or something) we can manually create a main off of asf/main, do the fix, then delete the local main.

There's maybe some potential downsides of it not being very obvious what's been added to main during a fetch.

- Steve


On 9/2/21 3:39 PM, Interrante, John A (GE Research, US) wrote:
> Steve,
> 
> I'm fine with adding the Daffodil repos to the Conscious Language Checker scans (opt-in) since we've already done the work.
> 
> I noticed your instructions for updating local checkouts of forked repos differ slightly from the instructions I see on GitHub after I rename my forked repo's default branch to 'main'.  After I follow GitHub's instructions, my checkout's main branch keeps pointing to my forked repo's main branch like it did before:
> 
> On branch main
> Your branch is up to date with 'origin/main'.
> 
> After I follow your instructions, my checkout's main branch points to Apache Daffodil's upstream repo's main branch instead:
> 
> On branch main
> Your branch is up to date with 'asf/main'.
> 
> Is that orientation really advisable?  Sure, it would be nice to avoid needing to rebase my checkout's main branch on asf/main every now and then to keep my main branch in sync, but if I push anything from my checkout's main branch, it could go directly to the upstream repo instead of my forked repo.  
> 
> I prefer to have two checkouts instead, one named "daffodil-asf" which tracks the upstream repo and another named "daffodil-tuxsf" which tracks my forked repo with "origin" set to my repo and "asf" set to the upstream repo.  If I ever need to push directly to the upstream repo (say to create a new upstream branch), I'll do it in daffodil-asf, otherwise I'll do all of my work and git pushes in daffodil-tuxsf with the certainty that everything I push goes to my forked repo, not the upstream repo.
> 
> John
> 


Re: Main development branch name change?

Posted by Steve Lawrence <sl...@apache.org>.
Yeah, it's probably safer to track your forks main branch instead, e.g.

 git branch -u origin/main main

The idea of separate 'main' branches for asf or origin is also probably
a good idea as well to be extra safe.

Another thought if you want to be super safe, it might even make sense
to not even have a local main branch. There's really nothing that
requires it.

Our workflow recommends to do all work in a bug specific branch based
off of main, e.g.

  git checkout -b daffodil-123-foo asf/main

Which doesn't need a local main, and makes it pretty hard to push to
asf/main accidentally.

And if you ever need to build from asf/main just to test or make a quick
experimental change or something, you can always go into a detached HEAD
state, e.g.

  git checkout asf/main
  edit ...
  sbt test

Since you're on a detached HEAD, it would be pretty difficult to
accidentally push to main.

And if you ever want to update your fork's main, you can do something like

  git fetch asf
  git push origin asf/main:main

And in the rare case we need to force push main (maybe to undo a bad
merge or something) we can manually create a main off of asf/main, do
the fix, then delete the local main.

There's maybe some potential downsides of it not being very obvious
what's been added to main during a fetch.

- Steve


On 9/2/21 3:39 PM, Interrante, John A (GE Research, US) wrote:
> Steve,
> 
> I'm fine with adding the Daffodil repos to the Conscious Language Checker scans (opt-in) since we've already done the work.
> 
> I noticed your instructions for updating local checkouts of forked repos differ slightly from the instructions I see on GitHub after I rename my forked repo's default branch to 'main'.  After I follow GitHub's instructions, my checkout's main branch keeps pointing to my forked repo's main branch like it did before:
> 
> On branch main
> Your branch is up to date with 'origin/main'.
> 
> After I follow your instructions, my checkout's main branch points to Apache Daffodil's upstream repo's main branch instead:
> 
> On branch main
> Your branch is up to date with 'asf/main'.
> 
> Is that orientation really advisable?  Sure, it would be nice to avoid needing to rebase my checkout's main branch on asf/main every now and then to keep my main branch in sync, but if I push anything from my checkout's main branch, it could go directly to the upstream repo instead of my forked repo.  
> 
> I prefer to have two checkouts instead, one named "daffodil-asf" which tracks the upstream repo and another named "daffodil-tuxsf" which tracks my forked repo with "origin" set to my repo and "asf" set to the upstream repo.  If I ever need to push directly to the upstream repo (say to create a new upstream branch), I'll do it in daffodil-asf, otherwise I'll do all of my work and git pushes in daffodil-tuxsf with the certainty that everything I push goes to my forked repo, not the upstream repo.
> 
> John
> 


Main development branch name change?

Posted by "Interrante, John A (GE Research, US)" <Jo...@ge.com>.
Steve,

I'm fine with adding the Daffodil repos to the Conscious Language Checker scans (opt-in) since we've already done the work.

I noticed your instructions for updating local checkouts of forked repos differ slightly from the instructions I see on GitHub after I rename my forked repo's default branch to 'main'.  After I follow GitHub's instructions, my checkout's main branch keeps pointing to my forked repo's main branch like it did before:

On branch main
Your branch is up to date with 'origin/main'.

After I follow your instructions, my checkout's main branch points to Apache Daffodil's upstream repo's main branch instead:

On branch main
Your branch is up to date with 'asf/main'.

Is that orientation really advisable?  Sure, it would be nice to avoid needing to rebase my checkout's main branch on asf/main every now and then to keep my main branch in sync, but if I push anything from my checkout's main branch, it could go directly to the upstream repo instead of my forked repo.  

I prefer to have two checkouts instead, one named "daffodil-asf" which tracks the upstream repo and another named "daffodil-tuxsf" which tracks my forked repo with "origin" set to my repo and "asf" set to the upstream repo.  If I ever need to push directly to the upstream repo (say to create a new upstream branch), I'll do it in daffodil-asf, otherwise I'll do all of my work and git pushes in daffodil-tuxsf with the certainty that everything I push goes to my forked repo, not the upstream repo.

John