diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-03-26 17:11:20 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-03-26 17:11:20 -0700 |
| commit | 4e4baee3f44da26a5eaab27c76d597b04fef5259 (patch) | |
| tree | 5d0ebb218dddd9fc17531ac75d140bf59eb056da /diff.c | |
| parent | Merge branch 'hi/gpg-prefer-check-signature' (diff) | |
| parent | t0021: test filter metadata for additional cases (diff) | |
| download | git-4e4baee3f44da26a5eaab27c76d597b04fef5259.tar.gz git-4e4baee3f44da26a5eaab27c76d597b04fef5259.zip | |
Merge branch 'bc/filter-process'
Provide more information (e.g. the object of the tree-ish in which
the blob being converted appears, in addition to its path, which
has already been given) to smudge/clean conversion filters.
* bc/filter-process:
t0021: test filter metadata for additional cases
builtin/reset: compute checkout metadata for reset
builtin/rebase: compute checkout metadata for rebases
builtin/clone: compute checkout metadata for clones
builtin/checkout: compute checkout metadata for checkouts
convert: provide additional metadata to filters
convert: permit passing additional metadata to filter processes
builtin/checkout: pass branch info down to checkout_worktree
Diffstat (limited to 'diff.c')
| -rw-r--r-- | diff.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -4062,6 +4062,9 @@ static void prep_temp_blob(struct index_state *istate, struct strbuf tempfile = STRBUF_INIT; char *path_dup = xstrdup(path); const char *base = basename(path_dup); + struct checkout_metadata meta; + + init_checkout_metadata(&meta, NULL, NULL, oid); /* Generate "XXXXXX_basename.ext" */ strbuf_addstr(&tempfile, "XXXXXX_"); @@ -4071,7 +4074,7 @@ static void prep_temp_blob(struct index_state *istate, if (!temp->tempfile) die_errno("unable to create temp-file"); if (convert_to_working_tree(istate, path, - (const char *)blob, (size_t)size, &buf)) { + (const char *)blob, (size_t)size, &buf, &meta)) { blob = buf.buf; size = buf.len; } |
