-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 f318d73 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
- Loading branch information
Showing
7 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,7 @@ | |
/git-pull | ||
/git-push | ||
/git-quiltimport | ||
/git-range-diff | ||
/git-read-tree | ||
/git-rebase | ||
/git-rebase--am | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
git-range-diff(1) | ||
================= | ||
|
||
NAME | ||
---- | ||
git-range-diff - Compare two commit ranges (e.g. two versions of a branch) | ||
|
||
GIT | ||
--- | ||
Part of the linkgit:git[1] suite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters