Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sds/overcommit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 56f7339
Choose a base ref
...
head repository: sds/overcommit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6223ce2
Choose a head ref
  • 4 commits
  • 4 files changed
  • 1 contributor

Commits on Apr 10, 2015

  1. Fix GitRepo specs for git < 1.8.5

    `git` < 1.8.5 does not update the `.gitmodules` file with submodule
    changes, so when we are looking at the current state of the work tree
    we need to check if the submodule actually exists via another method,
    since the `.gitmodules` file we parsed does not represent reality.
    
    At some point we're likely going to want to have a helper that provides
    a convenient way for us to conditionally run code based on the `git`
    version Overcommit is using.
    sds committed Apr 10, 2015
    Configuration menu
    Copy the full SHA
    61e5d36 View commit details
    Browse the repository at this point in the history
  2. Add Overcommit::Utils::Version helper class

    This will be used in an upcoming commit to support easy switching of
    behavior based on git version. It piggybacks on `Gem::Version` to give
    us easy version comparisons without any effort on our part, and defines
    a shortcut helper so we don't need to explicitly convert version strings
    to objects in order to compare.
    sds committed Apr 10, 2015
    Configuration menu
    Copy the full SHA
    b5e6c0e View commit details
    Browse the repository at this point in the history
  3. Add GIT_VERSION magic constant

    Add a constant which makes it convenient to execute code based on the
    version of git we're running. Returning the `Overcommit::Utils::Version`
    class, doing a comparison is now as simple as writing:
    
        if GIT_VERSION < '1.8.5'
          ...
        end
    sds committed Apr 10, 2015
    Configuration menu
    Copy the full SHA
    40384fc View commit details
    Browse the repository at this point in the history
  4. Conditionally execute submodule check for git < 1.8.5

    This check incurs a performance penalty that grows with the number of
    submodules. Better to run it only when we absolutely have to.
    sds committed Apr 10, 2015
    Configuration menu
    Copy the full SHA
    6223ce2 View commit details
    Browse the repository at this point in the history
Loading