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

[PATCH v6 0/2] Honor .gitattributes with rebase --am

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Sep 2, 2019, 22:39 UTC
Message-ID
<20190902223944.897504-1-sandals@crustytoothpaste.net>
In-Reply-To
<20190825233340.10894-1-sandals@crustytoothpaste.net>

This series makes rebase --am honor the .gitattributes file for subsequent patches when a patch changes it.

Changes from v5:
* Avoid leaking memory from already parsed filter rules.
Changes from v4:
* Wrap lines in apply.c.
* Handle merge and conflict-marker-size attributes.
* Add tests for am and am -3 in addition to rebase.
Changes from v3:
* Check for both addition and removal of .gitattributes files.
* Switch from "test_config" to "git config".
Changes from v2:
* Rename has_path_suffix to ends_with_path_components.
Changes from v1:
* Add has_path_suffix in a separate commit.
brian m. carlson (2):
  path: add a function to check for path suffix
  am: reload .gitattributes after patching it
 apply.c           | 11 ++++++++++
 convert.c         | 21 ++++++++++++++++++-
 convert.h         |  6 ++++++
 ll-merge.c        | 19 +++++++++++++----
 ll-merge.h        |  1 +
 path.c            | 39 +++++++++++++++++++++++++++--------
 path.h            |  3 +++
 t/t3400-rebase.sh | 36 ++++++++++++++++++++++++++++++++
 t/t4150-am.sh     | 52 +++++++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 174 insertions(+), 14 deletions(-)
Range-diff against v5:
1:  2077a0829e ! 1:  1573fbd82d am: reload .gitattributes after patching it
    @@ convert.c: static void convert_attrs(const struct index_state *istate,
      
     +void reset_parsed_attributes(void)
     +{
    ++	struct convert_driver *drv, *next;
    ++
     +	attr_check_free(check);
     +	check = NULL;
     +	reset_merge_attributes();
    ++
    ++	for (drv = user_convert; drv; drv = next) {
    ++		next = drv->next;
    ++		free((void *)drv->name);
    ++		free(drv);
    ++	}
    ++	user_convert = NULL;
    ++	user_convert_tail = NULL;
     +}
     +
      int would_convert_to_git_filter_fd(const struct index_state *istate, const char *path)
Previous: Phillip WoodNext: brian m. carlson
Message 8 of 10 in “Honor .gitattributes with rebase --am”
  1. 0/2 Honor .gitattributes with rebase --ambrian m. carlson, Aug 25, 2019
  2. 1/2 path: add a function to check for path suffixbrian m. carlson, Aug 25, 2019
  3. 2/2 am: reload .gitattributes after patching itbrian m. carlson, Aug 25, 2019
  4. Johannes SchindelinAug 28, 2019
  5. brian m. carlsonAug 29, 2019
  6. Johannes SchindelinAug 30, 2019
  7. Phillip WoodAug 26, 2019
  8. 0/2 Honor .gitattributes with rebase --ambrian m. carlson, Sep 2, 2019
  9. 1/2 path: add a function to check for path suffixbrian m. carlson, Sep 2, 2019
  10. 2/2 am: reload .gitattributes after patching itbrian m. carlson, Sep 2, 2019

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.