@@ -644,3 +644,336 @@ Test ::*.txt=*.txt (pattern with pattern in source should be error)
644644 $ josh-filter -i ::*. txt= *. txt
645645 ERROR: Pattern filters cannot use destination= source syntax: *. txt
646646 [1 ]
647+
648+ Test : FOLD
649+ $ FILTER_HASH= $ (josh-filter -i ' :FOLD' )
650+ $ josh-filter -p $ {FILTER_HASH}
651+ : FOLD
652+ $ git read-tree -- reset -u $ {FILTER_HASH}
653+ $ tree
654+ .
655+ `-- fold
656+
657+ 1 directory, 1 file
658+
659+ Test : PATHS
660+ $ FILTER_HASH= $ (josh-filter -i ' :PATHS' )
661+ $ josh-filter -p $ {FILTER_HASH}
662+ : PATHS
663+ $ git read-tree -- reset -u $ {FILTER_HASH}
664+ $ tree
665+ .
666+ `-- paths
667+
668+ 1 directory, 1 file
669+
670+ Test : INDEX
671+ $ FILTER_HASH= $ (josh-filter -i ' :INDEX' )
672+ $ josh-filter -p $ {FILTER_HASH}
673+ : INDEX
674+ $ git read-tree -- reset -u $ {FILTER_HASH}
675+ $ tree
676+ .
677+ `-- index
678+
679+ 1 directory, 1 file
680+
681+ Test : INVERT
682+ $ FILTER_HASH= $ (josh-filter -i ' :INVERT' )
683+ $ josh-filter -p $ {FILTER_HASH}
684+ : INVERT
685+ $ git read-tree -- reset -u $ {FILTER_HASH}
686+ $ tree
687+ .
688+ `-- invert
689+
690+ 1 directory, 1 file
691+
692+ Test : linear
693+ $ FILTER_HASH= $ (josh-filter -i ' :linear' )
694+ $ josh-filter -p $ {FILTER_HASH}
695+ : linear
696+ $ git read-tree -- reset -u $ {FILTER_HASH}
697+ $ tree
698+ .
699+ `-- linear
700+
701+ 1 directory, 1 file
702+
703+ Test : prune= trivial-merge
704+ $ FILTER_HASH= $ (josh-filter -i ' :prune=trivial-merge' )
705+ $ josh-filter -p $ {FILTER_HASH}
706+ : prune= trivial-merge
707+ $ git read-tree -- reset -u $ {FILTER_HASH}
708+ $ tree
709+ .
710+ `-- prune
711+
712+ 1 directory, 1 file
713+
714+ Test : unsign
715+ $ FILTER_HASH= $ (josh-filter -i ' :unsign' )
716+ $ josh-filter -p $ {FILTER_HASH}
717+ : unsign
718+ $ git read-tree -- reset -u $ {FILTER_HASH}
719+ $ tree
720+ .
721+ `-- unsign
722+
723+ 1 directory, 1 file
724+
725+ Test : unlink
726+ $ FILTER_HASH= $ (josh-filter -i ' :unlink' )
727+ $ josh-filter -p $ {FILTER_HASH}
728+ : unlink
729+ $ git read-tree -- reset -u $ {FILTER_HASH}
730+ $ tree
731+ .
732+ `-- unlink
733+
734+ 1 directory, 1 file
735+
736+ Test : export
737+ $ FILTER_HASH= $ (josh-filter -i ' :export' )
738+ $ josh-filter -p $ {FILTER_HASH}
739+ : export
740+ $ git read-tree -- reset -u $ {FILTER_HASH}
741+ $ tree
742+ .
743+ `-- export
744+
745+ 1 directory, 1 file
746+
747+ Test : adapt= submodules
748+ $ FILTER_HASH= $ (josh-filter -i ' :adapt=submodules' )
749+ $ josh-filter -p $ {FILTER_HASH}
750+ : adapt= submodules
751+ $ git read-tree -- reset -u $ {FILTER_HASH}
752+ $ tree
753+ .
754+ `-- adapt
755+ `-- 0
756+
757+ 2 directories, 1 file
758+
759+ Test : link= embedded
760+ $ FILTER_HASH= $ (josh-filter -i ' :link=embedded' )
761+ $ josh-filter -p $ {FILTER_HASH}
762+ : link= embedded
763+ $ git read-tree -- reset -u $ {FILTER_HASH}
764+ $ tree
765+ .
766+ `-- link
767+ `-- 0
768+
769+ 2 directories, 1 file
770+
771+ Test : embed= path/ to / dir
772+ $ FILTER_HASH= $ (josh-filter -i ' :embed=path/to/dir' )
773+ $ josh-filter -p $ {FILTER_HASH}
774+ : embed= path/ to / dir
775+ $ git read-tree -- reset -u $ {FILTER_HASH}
776+ $ tree
777+ .
778+ `-- embed
779+ `-- 0
780+
781+ 2 directories, 1 file
782+
783+ Test : workspace= path/ to / workspace
784+ $ FILTER_HASH= $ (josh-filter -i ' :workspace=path/to/workspace' )
785+ $ josh-filter -p $ {FILTER_HASH}
786+ : workspace= path/ to / workspace
787+ $ git read-tree -- reset -u $ {FILTER_HASH}
788+ $ tree
789+ .
790+ `-- workspace
791+ `-- 0
792+
793+ 2 directories, 1 file
794+
795+ Test :+ path/ to / stored
796+ $ FILTER_HASH= $ (josh-filter -i ' :+path/to/stored' )
797+ $ josh-filter -p $ {FILTER_HASH}
798+ :+ path/ to / stored
799+ $ git read-tree -- reset -u $ {FILTER_HASH}
800+ $ tree
801+ .
802+ `-- stored
803+ `-- 0
804+
805+ 2 directories, 1 file
806+
807+ Test : hook= hookname
808+ $ FILTER_HASH= $ (josh-filter -i ' :hook=hookname' )
809+ $ josh-filter -p $ {FILTER_HASH}
810+ : hook= " hookname"
811+ $ git read-tree -- reset -u $ {FILTER_HASH}
812+ $ tree
813+ .
814+ `-- hook
815+ `-- 0
816+
817+ 2 directories, 1 file
818+
819+ Test : author= Name;email@ example . com
820+ $ FILTER_HASH= $ (josh-filter -i ' :author="Name";"email@example.com"' )
821+ $ josh-filter -p $ {FILTER_HASH}
822+ : author= " Name" ;" email@ example .com"
823+ $ git read-tree -- reset -u $ {FILTER_HASH}
824+ $ tree
825+ .
826+ `-- author
827+ | -- 0
828+ `-- 1
829+
830+ 2 directories, 2 files
831+
832+ Test : committer= Name;email@ example . com
833+ $ FILTER_HASH= $ (josh-filter -i ' :committer="Name";"email@example.com"' )
834+ $ josh-filter -p $ {FILTER_HASH}
835+ : committer= " Name" ;" email@ example .com"
836+ $ git read-tree -- reset -u $ {FILTER_HASH}
837+ $ tree
838+ .
839+ `-- committer
840+ | -- 0
841+ `-- 1
842+
843+ 2 directories, 2 files
844+
845+ Test : " commit message"
846+ $ FILTER_HASH= $ (josh-filter -i ' :"commit message"' )
847+ $ josh-filter -p $ {FILTER_HASH}
848+ : " commit message"
849+ $ git read-tree -- reset -u $ {FILTER_HASH}
850+ $ tree
851+ .
852+ `-- message
853+ | -- 0
854+ `-- 1
855+
856+ 2 directories, 2 files
857+
858+ Test : " commit message" ;" .*"
859+ $ FILTER_HASH= $ (josh-filter -i ' :"commit message";".*"' )
860+ $ josh-filter -p $ {FILTER_HASH}
861+ : " commit message" ;" .*"
862+ $ git read-tree -- reset -u $ {FILTER_HASH}
863+ $ tree
864+ .
865+ `-- message
866+ | -- 0
867+ `-- 1
868+
869+ 2 directories, 2 files
870+
871+ Test : pin[:/ a]
872+ $ FILTER_HASH= $ (josh-filter -i ' :pin[:/a]' )
873+ $ josh-filter -p $ {FILTER_HASH}
874+ : pin[:/ a]
875+ $ git read-tree -- reset -u $ {FILTER_HASH}
876+ $ tree
877+ .
878+ `-- pin
879+ `-- 0
880+ `-- subdir
881+ `-- 0
882+
883+ 4 directories, 1 file
884+
885+ Test : SQUASH
886+ $ FILTER_HASH= $ (josh-filter -i ' :SQUASH' )
887+ $ josh-filter -p $ {FILTER_HASH}
888+ : SQUASH
889+ $ git read-tree -- reset -u $ {FILTER_HASH}
890+ $ tree
891+ .
892+ `-- squash
893+
894+ 1 directory, 1 file
895+
896+ Test : replace(" pattern" : " replacement" )
897+ $ FILTER_HASH= $ (josh-filter -i ' :replace("pattern":"replacement")' )
898+ $ josh-filter -p $ {FILTER_HASH}
899+ : replace(
900+ " pattern" : " replacement"
901+ )
902+ $ git read-tree -- reset -u $ {FILTER_HASH}
903+ $ tree
904+ .
905+ `-- regex_replace
906+ `-- 0
907+ | -- p
908+ `-- r
909+
910+ 3 directories, 2 files
911+
912+ Test : rev(0000000000000000000000000000000000000000 :/ a)
913+ $ FILTER_HASH= $ (josh-filter -i ' :rev(0000000000000000000000000000000000000000:/a)' )
914+ $ josh-filter -p $ {FILTER_HASH}
915+ : rev(0000000000000000000000000000000000000000 :/ a)
916+ $ git read-tree -- reset -u $ {FILTER_HASH}
917+ $ tree
918+ .
919+ `-- rev
920+ `-- 0
921+ | -- f
922+ | `-- subdir
923+ | `-- 0
924+ `-- o
925+
926+ 5 directories, 2 files
927+
928+ Test : join(0000000000000000000000000000000000000000 :/ a)
929+ $ FILTER_HASH= $ (josh-filter -i ' :join(0000000000000000000000000000000000000000:/a)' )
930+ $ josh-filter -p $ {FILTER_HASH}
931+ : join(0000000000000000000000000000000000000000 :/ a)
932+ $ git read-tree -- reset -u $ {FILTER_HASH}
933+ $ tree
934+ .
935+ `-- join
936+ `-- 0
937+ | -- f
938+ | `-- subdir
939+ | `-- 0
940+ `-- o
941+
942+ 5 directories, 2 files
943+
944+ Test : from(0000000000000000000000000000000000000000 :/ a)
945+ $ FILTER_HASH= $ (josh-filter -i ' :from(0000000000000000000000000000000000000000:/a)' )
946+ $ josh-filter -p $ {FILTER_HASH}
947+ : /a:concat (0000000000000000000000000000000000000000: /a)
948+ $ git read-tree -- reset -u $ {FILTER_HASH}
949+ $ tree
950+ .
951+ `-- chain
952+ | -- 0
953+ | `-- subdir
954+ | `-- 0
955+ `-- 1
956+ `-- concat
957+ `-- 0
958+ | -- f
959+ | `-- subdir
960+ | `-- 0
961+ `-- o
962+
963+ 9 directories, 3 files
964+
965+ Test : unapply(0000000000000000000000000000000000000000 :/ a)
966+ $ FILTER_HASH= $ (josh-filter -i ' :unapply(0000000000000000000000000000000000000000:/a)' )
967+ $ josh-filter -p $ {FILTER_HASH}
968+ : unapply(0000000000000000000000000000000000000000 :/ a)
969+ $ git read-tree -- reset -u $ {FILTER_HASH}
970+ $ tree
971+ .
972+ `-- unapply
973+ `-- 0
974+ | -- f
975+ | `-- subdir
976+ | `-- 0
977+ `-- o
978+
979+ 5 directories, 2 files
0 commit comments