Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
combine-diff: convert find_paths_* to struct object_id
author
Brandon Williams
<bmwill@google.com>
Tue, 30 May 2017 17:30:56 +0000
(10:30 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 2 Jun 2017 00:36:07 +0000
(09:36 +0900)
Convert find_paths_generic and find_paths_multitree to use struct
object_id.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
combine-diff.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
b9acf54
)
diff --git
a/combine-diff.c
b/combine-diff.c
index 84981df75271be951f2f10c3c29727cc1695993e..c823645106bde99c24c0942c8938f59768fb5a5b 100644
(file)
--- a/
combine-diff.c
+++ b/
combine-diff.c
@@
-1311,7
+1311,7
@@
static const char *path_path(void *obj)
/* find set of paths that every parent touches */
/* find set of paths that every parent touches */
-static struct combine_diff_path *find_paths_generic(const
unsigned char *sha1
,
+static struct combine_diff_path *find_paths_generic(const
struct object_id *oid
,
const struct oid_array *parents, struct diff_options *opt)
{
struct combine_diff_path *paths = NULL;
const struct oid_array *parents, struct diff_options *opt)
{
struct combine_diff_path *paths = NULL;
@@
-1336,7
+1336,7
@@
static struct combine_diff_path *find_paths_generic(const unsigned char *sha1,
opt->output_format = stat_opt;
else
opt->output_format = DIFF_FORMAT_NO_OUTPUT;
opt->output_format = stat_opt;
else
opt->output_format = DIFF_FORMAT_NO_OUTPUT;
- diff_tree_sha1(parents->oid[i].hash,
sha1
, "", opt);
+ diff_tree_sha1(parents->oid[i].hash,
oid->hash
, "", opt);
diffcore_std(opt);
paths = intersect_paths(paths, i, num_parent);
diffcore_std(opt);
paths = intersect_paths(paths, i, num_parent);
@@
-1360,7
+1360,7
@@
static struct combine_diff_path *find_paths_generic(const unsigned char *sha1,
* rename/copy detection, etc, comparing all trees simultaneously (= faster).
*/
static struct combine_diff_path *find_paths_multitree(
* rename/copy detection, etc, comparing all trees simultaneously (= faster).
*/
static struct combine_diff_path *find_paths_multitree(
- const
unsigned char *sha1
, const struct oid_array *parents,
+ const
struct object_id *oid
, const struct oid_array *parents,
struct diff_options *opt)
{
int i, nparent = parents->nr;
struct diff_options *opt)
{
int i, nparent = parents->nr;
@@
-1376,7
+1376,7
@@
static struct combine_diff_path *find_paths_multitree(
paths_head.next = NULL;
strbuf_init(&base, PATH_MAX);
paths_head.next = NULL;
strbuf_init(&base, PATH_MAX);
- diff_tree_paths(&paths_head,
sha1
, parents_sha1, nparent, &base, opt);
+ diff_tree_paths(&paths_head,
oid->hash
, parents_sha1, nparent, &base, opt);
strbuf_release(&base);
free(parents_sha1);
strbuf_release(&base);
free(parents_sha1);
@@
-1448,11
+1448,11
@@
void diff_tree_combined(const struct object_id *oid,
* diff(sha1,parent_i) for all i to do the job, specifically
* for parent0.
*/
* diff(sha1,parent_i) for all i to do the job, specifically
* for parent0.
*/
- paths = find_paths_generic(oid
->hash
, parents, &diffopts);
+ paths = find_paths_generic(oid, parents, &diffopts);
}
else {
int stat_opt;
}
else {
int stat_opt;
- paths = find_paths_multitree(oid
->hash
, parents, &diffopts);
+ paths = find_paths_multitree(oid, parents, &diffopts);
/*
* show stat against the first parent even
/*
* show stat against the first parent even