Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fatal git failures in tests #832

Merged
merged 1 commit into from
Mar 31, 2017
Merged

Fix fatal git failures in tests #832

merged 1 commit into from
Mar 31, 2017

Commits on Mar 31, 2017

  1. Fix fatal git failures in tests

    The tests had started printing git error messages:
    
    ```
    fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
    ```
    
    These were coming from three places:
    
    - `suspenders.gemspec`, which collects all `Gem::Specification#files=`
      by shelling out to `git ls-files`.
    - `suspenders.gemspec`, which collects all
      `Gem::Specification#test_files=` by shelling out to
      `git ls-files -- {test,spec,features}/*`.
    - Honeybadger, which figures out which revision to tag the error with by
      invoking `rev-parse`:
    
          def from_git
            return nil unless File.directory?('.git')
            `git rev-parse HEAD`.strip rescue nil
          end
    
    Although I am unsure why these things started to matter now, I found two
    changes that improve the situation:
    
    - In the test suite, make an initial commit after suspender'ing a
      project.
    - When suspender'ing a project, make the git repo last.
    mike-burns committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    718fb7a View commit details
    Browse the repository at this point in the history