aboutsummaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martin.von.zweigbergk@gmail.com>2012-07-27 10:21:38 -0700
committerJunio C Hamano <gitster@pobox.com>2012-07-29 14:54:13 -0700
commit811929f1695ed7de15cad14b9335534af672b472 (patch)
tree80c5b45e3b46db1ee58f1307cfe0ebc7435b8b2a /builtin/log.c
parentcdd159b2f56c9e69e37bbb8f5af301abd93e5407 (diff)
downloadgit-811929f1695ed7de15cad14b9335534af672b472.tar.gz
git-811929f1695ed7de15cad14b9335534af672b472.tar.xz
remove unnecessary parameter from get_patch_ids()
get_patch_ids() takes an already initialized rev_info and a prefix. The prefix is used when initalizing a second rev_info. Since the initialized rev_info already has a prefix and the prefix never changes, we can use the prefix from the initialized rev_info to initialize the second rev_info. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/log.c b/builtin/log.c
index ecc279369..7a92e3f57 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -696,7 +696,7 @@ static int reopen_stdout(struct commit *commit, const char *subject,
return 0;
}
-static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const char *prefix)
+static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
{
struct rev_info check_rev;
struct commit *commit;
@@ -717,7 +717,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids, const cha
init_patch_ids(ids);
/* given a range a..b get all patch ids for b..a */
- init_revisions(&check_rev, prefix);
+ init_revisions(&check_rev, rev->prefix);
o1->flags ^= UNINTERESTING;
o2->flags ^= UNINTERESTING;
add_pending_object(&check_rev, o1, "o1");
@@ -1306,7 +1306,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
if (hashcmp(o[0].item->sha1, o[1].item->sha1) == 0)
return 0;
}
- get_patch_ids(&rev, &ids, prefix);
+ get_patch_ids(&rev, &ids);
}
if (!use_stdout)
@@ -1525,7 +1525,7 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
return 0;
}
- get_patch_ids(&revs, &ids, prefix);
+ get_patch_ids(&revs, &ids);
if (limit && add_pending_commit(limit, &revs, UNINTERESTING))
die(_("Unknown commit %s"), limit);