1. 07 6月, 2018 6 次提交
    • M
      Measure code coverage between tests · ca87a511
      Mislav Marohnić 提交于
      Go has code coverage tooling for test mode, which temporarily rewrites
      the source code to insert annotations which will activate during the
      test run and track progress of executed code. Then, upon process
      completion, that information is dumped into a coverage report.
      
      We can't use this approach for hub, at least not without substantial
      changes. First of all, hub's test coverage is mostly "from the outside",
      utilizing Cucumber to invoke the binary with different arguments and
      inspect the outputs and result. There are some tests in go, but they are
      minimal compared to the cukes.
      
      Second, hub frequently aborts the process on errors via `os.Exit(1)`,
      and those scenarios need to be tested too. However, if the process exits
      prematurely, the code coverage report will never be generated.
      
      To work around this, I first used the go tool that annotates the source:
      
          go tool cover -mode=set -var=LiveCoverage myfile.go
      
      This injects `LiveCoverage.Count[pos] = 1` lines at appropriate places
      all over the source code, and generates a mapping of line/column
      positions in the original source.
      
      Then I rewrite those lines to become a method invocation:
      
          coverage.Record(LiveCoverage, pos)
      
      The new `Record` method will immediately append the information to a
      code coverage report file as soon as it's invoked. This ensures that
      there is coverage information even if the process gets aborted.
      
      This approach works the same for go tests as well as for cukes. They all
      append to the same file. Finally, the rest of Go tooling is used to
      generate an HTML report of code coverage:
      
          go tool cover -html=cover.out
      ca87a511
    • M
      Ignore `XDG_CONFIG_*` environment variables in tests · 839a5f38
      Mislav Marohnić 提交于
      This avoids polluting the user's home environment.
      https://github.com/github/hub/pull/1705#issuecomment-392759921
      839a5f38
    • M
      Rename test file for `hub pr checkout` · 591ffc39
      Mislav Marohnić 提交于
      591ffc39
    • M
      Fix `hub pr list -h <BRANCH>` when owner isn't specified · 3e89bfba
      Mislav Marohnić 提交于
      Previously, when `:` wouldn't appear in the value for `head`, the GitHub
      API would ignore the `head` parameter altogether. Now, ensure that
      `<OWNER>:` syntax is always populated by adding the default from the
      current repository.
      3e89bfba
    • M
      Merge pull request #1640 from asdofindia/patch-1 · 6cc3b99f
      Mislav Marohnić 提交于
      Add installation method for archlinux
      6cc3b99f
    • M
      Fix Arch linux instructions · 0e4594b7
      Mislav Marohnić 提交于
      0e4594b7
  2. 06 6月, 2018 16 次提交
  3. 05 6月, 2018 1 次提交
  4. 02 6月, 2018 1 次提交
    • A
      adapted to comments: · 4318d265
      Andreas Baumann 提交于
      - no more HUB_UNSAFE_DELETE environment variable, use -y/--yes now
      - do not check for project before deletion
      - only ask for y/n confirmation when deleting
      4318d265
  5. 31 5月, 2018 2 次提交
  6. 30 5月, 2018 1 次提交
  7. 29 5月, 2018 13 次提交