[go: up one dir, main page]

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: lint-staged/lint-staged
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v10.2.9
Choose a base ref
...
head repository: lint-staged/lint-staged
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v10.2.10
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jun 12, 2020

  1. fix: Git directory is not correctly resolved if GIT_WORK_TREE is set …

    …to relative path (#887)
    
    Resolving the git directory failed if the environment variable `GIT_WORK_TREE` is set to a relative path and lint-staged is run from a subdirectory of a Git repository (e.g. multi-package repos).
    
    `GIT_WORK_TREE` can be used to set the worktree directory for a Git repo. `GIT_DIR` specifies only the `.git` directory path. `git rev-parse --show-toplevel` will return the Git worktree directory. If it is set to a relative path, it won't work when git commands are called from a subdirectory, as the relative path will fail to resolve correctly.
    
    While `GIT_DIR` is unset in `resolveGitRepo.js`, `GIT_WORK_TREE` was not. Unsetting `GIT_WORK_TREE` in the same place fixes the issue.
    alexrinass authored Jun 12, 2020
    Configuration menu
    Copy the full SHA
    a1904ec View commit details
    Browse the repository at this point in the history
Loading