Remove unneeded parameters in diff_unmerge() and diff_get_patch_id()
PATCH 1/1 Remove unneeded parameters in diff_unmerge() and diff_get_patch_id()
Signed-off-by Michael <[email protected]>
--- diff-lib.c | 4 ++-- diff.c | 7 +++---- diff.h | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-)
diff-lib.c +2 -2
@@ -97,7 +97,7 @@ int run_diff_files(struct rev_info *revs* Show the diff for the 'ce' if we found the one * from the desired stage. */ -diff_unmerge (&revs->diffopt, ce->name); +diff_unmerge (ce->name);if (ce_stage (ce) != diff_unmerged_stage)continue ; }
@@ -299,7 +299,7 @@ static int diff_cache(struct rev_info *rbreak ;/* fallthru */ case 3 : -diff_unmerge (&revs->diffopt, ce->name); +diff_unmerge (ce->name);break ;default :
diff.c +0 -1
@@ -2448,7 +2448,7 @@ static void patch_id_consume(void *priv, }/* returns 0 upon success, and writes result into sha1 */ -static int diff_get_patch_id(struct diff_options *options, unsigned char
*sha1)
+static int diff_get_patch_id(unsigned char *sha1)
{
struct diff_queue_struct *q = &diff_queued_diff; int i;
@@ -2540,7 +2540,7 @@ int diff_flush_patch_id(struct diff_opti
{
struct diff_queue_struct *q = &diff_queued_diff; int i;
- int result = diff_get_patch_id(options, sha1);
+ int result = diff_get_patch_id(sha1);
for (i = 0; i < q->nr; i++)
diff_free_filepair(q->queue[i]);
@@ -2794,8 +2794,7 @@ void diff_change(struct diff_options *op
diff_queue(&diff_queued_diff, one, two);
}
-void diff_unmerge(struct diff_options *options,
- const char *path)
+void diff_unmerge(const char *path)
{
struct diff_filespec *one, *two;
one = alloc_filespec(path);
diff.h +1 -2
@@ -138,8 +138,7 @@ extern void diff_change(struct diff_opticonst unsigned char *sha2, const char *base, const char *path); -extern void diff_unmerge (struct diff_options *, -const char *path); +extern void diff_unmerge (const char *path);extern int diff_scoreopt_parse (const char *opt);
Signature · 1 line
1.4.3.3