Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t9140-git-svn-reset.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t9140-git-svn-reset.sh` 66 lines ยท 1515 bytes Raw Blame History 1 #!/bin/sh 2 # 3 # Copyright (c) 2009 Ben Jackson 4 # 5 6 test_description='git svn reset' 7 . ./lib-git-svn.sh 8 9 test_expect_success 'setup test repository' ' 10 svn_cmd co "$svnrepo" s && 11 ( 12 cd s && 13 mkdir vis && 14 echo always visible > vis/vis.txt && 15 svn_cmd add vis && 16 svn_cmd commit -m "create visible files" && 17 mkdir hid && 18 echo initially hidden > hid/hid.txt && 19 svn_cmd add hid && 20 svn_cmd commit -m "create initially hidden files" && 21 svn_cmd up && 22 echo mod >> vis/vis.txt && 23 svn_cmd commit -m "modify vis" && 24 svn_cmd up 25 ) 26 ' 27 28 test_expect_success 'clone SVN repository with hidden directory' ' 29 git svn init "$svnrepo" g && 30 ( cd g && git svn fetch --ignore-paths="^hid" ) 31 ' 32 33 test_expect_success 'modify hidden file in SVN repo' ' 34 ( cd s && 35 echo mod hidden >> hid/hid.txt && 36 svn_cmd commit -m "modify hid" && 37 svn_cmd up 38 ) 39 ' 40 41 test_expect_success 'fetch fails on modified hidden file' ' 42 ( cd g && 43 git svn find-rev refs/remotes/git-svn > ../expect && 44 test_must_fail git svn fetch 2> ../errors && 45 git svn find-rev refs/remotes/git-svn > ../expect2 ) && 46 test_grep "not found in commit" errors && 47 test_cmp expect expect2 48 ' 49 50 test_expect_success 'reset unwinds back to r1' ' 51 ( cd g && 52 git svn reset -r1 && 53 git svn find-rev refs/remotes/git-svn > ../expect2 ) && 54 echo 1 >expect && 55 test_cmp expect expect2 56 ' 57 58 test_expect_success 'refetch succeeds not ignoring any files' ' 59 ( cd g && 60 git svn fetch && 61 git svn rebase && 62 test_grep "mod hidden" hid/hid.txt 63 ) 64 ' 65 66 test_done