From 00c70ea2bc73ae27500afbef174fb959f70b6a5b Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sat, 29 Oct 2022 08:18:52 -0400 Subject: [PATCH 1/2] make git ignore .DS_Store by default --- projects/git-scm.org/gitconfig | 2 ++ projects/git-scm.org/gitignore | 2 ++ projects/git-scm.org/package.yml | 11 +++++++++++ 3 files changed, 15 insertions(+) create mode 100644 projects/git-scm.org/gitconfig create mode 100644 projects/git-scm.org/gitignore diff --git a/projects/git-scm.org/gitconfig b/projects/git-scm.org/gitconfig new file mode 100644 index 00000000..4725a818 --- /dev/null +++ b/projects/git-scm.org/gitconfig @@ -0,0 +1,2 @@ +[core] + excludesfile = ./gitignore diff --git a/projects/git-scm.org/gitignore b/projects/git-scm.org/gitignore new file mode 100644 index 00000000..99397bf9 --- /dev/null +++ b/projects/git-scm.org/gitignore @@ -0,0 +1,2 @@ +# banish ye, the bane of our existence +.DS_Store diff --git a/projects/git-scm.org/package.yml b/projects/git-scm.org/package.yml index 5ed1495d..1e39ee5c 100644 --- a/projects/git-scm.org/package.yml +++ b/projects/git-scm.org/package.yml @@ -23,6 +23,9 @@ build: cd "{{prefix}}" DEBUG=1 fix-shebangs.ts bin/* libexec/git-core/* + + mkdir etc + cp "$SRCROOT"/props/git* etc env: V: 1 BAKE: @@ -31,7 +34,15 @@ build: CONF: - --prefix={{ prefix }} - --with-perl={{ deps.perl.org.prefix }} + - --with-gitconfig=etc/gitconfig INSTALL_STRIP: -s test: | git clone https://github.com/teaxyz/white-paper + + mkdir foo + cd foo + touch .DS_Store testfile + git init + git add . + test "$(git diff --name-only --cached)" = "testfile" From 2fb13080d3528a86032113f03cfe102607d4c9ed Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Mon, 31 Oct 2022 20:43:49 -0400 Subject: [PATCH 2/2] %(prefix)/etc/gitignore search path --- projects/git-scm.org/gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/git-scm.org/gitconfig b/projects/git-scm.org/gitconfig index 4725a818..2362cfc5 100644 --- a/projects/git-scm.org/gitconfig +++ b/projects/git-scm.org/gitconfig @@ -1,2 +1,2 @@ [core] - excludesfile = ./gitignore + excludesfile = %(prefix)/etc/gitignore