Re: [PATCH v3 2/2] apply: reload .gitattributes after patching it
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 13, 2019, 22:37 UTC
- Message-ID
- <xmqq36i47ku3.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20190813024307.705016-3-sandals@crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 7 quoted lines
> +test_expect_success 'rebase --am and .gitattributes' ' > + test_create_repo attributes && > + ( > + cd attributes && > + test_commit init && > + test_config filter.test.clean "sed -e '\''s/smudged/clean/g'\''" && > + test_config filter.test.smudge "sed -e '\''s/clean/smudged/g'\''" &&
These eventually invokes test-when-finished for cleaning things up, that cannot be called inside a subshell. The "attributes" test repository is a throw-away reopsitory, so we should be able to just use "git config" to set the variables locally in it, no?
Show 18 quoted lines
> + test_commit second && > + git checkout -b test HEAD^ && > + > + echo "*.txt filter=test" >.gitattributes && > + git add .gitattributes && > + test_commit third && > + > + echo "This text is smudged." >a.txt && > + git add a.txt && > + test_commit fourth && > + git rebase master && > + grep "smudged" a.txt > + ) > +' > + > test_expect_success 'rebase--merge.sh and --show-current-patch' ' > test_create_repo conflict-merge && > (