[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to commit hunks using VC?

From: Diogo F. S. Ramos
Subject: Re: How to commit hunks using VC?
Date: Fri, 26 Oct 2018 15:03:20 -0300

>> Is it possible to commit only some hunks using VC?
> Many years ago, I used a local patch to VC that allowed me to do
> "partial commits".  The way it worked, basically was:
> - save/copy the current changes to some auxiliary file (there was no
>   `git stash` back then, but it was similar, except it didn't actually
>   change the files).
> - then I could undo the hunks I didn't want to commit any which way
>   I wanted (using diff-mode or manual editing, you name it).
> - upon commit the previously saved changes were automatically be
>   brought back.
> Nowadays, you can basically do the same with `git stash`, but there's
> indeed no "generic VC" support for it (only for the Git backend).

Thank you.  So, if I understand it correctly, I can commit hunks in VC,
with the git backend, by abusing stash, right?  

Can I commit only parts of a hunk?  Sometimes I edit hunks while using
`git add -p' because "split" doesn't cut them enough.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]