logoalt Hacker News

po1ntyesterday at 8:16 PM8 repliesview on HN

It's not about unexpected changes. It's about DX in git CLI. You don't want to see massive diffs that are basically unreadable for humans, you just want to see that the file changed.


Replies

selcukayesterday at 11:36 PM

> you just want to see that the file changed

I check the diff for uv.lock (Python counterpart of package-lock.json) every time I merge a PR. It is important to know which direct or transient dependencies have been updated. We don't blindly bump all dependencies to the latest versions (you shouldn't either).

show 3 replies
jitixtoday at 7:46 PM

If your diffs are too large to review your project structure needs change. I go by the broad statement that EVERY line should be read, understood and explainable by the developer.

For critical files like package-lock.json I'd also expect developers to explain why a library was added or a version was changed and the impact of the version change. The lack of such basic hygiene is why supply chain attacks are so common these days.

jeromegvyesterday at 11:10 PM

But it's not always massive, it's a good practice to see what the diff is and ensure there is no weird dependency (aka supply chain attack) showing up in there.

show 1 reply
palatatoday at 9:23 AM

Are you saying "as a developer, you don't want to see what code you ship as transitive dependencies"?

I guess it's the norm in the software industry, but that's slightly irresponsible.

show 1 reply
StarlaAtNighttoday at 10:48 AM

You know what’s bad DX? Your company’s product having a massive security breach, people stop using it, and having to lay off all the software engineers

gpvosyesterday at 9:32 PM

DX = ? Developer experience maybe?

show 1 reply
nine_kyesterday at 10:46 PM

The point is that it should not be massive.

show 1 reply
sublineartoday at 12:52 AM

It's a CLI. DX is not the only concern. What about scripts that expect the default git behavior?

You could argue "those scripts are dumb then! outta my way!", but then you shouldn't be using a CLI for whatever it is you're trying to do. If you insist, you can just grep or use the --stat option.

We already know the git CLI has plenty of antifeatures like this. It is up to the devs how they want to proceed, but it doesn't change the fact that hiding things is a footgun.

show 1 reply