git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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
Next: John Cai via GitGitGadget
Message 1 of 15 in “diff: support bare repositories when reading gitattributes for diff algorithm”
  1. 0/2 diff: support bare repositories when reading gitattributes for diff algorithmJohn Cai via GitGitGadget, Mar 14, 2023
  2. 2/2 diff: add --attr-source to read gitattributes from a commitJohn Cai via GitGitGadget, Mar 14, 2023
  3. 1/2 diff: use HEAD for attributes when using bare repositoryJohn Cai via GitGitGadget, Mar 14, 2023
  4. Junio C HamanoMar 14, 2023
  5. Junio C HamanoMar 14, 2023
  6. John CaiMar 14, 2023
  7. Junio C HamanoMar 14, 2023
  8. John CaiMar 16, 2023
  9. Junio C HamanoMar 16, 2023
  10. John CaiMar 17, 2023
  11. Philippe BlainMar 14, 2023
  12. John CaiMar 14, 2023
  13. Junio C HamanoMar 14, 2023
  14. Jeff KingMar 16, 2023
  15. Junio C HamanoMar 16, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.