Hacker News new | past | comments | ask | show | jobs | submit login

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.




> 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.


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.


> 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?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: