I have an environment variable set up like this in
env: global: - DIFF=`./bench/scripts/diff.sh | paste -s -d, -`
./bench/scripts/diff.sh looks like this:
#!/usr/bin/env bash CHANGED_FILES=`git diff --name-only master src/` for CHANGED_FILE in $CHANGED_FILES; do echo ../$CHANGED_FILE done
Ordinarily, this works fine but for some branches, Travis doesn’t recognize
master and fails with this:
fatal: ambiguous argument ‘master’: unknown revision or path not in the working tree.
Use ‘–’ to separate paths from revisions, like this:
‘git […] – […]’
master (the target branch) not guaranteed to exist? Is a repository not necessarily cloned by the time items under
env are set?