​​After a yesterday's email entitled “is this a crazy idea?” meant to ask
about a shim ended in a really interesting discussion about select specific
changes to files, I think we could give that idea a chance to live (just as
an idea, for the time being).

I've personally gone through times where I've needed it. And yes Mr. Hipp,
now I know about multiple check-outs, thanks for that one. Yet before that,
I knew about stash. But sometimes it was already too late to simply stash
and begin doing some other changes, as both changes were already in the
file.

That normally means a kinda complicated/frustrating/error prone process
(ok, is not the end of the world, yet, would be lovely to have an easier,
safer way) to split the two changes. I guess everyone must agree with me on
this. If you catch the need for the split early on, is a trivial thing, but
if you've gone until the end of at least one of the changes, splitting is
not that easy anymore.

So having the means to “automate” that splitting process seems to be great.
I use the word “seems”, as I've never used such a thing, so I can't
actually give an opinion on usefulness.

Neat ideas already popped. Here I copy/paste some fragments of them:

AFAIK with git staging you can select specific changes in a single file as
> well, to commit only a sub-set of changes in that file.
>


> *That* would be neat to have -- I've heard of it in git, but not explored
> it.
>


> Third, while splitting commits (where you accidentally mashed multiple
> things together that you later realize should be separated) is a very
> relevant feature
>


> This does not require a staging area. Darcs, for example, had such
> selective commits since its inception (in fact, it was and is the default
> mode of operation for Darcs, for better or worse).
>


> A stash with abilites like "git add --interactive" to stash parts within a
> file is the way to go IMO.
>


> fossil diff --tk --partial-commit (Then, an automatic "fossil stash" is
> performed where the original modified files are stored. The files left in
> the working area only contain the selected differences)
>

I personally would like a selective stash. Perhaps one where you can
selectively push some changes (then fossil could proceed to remove them
from the actual files), or selectively pop/apply some changes (but I
imagine this one could get things confusing, specially if used with apply).

I've never played with Darcs nor any other tool that provides this
functionality, except for GIT, and I started playing with that function
yesterday. It seems that GIT gives you the chance to select the changes by
editing the unified patch on your favorite text editor (I guess someone
mentioned that in his workflow for this situation, he did something
similar, but manually). More ideas on this?

What are your opinions? Is this useful? Is this powerful? What would your
approaches be?​
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to