diff --git a/dev-vcs/git/git-2.15.1.recipe b/dev-vcs/git/git-2.15.1.recipe index 1d099d21a..bebf40b1f 100644 --- a/dev-vcs/git/git-2.15.1.recipe +++ b/dev-vcs/git/git-2.15.1.recipe @@ -10,7 +10,7 @@ workflows." HOMEPAGE="https://git-scm.com/" COPYRIGHT="2005-2017 Git Authors (see git web site for list)" LICENSE="GNU GPL v2" -REVISION="1" +REVISION="2" SOURCE_URI="https://www.kernel.org/pub/software/scm/git/git-$portVersion.tar.xz" CHECKSUM_SHA256="999c90fd7d45066992cdb87dda35bdff6dfc1d01496118ea718dfb866da4045c" diff --git a/dev-vcs/git/patches/git-2.15.1.patchset b/dev-vcs/git/patches/git-2.15.1.patchset index fdadb80b0..f6d1675d8 100644 --- a/dev-vcs/git/patches/git-2.15.1.patchset +++ b/dev-vcs/git/patches/git-2.15.1.patchset @@ -129,3 +129,44 @@ index 1cccc3a..076f6fa 100644 -- 2.14.2 + +From 6cc7223d58b1fbb829d462e682ba32b7ebf91404 Mon Sep 17 00:00:00 2001 +From: sfanxiang +Date: Mon, 1 Jan 2018 13:26:28 +0000 +Subject: builtin: config: use xdg_config even if it does not exist + + +diff --git a/builtin/config.c b/builtin/config.c +index d13daee..2342d34 100644 +--- a/builtin/config.c ++++ b/builtin/config.c +@@ -508,22 +508,11 @@ int cmd_config(int argc, const char **argv, const char *prefix) + char *user_config = expand_user_path("~/.gitconfig", 0); + char *xdg_config = xdg_config_home("config"); + +- if (!user_config) +- /* +- * It is unknown if HOME/.gitconfig exists, so +- * we do not know if we should write to XDG +- * location; error out even if XDG_CONFIG_HOME +- * is set and points at a sane location. +- */ +- die("$HOME not set"); +- +- if (access_or_warn(user_config, R_OK, 0) && +- xdg_config && !access_or_warn(xdg_config, R_OK, 0)) { +- given_config_source.file = xdg_config; +- free(user_config); +- } else { ++ if (!xdg_config) { + given_config_source.file = user_config; +- free(xdg_config); ++ } else { ++ given_config_source.file = xdg_config; ++ if (user_config) free(user_config); + } + } + else if (use_system_config) +-- +2.15.1 +