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: NixOS/nix
base: f60ce4fa207a
Choose a base ref
...
head repository: NixOS/nix
compare: 0748a72a2057
Choose a head ref
  • 3 commits
  • 5 files changed
  • 2 contributors

Commits on May 30, 2020

  1. Improve ref validity checking in fetchGit

    The previous regex was too strict and did not match what git was allowing. It
    could lead to `fetchGit` not accepting valid branch names, even though they
    exist in a repository (for example, branch names containing `/`, which are
    pretty standard, like `release/1.0` branches).
    
    The new regex defines what a branch name should **NOT** contain. It takes the
    definitions from `refs.c` in https://github.com/git/git and `git help
    check-ref-format` pages.
    
    This change also introduces a test for ref name validity checking, which
    compares the result from Nix with the result of `git check-ref-format --branch`.
    knl committed May 30, 2020
    Copy the full SHA
    77007d4 View commit details
    Browse the repository at this point in the history
  2. Ensure we restrict refspec interpretation while fetching

    As `git fetch` may chose to interpret refspec to it's liking, ensure that we
    only pass refs that begin with `refs/` as is, otherwise, prepend them with
    `refs/heads`. Otherwise, branches named `heads/foo` (I know it's bad, but it's
    allowed), would be fetched as `foo`, instead of `heads/foo`.
    knl committed May 30, 2020
    Copy the full SHA
    fb38459 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2020

  1. Merge pull request #3642 from knl/improve-ref-validity-checking-in-fe…

    …tchgit
    
    Improve ref validity checking in fetchgit
    edolstra committed Jun 2, 2020
    Copy the full SHA
    0748a72 View commit details
    Browse the repository at this point in the history