[Gambas-user] IDE Git Magic ....
Tobias Boege
taboege at gmail.com
Fri Feb 9 00:58:44 CET 2018
On Fri, 09 Feb 2018, Christof Thalhofer wrote:
> Am 08.02.2018 um 22:51 schrieb Tobias Boege:
> > On Thu, 08 Feb 2018, Christof Thalhofer wrote:
> >> What I always miss is a very easy way to direct a small portion of
> >> change to an explicit commit, while directing another change in the same
> >> file nearby at the same time to another commit. It is possible in Git
> >> and in tig but it is not really easy or intuitive. This could be a
> >> killer feature.
> >>
> >
> > If I remember correctly, the IDE already has a widget for displaying
> > diffs (for the Project > Patch dialogs). This allows you to (un)tick
> > changes in a patch file at the hunk level. I think a `git diff` into
> > that widget and using its output for an automatic walk through
> > `git add --patch` will get you pretty far already. The only thing
> > that's missing is a way to break selected hunks up further.
>
> Ok ... I do not know the IDE really good, I have just recognized it as a
> source for really good code examples, but in Git it goes like that:
>
> "Staging Patches" in
>
> https://git-scm.com/book/en/v2/Git-Tools-Interactive-Staging
>
Yes, I know. That's what I modelled the Patch dialogs after, way back
in 2013(?). The only thing that's missing is a bit of convenience
(select *all* hunks after the current one, or select *none*, etc.) and
the "s" subcommand of `git add --patch` for further splitting hunks.
If these are added, you have a fully capable interface to interactive
staging already (I believe -- it's been a while).
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list