mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
blame example: Fix support for line range in CLI
The -L option announced by the CLI was ignored so far.
This commit is contained in:
@@ -47,6 +47,10 @@ int lg2_blame(git_repository *repo, int argc, char *argv[])
|
||||
if (o.M) blameopts.flags |= GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES;
|
||||
if (o.C) blameopts.flags |= GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES;
|
||||
if (o.F) blameopts.flags |= GIT_BLAME_FIRST_PARENT;
|
||||
if (o.start_line && o.end_line) {
|
||||
blameopts.min_line = o.start_line;
|
||||
blameopts.max_line = o.end_line;
|
||||
}
|
||||
|
||||
/**
|
||||
* The commit range comes in "committish" form. Use the rev-parse API to
|
||||
|
||||
Reference in New Issue
Block a user