bug-vc-dwim
[Top][All Lists]
Advanced

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

Re: [Bug-vc-dwim] [PATCH 0/3] let vc-chlog cope better with git add -i


From: Jim Meyering
Subject: Re: [Bug-vc-dwim] [PATCH 0/3] let vc-chlog cope better with git add -i
Date: Wed, 16 Mar 2011 13:53:15 +0100

Ralf Wildenhues wrote:

> Hi Jim, all,
>
> sometimes I like to use this workflow:
>
> 1) hack away on all kinds of things,
> 2) use 'git add -i' to pick bits that belong in one commit,
> 3) 'git commit -v' those pieces,
> 4) go back to (2) several times until everything is committed,
> 5) optionally, rebase -i and merge/reorder stuff to make a nice patch
> series.
>
> In (3), I often run ':r!vc-chlog --stdin <%' which in vim pipes
> the to-be-committed diff through vc-chlog, to generate a log entry
> (or, from the command line: git diff --cached | vc-chlog --stdin).
>
> Now, vc-chlog does not cope well in this situation.  Here's why: if O
> is the unmodified old version, and P is the patch to be applied, then
> it considers the working directory copy W to be equal to O plus P, and
> tries to recreate O as W minus P.  If the premise is not fulfilled,
> that can give wrong results.
>
> I'll reply with  a patch series with a small cleanup, a new test to
> expose the failure, both of which I'm pushing already; and then two
> alternative ways to address the actual issue:
>
> One introduces a new --dirty-workdir switch that lets vc-chlog
> reconstruct O from W minus 'vc-dwim --diff'.  Then, P is applied on top
> of O to find out what the file after the next commit would look like.
> The other alternative omits the new switch and lets the new action be
> the default when --stdin has been passed.
>
> Preferences as to 3a or 3b?

Hi Ralf,

Sorry for the delay.
I have a slight preference for --dirty-workdir,
since its name already gives an idea of how it might be used,
but either patch would be fine.

Thanks!



reply via email to

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