1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-04 14:46:39 +02:00
git/range-diff.h
Junio C Hamano dadc91ff0c Merge branch 'js/range-diff-one-side-only'
The "git range-diff" command learned "--(left|right)-only" option
to show only one side of the compared range.

* js/range-diff-one-side-only:
  range-diff: offer --left-only/--right-only options
  range-diff: move the diffopt initialization down one layer
  range-diff: combine all options in a single data structure
  range-diff: simplify code spawning `git log`
  range-diff: libify the read_patches() function again
  range-diff: avoid leaking memory in two error code paths
2021-02-17 17:21:41 -08:00

31 lines
711 B
C

#ifndef RANGE_DIFF_H
#define RANGE_DIFF_H
#include "diff.h"
#include "strvec.h"
#define RANGE_DIFF_CREATION_FACTOR_DEFAULT 60
struct range_diff_options {
int creation_factor;
unsigned dual_color:1;
unsigned left_only:1, right_only:1;
const struct diff_options *diffopt; /* may be NULL */
const struct strvec *other_arg; /* may be NULL */
};
/*
* Compare series of commits in `range1` and `range2`, and emit to the
* standard output.
*/
int show_range_diff(const char *range1, const char *range2,
struct range_diff_options *opts);
/*
* Determine whether the given argument is usable as a range argument of `git
* range-diff`, e.g. A..B.
*/
int is_range_diff_range(const char *arg);
#endif