28 Commits

Author SHA1 Message Date
Bo Anderson
30b24cf4ad
Use HOMEBREW_CURL universally, including formulae 2021-10-04 02:03:04 +01:00
Bo Anderson
f5c075d668 test/utils/git_spec: fix cherry pick test with older git 2021-02-10 17:36:46 +00:00
Jonathan Chang
8b206dfa33 git_extensions: move commit_message from utils/git 2020-12-06 14:33:23 +11:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Jonathan Chang
cdfb1badcf utils/git: helper function to get commit msg 2020-09-20 13:23:01 +10:00
Jonathan Chang
146664b45f utils/git: cherry-pick test 2020-09-20 13:21:27 +10:00
Jonathan Chang
d09ebf428f utils/git: new file_at_commit function 2020-09-20 13:21:27 +10:00
Jonathan Chang
3a8bd8514f utils/git: add cherry-pick function 2020-09-17 17:27:38 +10:00
Mike McQuaid
5a20968c19 Tweak tests annotations
- Don't skip Git installation tests on generic OS; remove it instead.
- Install Subversion for macOS Subversion tests.
2020-09-11 11:11:42 +01:00
Markus Reiter
0129247391 Refuse to install Git if HOMEBREW_TEST_GENERIC_OS is set. 2020-08-29 21:45:51 +02:00
Markus Reiter
bb1be7ef9d Call clear_available_cache before and after Git specs. 2020-08-29 21:42:24 +02:00
Markus Reiter
3118fedab9 Refactor and document Git. 2020-08-23 06:40:07 +02:00
Bo Anderson
d7864d7efb download_strategy: more direct SVN modified date detection 2020-08-11 21:01:53 +01:00
Issy Long
e1383c2898
utils/git_spec: Make example files easier to reason about
- Give the files real names, like `README.md`, rather than having to
  parse the difference between "bleh" and "blah" when reading the tests.
2020-07-14 00:18:45 +01:00
Issy Long
981726c088
utils/git_spec: Add a test for last_revision_commit_of_files
- This method, called from `brew extract` in the case of extraction from
  third-party taps, was untested. This led to it breaking when we refactored
  some of it to appease Sorbet (see PR 7933). If I make the same
  (flawed) change here and run these tests, they fail.
- There's a fair bit going on here, but most of it is setup for
  committing changes to more files, as we're testing operations on
  multiple files in a Homebrew repo.
- I originally tried to write tests for `brew extract`, but that
  required _a lot_ of refactoring because those tests (and their helper
  methods) aren't designed for third-party taps - they rely on
  `CoreTap`. So testing the underlying method is a better solution.
2020-07-14 00:18:44 +01:00
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
5e1806e796 test: rubocop-rspec style auto-corrects.
There’s too many warnings to start enabling `rubocop-rspec` by default
but let’s at least apply the cleanups it does automatically.
2018-03-25 13:30:37 +01:00
Maxim Belkin
f984701c29
append ? to git_remote_exist 2018-03-14 16:30:45 -05:00
Viktor Szakats
a6d1ddf326 git_spec.rb: use HTTPS for Git remote test 2017-09-07 08:02:05 +00:00
mansimarkaur
784250d550 Used already existing clear_git_available_cache to remove @git 2017-08-29 22:53:10 +05:30
mansimarkaur
c695dffd37 Added clear git version cache method 2017-08-27 01:23:32 +05:30
mansimarkaur
372a422305 Added tests for ensure_git_installed when git is available or homebrew/core is unavailable 2017-08-27 01:23:32 +05:30
mansimarkaur
abe78ebb8e Removed shutup 2017-08-27 01:23:32 +05:30
mansimarkaur
4f0f55a774 Used system command to run git commands 2017-08-27 01:23:32 +05:30
mansimarkaur
660617a35b Added tests for Utils 2017-08-27 01:23:32 +05:30
mansimarkaur
657b6ef7fb Added tests for git_available? 2017-08-27 01:23:32 +05:30
mansimarkaur
d91036e891 Added tests for last_revision_commit_of_file 2017-08-27 01:23:32 +05:30