Hacker Newsnew | past | comments | ask | show | jobs | submit | progval's commentslogin

> immutable URL key like issue/pr

they are not immutable because repositories can change URLs (renamed or moved to a different org).


Issue #, commit hashes, etc. are still immutable in this scenario. When you rename or transfer a GitHub repository, all of these keys are preserved.

What I do is store 2 tuples:

Repository: (Id, Org, Repo)

Issue/PR: (Repository.Id, #)

Transferring or renaming a repository is an update to 1 row in this schema.



> This man did not say he was going to bomb anything until after he was voted in

Except Mexico (https://www.vox.com/policy/363146/trump-policy-war-mexico-tr...) and Iran (https://thehill.com/homenews/campaign/4898919-trump-iran-smi...).


wpex also does not need custom client software.


They could at least not keep a picture that shows them with eleven fingers, though (https://web.archive.org/web/20251231080727/https://www.gitmo...)


Doesn't any such cable/adapter violate the USB-C spec? https://www.reddit.com/r/UsbCHardware/comments/10xj74r/why_d...


Depends how it's implemented.

USB-C extension cables aren't allowed, but pass-through charging is allowed. I suspect a $7 cable from a Chinese amazon seller is not spec-compliant, but e.g. Belkin sells a spec-compliant "3.5mm Audio + USB-C Charge Adapter".


Would you even see the same videos they do, given how customized feeds are?


You can find an archive of the links' targets at https://archive.softwareheritage.org/swh:1:dir:5861f19187336...


Interestingly, the repo has a LICENSES folder that contains the text of the licenses used in the repo:

https://archive.softwareheritage.org/browse/directory/ed4b20...

And yep, they only included the most openly permissive ones there (APL2 and MIT), completely skipping everything else. Ugh.


> A tag is a pointer that always refers to the same commit

It's not guaranteed not to change. The UI just makes it harder to update.


And anyone whose coworkers replace tags on a regular basis will be familiar with the following message from git when pulling changes:

would clobber existing tag

Really wish my coworkers would leave old tags as they were heh.


I have a somewhat different use case, where a work project has a moving "latest" tag. I discovered then the --force param with git fetch --tag


A hook should be able to prevent that


Hooks only keep honest people honest :) and an LLM will happily clobber a tag and skip hooks while the user just spams “accept”.


Luckily commonly used forges for collaboration have the ability to make tags immutable. Any repository where multiple people collaborate on a project should have that feature enabled by default. I'm still waiting for the day where tags are immutable by default with no option exposed to change it.

I'm sure that would cause problems for some, but transitive labels already exist in Git: branches.


I dont find the idea of a immutable "descriptive" tag or branch to be that useful (I also dont find the differentiation of tags and branches to be useful either) I've seen plenty of repositories where tags end up being pretty ambiguous compared to each other or where "release-20xx" does not actually point to the official 20xx release. Immutable references are more typically handled by builders and lockfiles to which Git already has a superior immutable reference system, the commit hash.


I 100% agree on the latter (the tag != release is more of a project management issue), and the same concept applies to containers and their digest hashes. The main issue at the end of the day is the human one: most people don't like looking at hashes, nor do they provide context of progression. I would say "give both" and make sure they match on the end user side of things, but tags are the most common way (open source) software releases are denoted.


As long as we can create and delete tags, they will never be immutable, right?


The purpose of the forge is to be able to prevent this. Protected tags are usually a feature which provides a way to mark tags as untouchable, so removal would require a minimum level of trust to the repository on the platform. Otherwise, attempts to push tag deletions or changes for tags matching the protected pattern would be rejected/ignored.

Of course, the repository owner has unlimited privilege here, hence the last part of my prior comment.


Tags are just a text file with a name and the sha of the tag object (with the commit and some metadata/signatures as contents), last I checked. It's deliberately simple and thus almost impossible to actually lock it down in concrete terms.

Packed refs are a little more complicated but all of the storage formats in git are trivial to manually edit or write a tool to handle, in extremis.


That's the purpose of the forge platform, to provide a way to prevent changes to these files from being accept into the source repository. For example:

https://docs.github.com/en/repositories/configuring-branches...

https://docs.gitlab.com/user/project/protected_tags/

https://forgejo.org/docs/latest/user/protection/#protected-t...


Can't solve culture problems with technology, but we all know that by now, right?


That's true for local hooks, but neither a dishonest person nor an LLM can bypass a pre-receive hook on the server (as long as they don't have admin access).


Thanks, apparently most people here aren't familiar with server-side hooks.


But there output is (usually) executable code, and is not committed in a VCS. So the source code is still readable.

When people use LLMs to improve their code, they commit their output to Git to be used as source code.


...hmm, at some point we'll need to find a new place to draw the boundaries, won't we?

Until ~2022 there was a clear line between human-generated code and computer-generated code. The former was generally optimized for readability and the latter was optimized for speed at all cost.

Now we have computer-generated code in the human layer and it's not obvious what it should be optimized for.


> it's not obvious what it should be optimized for

It should be optimized for readability by AI. If a human wants to know what a given bit of code does, they can just ask.


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

Search: