summaryrefslogtreecommitdiffstats
path: root/examples/blame.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:03:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:03:04 +0000
commitb88736462df2c86a83f01dcc260b5463205819d2 (patch)
treeb1a9a5a5392a52ec4e5f60fb4b45083cf7fd65b0 /examples/blame.c
parentAdding upstream version 1.7.2+ds. (diff)
downloadlibgit2-upstream.tar.xz
libgit2-upstream.zip
Adding upstream version 1.8.1+ds.upstream/1.8.1+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'examples/blame.c')
-rw-r--r--examples/blame.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/blame.c b/examples/blame.c
index 77087a5..0996e7a 100644
--- a/examples/blame.c
+++ b/examples/blame.c
@@ -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