File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,14 @@ use crate::commands::tui;
2828#[ derive( clap:: Parser , Command , Debug ) ]
2929pub ( crate ) struct DiffCmd {
3030 /// Reference snapshot/path
31+ ///
32+ /// Snapshots can be identified the following ways: "01a2b3c4" or "latest" or "latest~N" (N >= 0)
3133 #[ clap( value_name = "SNAPSHOT1[:PATH1]" ) ]
3234 snap1 : String ,
3335
3436 /// New snapshot/path (uses PATH2 = PATH1, if not given; uses local path if no snapshot is given)
37+ ///
38+ /// Snapshots can be identified the following ways: "01a2b3c4" or "latest" or "latest~N" (N >= 0)
3539 #[ clap( value_name = "SNAPSHOT2[:PATH2]|PATH2" , value_hint = ValueHint :: AnyPath ) ]
3640 snap2 : Option < String > ,
3741
@@ -83,7 +87,7 @@ impl DiffCmd {
8387 match ( id1, id2) {
8488 ( Some ( id1) , Some ( id2) ) => {
8589 // diff between two snapshots
86- let snaps = repo. get_snapshots ( & [ id1, id2] ) ?;
90+ let snaps = repo. get_snapshot_from_strs ( & [ id1, id2] , |_| true ) ?;
8791
8892 let snap1 = & snaps[ 0 ] ;
8993 let snap2 = & snaps[ 1 ] ;
You can’t perform that action at this time.
0 commit comments