On 1/26/2012 12:06 PM, Richard Hipp wrote:
On Thu, Jan 26, 2012 at 2:51 PM, Richard Hipp <d...@sqlite.org
<mailto:d...@sqlite.org>> wrote:
On Thu, Jan 26, 2012 at 2:36 PM, Remigiusz Modrzejewski <l...@maxnet.org.pl
<mailto:l...@maxnet.org.pl>> wrote:
Hi,
I've stumbled upon a description of something, that I missed once or
twice in Fossil:
http://nuclearsquid.com/writings/git-add/
Nothing that great: an ability to commit only part of changes to a file.
I'm of the old-fashioned opinion that you ought to test your code before
you check it in.
The --interactive option is not really appropriate for the "commit" command,
for the reason cited above. But I can see an --interactive option being useful
for the "stash apply" command, so that you could selectively pull parts of a
stash into your working copy. I can also see it being useful on "merge",
especially when combined with --cherrypick.
> But not on "commit"; the thought
of adding --interactive to commit gives me shivers.
I am not sure that this is what Remus truly proposed.
He said in the first post of the thread this "could be scripted out", which I
take to mean as handled by some outside tool which then drives fossil itself.
(It was my understanding, for example, that this functionality in git is
provided by the 'git-gui' tool. It seems, now, that git-add -patch might be the
underlying functionality).
With this in mind, the proposed 'stash -interactive' might be the one change to
fossil needed to support what he wants, with the full workflow something along
the lines of
fossil stash save ; # save edits
loop
fossil stash --interactive ... ; # select and ...
fossil commit ; # commit pieces
repeat
fossil stash pop ; # any remaining chunks go back to regular editing
Of course, it could possibly be done with
fossil stash diff
as well, and a separate (gui) tool helping with selecting pieces from the
patch. (Instead of editing in a regular editor.) At least some of the appeal
might be how easy the git-gui tool makes it to (graphically) select the chunks,
even pieces of chunks, to commit.
--
Andreas Kupries
Senior Tcl Developer
ActiveState, The Dynamic Language Experts
P: 778.786.1122
F: 778.786.1133
andre...@activestate.com
http://www.activestate.com
Get insights on Open Source and Dynamic Languages at www.activestate.com/blog
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users