Merge branch 'dl/range-diff-with-notes'
Code clean-up. * dl/range-diff-with-notes: range-diff: clear `other_arg` at end of function range-diff: mark pointers as const t3206: fix incorrect test name
This commit is contained in:
commit
d1c0fe8d9b
@ -84,6 +84,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
|
|||||||
res = show_range_diff(range1.buf, range2.buf, creation_factor,
|
res = show_range_diff(range1.buf, range2.buf, creation_factor,
|
||||||
simple_color < 1, &diffopt, &other_arg);
|
simple_color < 1, &diffopt, &other_arg);
|
||||||
|
|
||||||
|
argv_array_clear(&other_arg);
|
||||||
strbuf_release(&range1);
|
strbuf_release(&range1);
|
||||||
strbuf_release(&range2);
|
strbuf_release(&range2);
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ static size_t find_end_of_line(char *buffer, unsigned long size)
|
|||||||
* as struct object_id (will need to be free()d).
|
* as struct object_id (will need to be free()d).
|
||||||
*/
|
*/
|
||||||
static int read_patches(const char *range, struct string_list *list,
|
static int read_patches(const char *range, struct string_list *list,
|
||||||
struct argv_array *other_arg)
|
const struct argv_array *other_arg)
|
||||||
{
|
{
|
||||||
struct child_process cp = CHILD_PROCESS_INIT;
|
struct child_process cp = CHILD_PROCESS_INIT;
|
||||||
struct strbuf buf = STRBUF_INIT, contents = STRBUF_INIT;
|
struct strbuf buf = STRBUF_INIT, contents = STRBUF_INIT;
|
||||||
@ -506,8 +506,8 @@ static struct strbuf *output_prefix_cb(struct diff_options *opt, void *data)
|
|||||||
|
|
||||||
int show_range_diff(const char *range1, const char *range2,
|
int show_range_diff(const char *range1, const char *range2,
|
||||||
int creation_factor, int dual_color,
|
int creation_factor, int dual_color,
|
||||||
struct diff_options *diffopt,
|
const struct diff_options *diffopt,
|
||||||
struct argv_array *other_arg)
|
const struct argv_array *other_arg)
|
||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
int show_range_diff(const char *range1, const char *range2,
|
int show_range_diff(const char *range1, const char *range2,
|
||||||
int creation_factor, int dual_color,
|
int creation_factor, int dual_color,
|
||||||
struct diff_options *diffopt,
|
const struct diff_options *diffopt,
|
||||||
struct argv_array *other_arg);
|
const struct argv_array *other_arg);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -638,7 +638,7 @@ test_expect_success 'format-patch --range-diff with --notes' '
|
|||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'format-patch --range-diff with --notes' '
|
test_expect_success 'format-patch --range-diff with format.notes config' '
|
||||||
git notes add -m "topic note" topic &&
|
git notes add -m "topic note" topic &&
|
||||||
git notes add -m "unmodified note" unmodified &&
|
git notes add -m "unmodified note" unmodified &&
|
||||||
test_when_finished git notes remove topic unmodified &&
|
test_when_finished git notes remove topic unmodified &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user