Andy Parkins [ARCHIVE] on Nostr: π
Original date posted:2013-10-04 π Original message:On Friday 04 October 2013 ...
π
Original date posted:2013-10-04
π Original message:On Friday 04 October 2013 13:32:47 you wrote:
> > There is more to a git branch than just the overall difference. Every
> > single
> > log message and diff is individually valuable.
>
> When the log messages don't accurately describe the contents of the diff,
> it's just misinformation and noise. Everyone starts out by wanting a neat
> collection of easy to understand and review commits, but in practice it's
> extremely hard to always get it.
Then your request should be for better commits, not for just squashing the lot
into some incoherent blob.
The alternatives under discussion are:
- Coder produces long chain of commits on feature branch. Compresses them,
throwing away any individual and accurate messages into one large diff. It's
unlikely you'll get a log message that is as descriptive in the large one if
you made them throw away the little ones. Large diff is offered for review.
Review is of one large diff.
- Coder produces long chain on commits on feature branch. Offers them for
review. Reviewer only likes to review large diffs, so uses the tools
available to produce it.
Exactly the same diff is being reviewed, but in one case you're throwing away
information. There is no getting that information back ever.
You're also discarding the advantages of individual commits.
- Merges are considerably harder than rebases. You have to resolve all the
conflicts at once with a merge, with a rebase you can resolve them with the
log message and original isolated diff to help you.
- Bisect doesn't give as fine-grained an answer.
> I know how to make squashed commits, thanks. I've done LOTS of code review
Excellent. Don't take it personally -- I only offered it in case you didn't
know. Not everyone is familiar with git plumbing.
> in my life. I'm making a point here as one of the few people who goes
> through large pull requests and reviews them line by line. It's hard,
That doesn't make you the only person who does code reviews. I do plenty of
reviews here; they're just not bitcoin reviews. Obviously we're talking about
bitcoin, so you get to decide in the end.
> partly because github sucks, and partly because reviewing lots of small
> commits sucks.
I'm not suggesting you review lots of small commits anyway. I can't comment
on whether github sucks or not -- that's obviously personal preference.
However, nothing stops you doing reviews on your own local checkout.
> There's nothing that makes a single large commit harder to review. It's the
> same amount of code or strictly less, given the tendency for later commits
That's not true. There are often lots of small changes that are manifestly
correct -- let's use string changes as an example -- in the large commit, they
are just noise. You want to be able to focus on the hard commits. However --
I am not trying to persuade you to review small commits, I'm trying to
persuade you not to throw away the small commits, gone forever, merely because
your preference is to review large commits.
> to change earlier ones. You can easily search the entire change whilst
> reviewing. There are lots of things that make it easier.
Since the large commit is always available, no facilities have been lost.
Personally I work hard in my repositories to make coherent, small, well
described commits. If I had gone to that effort for a bitcoin branch only to
be told to collapse them all and throw away that effort, I'd think I'd been
wasting my time.
Andy
--
Dr Andy Parkins
andyparkins at gmail.com
Published at
2023-06-07 15:07:18Event JSON
{
"id": "c31572116ceec960c9fe6ea0f1d95657ab84a995a4856e7f8f0cbfff98fad27c",
"pubkey": "99bec497728c848e65549d1a5257d08de97621edcb4b77073269a45dac708d59",
"created_at": 1686150438,
"kind": 1,
"tags": [
[
"e",
"c5a68e6f904af4bb9ba26063f532146fb896046fee8fed7dd28cab691644cf81",
"",
"root"
],
[
"e",
"02d678d68e1723b197537e14a3c6108bbc542bd2410a3778a5c7431f0929c32f",
"",
"reply"
],
[
"p",
"f2c95df3766562e3b96b79a0254881c59e8639f23987846961cf55412a77f6f2"
]
],
"content": "π
Original date posted:2013-10-04\nπ Original message:On Friday 04 October 2013 13:32:47 you wrote:\n\u003e \u003e There is more to a git branch than just the overall difference. Every\n\u003e \u003e single\n\u003e \u003e log message and diff is individually valuable.\n\u003e \n\u003e When the log messages don't accurately describe the contents of the diff,\n\u003e it's just misinformation and noise. Everyone starts out by wanting a neat\n\u003e collection of easy to understand and review commits, but in practice it's\n\u003e extremely hard to always get it.\n\nThen your request should be for better commits, not for just squashing the lot \ninto some incoherent blob.\n\nThe alternatives under discussion are:\n\n - Coder produces long chain of commits on feature branch. Compresses them, \nthrowing away any individual and accurate messages into one large diff. It's \nunlikely you'll get a log message that is as descriptive in the large one if \nyou made them throw away the little ones. Large diff is offered for review. \nReview is of one large diff.\n\n - Coder produces long chain on commits on feature branch. Offers them for \nreview. Reviewer only likes to review large diffs, so uses the tools \navailable to produce it.\n\nExactly the same diff is being reviewed, but in one case you're throwing away \ninformation. There is no getting that information back ever.\n\nYou're also discarding the advantages of individual commits.\n\n - Merges are considerably harder than rebases. You have to resolve all the \nconflicts at once with a merge, with a rebase you can resolve them with the \nlog message and original isolated diff to help you.\n\n - Bisect doesn't give as fine-grained an answer.\n\n\u003e I know how to make squashed commits, thanks. I've done LOTS of code review\n\nExcellent. Don't take it personally -- I only offered it in case you didn't \nknow. Not everyone is familiar with git plumbing.\n\n\u003e in my life. I'm making a point here as one of the few people who goes\n\u003e through large pull requests and reviews them line by line. It's hard,\n\nThat doesn't make you the only person who does code reviews. I do plenty of \nreviews here; they're just not bitcoin reviews. Obviously we're talking about \nbitcoin, so you get to decide in the end.\n\n\u003e partly because github sucks, and partly because reviewing lots of small\n\u003e commits sucks.\n\nI'm not suggesting you review lots of small commits anyway. I can't comment \non whether github sucks or not -- that's obviously personal preference. \nHowever, nothing stops you doing reviews on your own local checkout.\n\n\u003e There's nothing that makes a single large commit harder to review. It's the\n\u003e same amount of code or strictly less, given the tendency for later commits\n\nThat's not true. There are often lots of small changes that are manifestly \ncorrect -- let's use string changes as an example -- in the large commit, they \nare just noise. You want to be able to focus on the hard commits. However -- \nI am not trying to persuade you to review small commits, I'm trying to \npersuade you not to throw away the small commits, gone forever, merely because \nyour preference is to review large commits.\n\n\u003e to change earlier ones. You can easily search the entire change whilst\n\u003e reviewing. There are lots of things that make it easier.\n\nSince the large commit is always available, no facilities have been lost.\n\nPersonally I work hard in my repositories to make coherent, small, well \ndescribed commits. If I had gone to that effort for a bitcoin branch only to \nbe told to collapse them all and throw away that effort, I'd think I'd been \nwasting my time.\n\n\n\nAndy\n\n-- \nDr Andy Parkins\nandyparkins at gmail.com",
"sig": "50edc0ffff1883e73447d2204ce0dd6a6526df314e15b3e3c1118fed73f2d6652a3bcb6662bae1ec88ec126bb74e3a75aeb5a8ed0609fe2b202929897bcb2993"
}