3 ms·
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
by masklinn 10y ago
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.
- jsmthrowaway 10y agoWhat would you prefer GitHub do? Display multiple licenses? I see that situation as not really solvable.
- tetrep 10y agoWhy 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.
- dominotw 10y agoI would think that would be UI overload for such an edge case.
- masklinn 10y ago> What would you prefer GitHub do? The license of the currently selected branch?
- SamBam 10y agoThis 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.)
- barneybooroo 10y agoI 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.
- in_the_sticks 10y agoChange 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.
- masklinn 10y ago> 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.
- theli0nheart 10y agoIt 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.
- masklinn 10y ago> 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?