Live data from Hacker News

Show HN: Git-Add–Interactive with Enhancements

github.com

41–45 of 45 posts

Re: Show HN: Git-Add–Interactive with Enhancements

#41
post #39

the thing i really wish existed was git add -p mode that automatically segmented unstaged changes into a series of fixups based on the blame of the surrounding area that changed. this wouldn't work in all cases, but in many cases, i've made a series of 3-4 clearly-separable changes, i then go and make fixes on top of all of them, and now i want to fixup each change.

Have you taken a look at git-absorb[1]?

It often did the wrong thing IME, but YMMV.

[1]: https://github.com/tummychow/git-absorb

Re: Show HN: Git-Add–Interactive with Enhancements

#42

Question: why not send this to the Git mailing list, and hopefully get this in upstream?

I don’t think the Git maintainers will consider adding Go as a dependency and having commands in a new language. Or at least, it would require first a massive effort to align the maintainers on the idea of a new language, like Rust in the Linux kernel

Or just improve the Perl version? There's no reason this needs to be written in Go.

Re: Show HN: Git-Add–Interactive with Enhancements

#45
post #38
post #34

I like the idea of 'G' to filter hunks. The perl script does not exist since git v2.40.0 so I don't think the installation instructions work for recent versions of git as there is no way to stop 'git add -p' from running the builtin version. I see this is MIT licenced but the code is very closely based on the perl script which is licensed under the GPLv2.

huh. I guess this is a prototype for features that will have be submitted to the upstream version. There was a feature in development for something like `git add -G `, maybe a decade ago, that never got completed. As for licensing, I'm happy to change the license. I have no strong feelings on the subject, and don't know what restrictions GPLv2 imposes on a port to another language.

It would be really nice to have this upstream - I don't know if the upstream implementation being in C now makes that easier or harder. As for the license I think because this is so closely based on GPL code it would be safer to use the same license.
Post reply on HN