On 8/4/2015 3:53 PM, Warren Young wrote:
> It would be insufficient for apply --partial to just learn to
> recognize already-applied diff chunks as patch(1) does, because the
> chunks might have been modified before being checked in.  Thus, a
> robust implementation of apply --partial would need to have a list of
> chunks you previously said “yes” to, so it can skip them the next
> time.

Stash saves the contents of the new file, along with the baseline
version.  It does not save a list of diffs from the old to the new.

If you manually apply a few of the diff chunks by hand (presumably after
seeing them in stash show), stash pop or stash apply simply leverage the
existing merge code to bring in the rest.

$ f new x.fossil
$ mkdir x
$ cd x
$ echo -e '1\n2\n3' > file
$ f add file
$ f commit -m 1
$ echo -e '0\n1\n2\n3\n4' > file
$ f stash save -m s
$ f stash show

CHANGED file
--- file
+++ file
@@ -1,3 +1,5 @@
+0
 1
 2
 3
+4

$ echo -e '0\n1\n2\n3' > file
$ f stash pop

MERGE file

$ cat file

0
1
2
3
4

-- 
Andy Goth | <andrew.m.goth/at/gmail/dot/com>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to