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/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d9bdfd6d0bd5
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 924e5cdc556f
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 15, 2020

  1. git: Allow the update script to target non-latest versions

    This came in handy when I wanted to bump a patch version while avoiding
    a new minor version.
    James Ottaway committed Apr 15, 2020
    Copy the full SHA
    4848eef View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    924e5cd View commit details
Showing with 4 additions and 3 deletions.
  1. +4 −3 pkgs/applications/version-management/git-and-tools/git/update.sh
Original file line number Diff line number Diff line change
@@ -5,14 +5,15 @@ set -eu -o pipefail

oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion git" | tr -d '"')"
latestTag="$(git ls-remote --tags --sort="v:refname" git://github.com/git/git.git | grep -v '\{\}' | grep -v '\-rc' | tail -1 | sed 's|^.*/v\(.*\)|\1|')"
targetVersion="${1:-latestTag}"

if [ ! "${oldVersion}" = "${latestTag}" ]; then
update-source-version git "${latestTag}"
if [ ! "${oldVersion}" = "${targetVersion}" ]; then
update-source-version git "${targetVersion}"
nixpkgs="$(git rev-parse --show-toplevel)"
default_nix="$nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix"
nix-build -A git
git add "${default_nix}"
git commit -m "git: ${oldVersion} -> ${latestTag}"
git commit -m "git: ${oldVersion} -> ${targetVersion}"
else
echo "git is already up-to-date"
fi