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
bd85506a
Unverified
Commit
bd85506a
authored
Dec 20, 2023
by
Edward Thomson
Committed by
GitHub
Dec 20, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6638 from wetneb/blame_example_line_numbers
blame example: Fix support for line range in CLI
parents
4e7006ab
687da95e
Hide 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 @
bd85506a
...
@@ -47,6 +47,10 @@ int lg2_blame(git_repository *repo, int argc, char *argv[])
...
@@ -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
.
M
)
blameopts
.
flags
|=
GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES
;
if
(
o
.
C
)
blameopts
.
flags
|=
GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES
;
if
(
o
.
C
)
blameopts
.
flags
|=
GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES
;
if
(
o
.
F
)
blameopts
.
flags
|=
GIT_BLAME_FIRST_PARENT
;
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
* 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