Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
blame: move xdl_opts flags to scoreboard
author
Jeff Smith
<whydoubt@gmail.com>
Wed, 24 May 2017 05:15:23 +0000
(
00:15
-0500)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 24 May 2017 06:41:51 +0000
(15:41 +0900)
The xdl_opts flags are used in parts of blame that are being moved to
libgit, and should be accessible via the scoreboard structure.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/blame.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
2cf8337
)
diff --git
a/builtin/blame.c
b/builtin/blame.c
index fdd41b41be019161f798bb676aeadd89ec10b23a..8e676fb933d06ff7d2112f56cc1f3070fd47a6b5 100644
(file)
--- a/
builtin/blame.c
+++ b/
builtin/blame.c
@@
-125,7
+125,7
@@
struct progress_info {
};
static int diff_hunks(mmfile_t *file_a, mmfile_t *file_b,
};
static int diff_hunks(mmfile_t *file_a, mmfile_t *file_b,
- xdl_emit_hunk_consume_func_t hunk_func, void *cb_data)
+ xdl_emit_hunk_consume_func_t hunk_func, void *cb_data
, int xdl_opts
)
{
xpparam_t xpp = {0};
xdemitconf_t xecfg = {0};
{
xpparam_t xpp = {0};
xdemitconf_t xecfg = {0};
@@
-385,6
+385,7
@@
struct blame_scoreboard {
/* flags */
int reverse;
int show_root;
/* flags */
int reverse;
int show_root;
+ int xdl_opts;
};
static void sanity_check_refcnt(struct blame_scoreboard *);
};
static void sanity_check_refcnt(struct blame_scoreboard *);
@@
-948,7
+949,7
@@
static void pass_blame_to_parent(struct blame_scoreboard *sb,
fill_origin_blob(&sb->revs->diffopt, target, &file_o, &sb->num_read_blob);
sb->num_get_patch++;
fill_origin_blob(&sb->revs->diffopt, target, &file_o, &sb->num_read_blob);
sb->num_get_patch++;
- if (diff_hunks(&file_p, &file_o, blame_chunk_cb, &d))
+ if (diff_hunks(&file_p, &file_o, blame_chunk_cb, &d
, sb->xdl_opts
))
die("unable to generate diff (%s -> %s)",
oid_to_hex(&parent->commit->object.oid),
oid_to_hex(&target->commit->object.oid));
die("unable to generate diff (%s -> %s)",
oid_to_hex(&parent->commit->object.oid),
oid_to_hex(&target->commit->object.oid));
@@
-1097,7
+1098,7
@@
static void find_copy_in_blob(struct blame_scoreboard *sb,
* file_p partially may match that image.
*/
memset(split, 0, sizeof(struct blame_entry [3]));
* file_p partially may match that image.
*/
memset(split, 0, sizeof(struct blame_entry [3]));
- if (diff_hunks(file_p, &file_o, handle_split_cb, &d))
+ if (diff_hunks(file_p, &file_o, handle_split_cb, &d
, sb->xdl_opts
))
die("unable to generate diff (%s)",
oid_to_hex(&parent->commit->object.oid));
/* remainder, if any, all match the preimage */
die("unable to generate diff (%s)",
oid_to_hex(&parent->commit->object.oid));
/* remainder, if any, all match the preimage */
@@
-2887,6
+2888,7
@@
int cmd_blame(int argc, const char **argv, const char *prefix)
sb.copy_score = blame_copy_score;
sb.show_root = show_root;
sb.copy_score = blame_copy_score;
sb.show_root = show_root;
+ sb.xdl_opts = xdl_opts;
read_mailmap(&mailmap, NULL);
read_mailmap(&mailmap, NULL);