The Art of Manually Editing Hunks
kennyballou.com
The Art of Manually Editing Hunks
1–10 of 20 posts
Re: The Art of Manually Editing Hunks
#2Re: The Art of Manually Editing Hunks
#3Re: The Art of Manually Editing Hunks
#4Re: The Art of Manually Editing Hunks
#5Yeah, you can do this to make your commits cleaner, but I find it easier to just manually edit the file and then undo after you add the patch.
Some people say they have to re-learn regular expressions each time they use them. I think this is mostly because they don't use them much. For me, I have to re-learn fancy git stuff like hunk staging each time I use it. Because I never use it.
Re: The Art of Manually Editing Hunks
#6I honestly thought this would be about retouching photos of buff men!
(As a gay man, I appreciate an extended and detailed discussion of hunks finally appearing on HN.)
Re: The Art of Manually Editing Hunks
#7Is it just me, or the piece doesn’t explain how to make edits without messing up the hunk?
Re: The Art of Manually Editing Hunks
#8Yeah, you can do this to make your commits cleaner, but I find it easier to just manually edit the file and then undo after you add the patch.
I've never felt the urge to commit half of a file, but if I did, surely I would just copy the whole file to scratch buffer somewhere, edit the real file to the first state I want, and then commit that. Some people say they have to re-learn regular expressions each time they use them. I think this is mostly because they don't use them much. For me, I have to re-learn fancy git stuff like hunk staging each time I use i…
I guess the difference might be that my workflow is less edit → stage → commit and more edit → (stage things I’m sure about → edit/debug things I’m not →)* commit. For example, “the staged version is what I have in the debugger, modulo debugging code” can be a useful invariant to maintain. (Now that I’m thinking about it, having the build system automatically save a snapshot of the source it used somewhere in the VCS—and stamp it in the executable—sounds tremendously useful. Surely somebody’s already built that?..)
Re: The Art of Manually Editing Hunks
#9Yeah, you can do this to make your commits cleaner, but I find it easier to just manually edit the file and then undo after you add the patch.
I've never felt the urge to commit half of a file, but if I did, surely I would just copy the whole file to scratch buffer somewhere, edit the real file to the first state I want, and then commit that. Some people say they have to re-learn regular expressions each time they use them. I think this is mostly because they don't use them much. For me, I have to re-learn fancy git stuff like hunk staging each time I use i…
Re: The Art of Manually Editing Hunks
#10I honestly thought this would be about retouching photos of buff men!