Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
687da95e
Commit
687da95e
authored
Sep 23, 2023
by
Antonin Delpeuch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
blame example: Fix support for line range in CLI
The -L option announced by the CLI was ignored so far.
parent
4939fa74
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
examples/blame.c
+4
-0
No files found.
examples/blame.c
View file @
687da95e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment