mirror of
https://github.com/git/git.git
synced 2024-11-27 12:03:55 +08:00
2c65d90f75
When applying multiple patches with git am, or when rebasing using the am backend, it's possible that one of our patches has updated a gitattributes file. Currently, we cache this information, so if a file in a subsequent patch has attributes applied, the file will be written out with the attributes in place as of the time we started the rebase or am operation, not with the attributes applied by the previous patch. This problem does not occur when using the -m or -i flags to rebase. To ensure we write the correct data into the working tree, expire the cache after each patch that touches a path ending in ".gitattributes". Since we load these attributes in multiple separate files, we must expire them accordingly. Verify that both the am and rebase code paths work correctly, including the conflict marker size with am -3. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
32 lines
740 B
C
32 lines
740 B
C
/*
|
|
* Low level 3-way in-core file merge.
|
|
*/
|
|
|
|
#ifndef LL_MERGE_H
|
|
#define LL_MERGE_H
|
|
|
|
#include "xdiff/xdiff.h"
|
|
|
|
struct index_state;
|
|
|
|
struct ll_merge_options {
|
|
unsigned virtual_ancestor : 1;
|
|
unsigned variant : 2; /* favor ours, favor theirs, or union merge */
|
|
unsigned renormalize : 1;
|
|
unsigned extra_marker_size;
|
|
long xdl_opts;
|
|
};
|
|
|
|
int ll_merge(mmbuffer_t *result_buf,
|
|
const char *path,
|
|
mmfile_t *ancestor, const char *ancestor_label,
|
|
mmfile_t *ours, const char *our_label,
|
|
mmfile_t *theirs, const char *their_label,
|
|
struct index_state *istate,
|
|
const struct ll_merge_options *opts);
|
|
|
|
int ll_merge_marker_size(struct index_state *istate, const char *path);
|
|
void reset_merge_attributes(void);
|
|
|
|
#endif
|