The latest version of stash.test exposes a quirk in the stash diff command, that occurs after stashing a fossil rm.

Boiled down, I did the following in stash.test. First get a new repository with files f1, f2, and f3, and commit them:

repo_init
write_file f1 "f1"
write_file f2 "f2"
write_file f3 "f3"
fossil add f1 f2 f3
fossil commit -m "c1" --tag c1

Add a new file f0, and edit f2:

write_file f0 "f0"
fossil add f0
write_file f2 "f2.1"

Now snapshot the changes and try stash diff to see that the folder and the stash agree:

fossil stash snapshot -m "snap 1"
fossil stash diff
fossil stash show

Remove f1, and snapshot:

file delete f1
fossil rm f1
fossil stash snapshot -m "snap 2"
fossil stash diff

Note that diff fails, and says:

  DELETE f1
  no such file: c:/Users/Ross/Documents/tmp/fbuild/stash/f1

fossil stash show shows a sensible collection of changes in the snaphot.

I also renamed f3 and took another snapshot. Since f1 is still missing, I still see the same error from diff, but the final fossil stash show is also sensible.

Is it sensible to have stash diff fail because a file that the stash was going to delete is already deleted? I was expecting that stash diff would show that the working directory already has all the stashed changes applied, not an error.

The version of stash.test as of [94b95307] demonstrates what I tried.

--
Ross Berteig                               r...@cheshireeng.com
Cheshire Engineering Corp.           http://www.CheshireEng.com/
+1 626 303 1602
_______________________________________________
fossil-dev mailing list
fossil-dev@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev

Reply via email to