-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This resolves #95 : Only symlink files that are tracked by git
Besides adding a test for this feature, I also had to update some existing tests slightly. First I had to make sure that tests that modify their test repo, also commit to that test repo. Otherwise the linking function wouldn't do anything since git ignores files not added to the repo. Secondly, I had to modify the 'fail when linking file with newline' test to look for symlinks with double quotes since that is how they are returned by `git ls-files` which brings up the point that we could now support filenames with newlines in them. `git ls-files` wraps such filenames in quotes like: "subdir/filename_with\nnewline" That being said I'm not sure of the usefulness of newlines in filenames.
- Loading branch information
1 parent
3c25d3b
commit 0c3529e
Showing
3 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,3 +145,14 @@ function mock_git_version { | |
# The function needs to be exported for it to work in child processes | ||
export -f git | ||
} | ||
|
||
function commit_repo_state { | ||
local repo=$1 | ||
( | ||
cd $repo | ||
git config user.name "Homeshick user" | ||
git config user.email "[email protected]" | ||
git add -A | ||
git commit -m "Commiting Repo State from test helper.bash." | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters