News for hackers. Stuff that matters.
Re:License now displayed on repository overview by infodroid on Wednesday September 21, 2016 @07:06PM (#12553066)
...but it is only visible if you are logged in. That inconsistency is a little weird.
Re:License now displayed on repository overview by masklinn on Thursday September 22, 2016 @03:59AM (#12555268)
And as with many other information (such as the bloody fucking search) it's only taking in account the repository's main branch and ignoring all others, if you decide to relicense in a branch for some reason that will not be displayed by github.
Re:License now displayed on repository overview by jsmthrowaway on Thursday September 22, 2016 @06:54AM (#12555911)
What would you prefer GitHub do? Display multiple licenses? I see that situation as not really solvable.
Re:License now displayed on repository overview by tetrep on Thursday September 22, 2016 @08:02AM (#12556208)
Why not apply the same solution already applied to branches? Have a drop down that lists the different branches and their licenses, with it sorted such that the branches with different licenses are displayed first.
Re:License now displayed on repository overview by dominotw on Thursday September 22, 2016 @10:01AM (#12556847)
I would think that would be UI overload for such an edge case.
Re:License now displayed on repository overview by masklinn on Thursday September 22, 2016 @08:27AM (#12556304)
> What would you prefer GitHub do?

The license of the currently selected branch?

Re:License now displayed on repository overview by SamBam on Thursday September 22, 2016 @10:26AM (#12556985)
This seems like a pretty niche problem. Maybe in your ecosystem this is common, but I work in OSS and haven't seen this yet.

In all cases with more "complex licensing," you need to see the project's own license file. GitHub's little UI icon isn't legally-binding in any way. It's just a simple UI addition that works in the vast majority of cases.

In a Google search for "git branch different license," I don't see anyone else discussing licensing their projects this way. I'm not saying it isn't valid, it just seems really rare.

Your proposed solution wouldn't necessarily work for the (much more common, in my experience) situation where some branches, like deployment branches, omit the license all together. In those situations, those branches are typically under the same license as the main project. (As always, though, the final word should be in the project's license file.)

Re:License now displayed on repository overview by barneybooroo on Friday September 23, 2016 @07:37AM (#12563799)
I agree there's not an elegant UI solution beyond "use master branch's licence unless current branch has one" but it doesn't seem like too much of an edge case to me, particularly if you're serving a GitHub pages site on a gh-pages branch, or docs, which will very possibly come under a different licence.
Re:License now displayed on repository overview by in_the_sticks on Thursday September 22, 2016 @08:11AM (#12556237)
Change what your main branch is?

The old license is still applicable to the old code. If you're changing the license for future development and not pushing it to the main branch for some reason, it looks like you've got a new main branch.

Re:License now displayed on repository overview by masklinn on Thursday September 22, 2016 @08:30AM (#12556314)
> Change what your main branch is?

1. That makes no sense, the "main branch" has a semantic for the project whether it's the current development HEAD or the current STABLE or whatever other concept you appli to it.

2. That doesn't fix the issue, which is that different branches can have different licenses (and with respect to search do have different contents).

> The old license is still applicable to the old code.

Yes, and if you change the "main branch" you end up with the same fuck up, namely that older releases/branches are now marked with the new license, which is not any more correct than the reverse.

That is, the license is metadata of a specific revision of a project (and technically subtrees can even have different licenses), not of the project as a whole, the project can be relicensed at any time.

Re:License now displayed on repository overview by theli0nheart on Thursday September 22, 2016 @08:37AM (#12556346)
It makes perfect sense. The code that GitHub displays when you hit the project page is from the main branch. It then follows that it makes the most sense to display the license that pertains specifically to the code which you see by default.

If one wants to checkout a non-main branch, ostensibly they can view the LICENSE file in that branch on their own.

Re:License now displayed on repository overview by masklinn on Thursday September 22, 2016 @08:41AM (#12556369)
> It makes perfect sense.

It doesn't make any sense to show the license of the main branch when I just switched to a different one, no. If they want to take the lazy route, just stop showing licenses on anything but the main branch.

And incidentally they could use that new feature to remove the search bar when not on the main branch since that's not going to search the current branch, but it won't provide any warning or indication that you're not searching what you thought you were.

> The code that GitHub displays when you hit the project page is from the main branch.

You are aware that github has a branch switcher right there on the "project page" right?

Re:License now displayed on repository overview by shakeel_mohamed on Wednesday September 21, 2016 @08:58PM (#12553527)
This seems very odd, I wonder if it's a bug or by design
Re:License now displayed on repository overview by SpaceManiac on Thursday September 22, 2016 @02:38AM (#12554915)
I'm gonna guess it's temporary; I get the impression GitHub likes to test its changes before it releases them (I've been seeing the announced license indicator for several days), and that probably goes extra for logged-out users.
Re:License now displayed on repository overview by lorenzhs on Thursday September 22, 2016 @05:44AM (#12555684)
Yeah, I have been seeing it for a few weeks now and was actually looking for an announcement - I thought it was a bit weird when I didn't find one. The indicator not being shown for non-logged in users is probably just a consequence of a staged rollout.
Re:License now displayed on repository overview by tomschlick on Thursday September 22, 2016 @08:29AM (#12556309)
Yeah I'm guessing they just turned it on for 100% and haven't removed the feature flag yet which hides it from logged out users.