# file : tests/rep-fetch-git-commit.test # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file +git clone "$rep_git/state0/style-basic.git" 2>! &style-basic/*** : unadvertised : { +git -C ../style-basic log '--pretty=format:%H' --all --grep='README' | \ set commit : no-branch : { $clone_root_cfg && $rep_add "$rep/state0/style-basic.git#@$commit"; if ($git_protocol == 'https-dumb') warn = "$warn_repo_hist$reason_dumb$warn_dumb" elif ($git_protocol != 'https-smart-unadv') warn = "$warn_repo_hist$reason_unadv" end; $* 2>>~"%EOE%" %fetching git:.+style-basic#@$commit% %querying .+style-basic\.git%? $warn %fetching from .+style-basic\.git% 1 package\(s\) in 1 repository\(s\) EOE } : branch : { $clone_root_cfg && $rep_add "$rep/state0/style-basic.git#stable@$commit"; if ($git_protocol == 'https-dumb') warn = "$warn_ref_hist$reason_dumb$warn_dumb" elif ($git_protocol != 'https-smart-unadv') warn = "$warn_ref_hist$reason_unadv" end; $* 2>>~"%EOE%" %fetching git:.+style-basic#stable@$commit% %querying .+style-basic\.git%? $warn %fetching from .+style-basic\.git% 1 package\(s\) in 1 repository\(s\) EOE } } : advertised : { +git -C ../style-basic log '--pretty=format:%H' --all --grep='INSTALL' | \ set commit +if ($git_protocol == 'https-dumb') warn = "$warn_ref_hist$reason_dumb$warn_dumb" end : no-branch : { $clone_root_cfg && $rep_add "$rep/state0/style-basic.git#@$commit"; $* 2>>~"%EOE%" %fetching git:.+style-basic#@$commit% %querying .+style-basic\.git%? $warn %fetching from .+style-basic.\git% 1 package\(s\) in 1 repository\(s\) EOE } : branch : { $clone_root_cfg && $rep_add "$rep/state0/style-basic.git#stable@$commit"; $* 2>>~"%EOE%" %fetching git:.+style-basic#stable@$commit% %querying .+style-basic\.git%? $warn %fetching from .+style-basic\.git% 1 package\(s\) in 1 repository\(s\) EOE } }