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
68581754
Commit
68581754
authored
Mar 05, 2014
by
Vicent Marti
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2160 from modocache/examples-diff-add-patience-and-minimal
examples/diff: Add minimal, patience diff options.
parents
d2b7841d
0d3c8a9d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
PROJECTS.md
+0
-4
examples/diff.c
+4
-0
No files found.
PROJECTS.md
View file @
68581754
...
...
@@ -28,10 +28,6 @@ These are good small projects to get started with libgit2.
core Git command and add a missing command-line option. There are many
gaps right now and this helps demonstrate how to use the library. Here
are some specific ideas:
*
Add the
`--minimal`
flag to
`examples/diff.c`
since the
`libgit2`
diff API now has a flag to support it
*
Add the
`--patience`
flag to
`examples/diff.c`
since it is also now
supported.
*
Add the
`--shortstat`
flag to
`examples/diff.c`
based on the work
that was done to add
`--numstat`
already.
*
Fix the
`examples/diff.c`
implementation of the
`-B`
...
...
examples/diff.c
View file @
68581754
...
...
@@ -234,6 +234,10 @@ static void parse_opts(struct opts *o, int argc, char *argv[])
o
->
diffopts
.
flags
|=
GIT_DIFF_INCLUDE_IGNORED
;
else
if
(
!
strcmp
(
a
,
"--untracked"
))
o
->
diffopts
.
flags
|=
GIT_DIFF_INCLUDE_UNTRACKED
;
else
if
(
!
strcmp
(
a
,
"--patience"
))
o
->
diffopts
.
flags
|=
GIT_DIFF_PATIENCE
;
else
if
(
!
strcmp
(
a
,
"--minimal"
))
o
->
diffopts
.
flags
|=
GIT_DIFF_MINIMAL
;
else
if
(
!
strcmp
(
a
,
"--numstat"
))
o
->
numstat
=
1
;
else
if
(
match_uint16_arg
(
...
...
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