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 /entry.c | |
| parent | fa82be982dfc5b463a125991a2d381f1cd0ad9eb (diff) | |
| parent | 0c0f8a7f28672fa323312fbba394e5a9949b2aad (diff) | |
| download | git-4e4baee3f44da26a5eaab27c76d597b04fef5259.tar.xz | |
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 'entry.c')
| -rw-r--r-- | entry.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -264,6 +264,9 @@ static int write_entry(struct cache_entry *ce, size_t newsize = 0; struct stat st; const struct submodule *sub; + struct checkout_metadata meta; + + clone_checkout_metadata(&meta, &state->meta, &ce->oid); if (ce_mode_s_ifmt == S_IFREG) { struct stream_filter *filter = get_stream_filter(state->istate, ce->name, @@ -315,13 +318,13 @@ static int write_entry(struct cache_entry *ce, */ if (dco && dco->state != CE_NO_DELAY) { ret = async_convert_to_working_tree(state->istate, ce->name, new_blob, - size, &buf, dco); + size, &buf, &meta, dco); if (ret && string_list_has_string(&dco->paths, ce->name)) { free(new_blob); goto delayed; } } else - ret = convert_to_working_tree(state->istate, ce->name, new_blob, size, &buf); + ret = convert_to_working_tree(state->istate, ce->name, new_blob, size, &buf, &meta); if (ret) { free(new_blob); |
