diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-08-13 14:33:02 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-13 20:44:50 +0300 |
commit | 348ae56cb2266d3294611112ae0368386124d720 (patch) | |
tree | 03eff04adfb793e146d364cac71f96415709e4d4 /builtin/range-diff.c | |
parent | 22d87333e5ee8871a9d42a15834ad91168a95928 (diff) |
Introduce `range-diff` to compare iterations of a topic branch
This command does not do a whole lot so far, apart from showing a usage
that is oddly similar to that of `git tbdiff`. And for a good reason:
the next commits will turn `range-branch` into a full-blown replacement
for `tbdiff`.
At this point, we ignore tbdiff's color options, as they will all be
implemented later using diff_options.
Since f318d739159 (generate-cmds.sh: export all commands to
command-list.h, 2018-05-10), every new command *requires* a man page to
build right away, so let's also add a blank man page, too.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/range-diff.c')
-rw-r--r-- | builtin/range-diff.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/builtin/range-diff.c b/builtin/range-diff.c new file mode 100644 index 0000000000..36788ea4f2 --- /dev/null +++ b/builtin/range-diff.c @@ -0,0 +1,25 @@ +#include "cache.h" +#include "builtin.h" +#include "parse-options.h" + +static const char * const builtin_range_diff_usage[] = { +N_("git range-diff [<options>] <old-base>..<old-tip> <new-base>..<new-tip>"), +N_("git range-diff [<options>] <old-tip>...<new-tip>"), +N_("git range-diff [<options>] <base> <old-tip> <new-tip>"), +NULL +}; + +int cmd_range_diff(int argc, const char **argv, const char *prefix) +{ + int creation_factor = 60; + struct option options[] = { + OPT_INTEGER(0, "creation-factor", &creation_factor, + N_("Percentage by which creation is weighted")), + OPT_END() + }; + + argc = parse_options(argc, argv, NULL, options, + builtin_range_diff_usage, 0); + + return 0; +} |