BACKWARDS INCOMPATIBLE CHANGES:

* Using $BASEDIR to pass the location of the repo hasn't worked for a
  while. It has been removed.  Simply cd into the vcs repo before
  running a command.
BUG FIXES:
* .gitignore was being created in subdirectories instead of VCS root.
MINOR CHANGES
* _blackbox_common.sh: Replace change_to_root with change_to_vcs_root
* confidence_test.sh: Added more assertions and tests.
This commit is contained in:
tlimoncelli@stackexchange.com
2015-03-10 21:16:27 +00:00
parent ccba841cd8
commit 225d38ee11
6 changed files with 25 additions and 25 deletions

View File

@@ -50,9 +50,11 @@ fi
# TODO(tlim): This should be moved to _blackbox_common.sh in a
# VCS-independent way.
IGNOREFILE=".${VCS_TYPE}ignore"
IGNOREFILE="${REPOBASE}/.${VCS_TYPE}ignore"
if [[ $VCS_TYPE = 'git' ]]; then
ignored_file="$(echo "$unencrypted_file" | sed 's/\([\*\?]\)/\\\1/g' | sed 's/^\([!#]\)/\\\1/')"
relfile="$(vcs_relative_path "$unencrypted_file")"
relfileb="${relfile/\$\//}"
ignored_file="$(echo "${relfileb}" | sed 's/\([\*\?]\)/\\\1/g' | sed 's/^\([!#]\)/\\\1/')"
if ! grep -Fsx >/dev/null "$ignored_file" "$IGNOREFILE"; then
echo "$ignored_file" >>"$IGNOREFILE"
COMMIT_FILES+=("$IGNOREFILE")