[PATCH 0/2] diff: support bare repositories when reading gitattributes for diff algorithm
- From
John Cai via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Mar 14, 2023, 01:53 UTC
- Message-ID
- <pull.1459.git.git.1678758818.gitgitgadget@gmail.com>
This patch series adds support for bare repositories for the feature added in [1]. When using a bare repository, by default we will look for gitattributes from HEAD. When the --attr-source option is passed, we will try to read gitattributes from the commit.
A side effect of this patch series is that custom drivers will now also work with bare repositories.
1. (a4cf900ee7 diff: teach diff to read algorithm from diff driver,
2022-02-20)John Cai (2): diff: use HEAD for attributes when using bare repository diff: add --attr-source to read gitattributes from a commit
Documentation/diff-options.txt | 4 ++++ Documentation/gitattributes.txt | 8 +++++++ diff.c | 37 ++++++++++++++++++++++++++++++--- diff.h | 1 + t/lib-diff-alternative.sh | 33 ++++++++++++++++++++++++----- t/t4018-diff-funcname.sh | 29 ++++++++++++++++++++++++++ userdiff.c | 9 +++++++- userdiff.h | 4 ++++ 8 files changed, 116 insertions(+), 9 deletions(-)
base-commit: d15644fe0226af7ffc874572d968598564a230dd Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1459%2Fjohn-cai%2Fjc%2Fdiff-attr-bare-repo-v1 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1459/john-cai/jc/diff-attr-bare-repo-v1 Pull-Request: https://github.com/git/git/pull/1459
-- gitgitgadget