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
38068dc1
Commit
38068dc1
authored
Nov 07, 2011
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #473 from drafnel/bc/update-examples
bc/update examples
parents
3b83bdac
0b142c9c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
examples/general.c
+2
-2
examples/network/.gitignore
+1
-0
examples/network/fetch.c
+1
-1
examples/network/git2.c
+3
-2
No files found.
examples/general.c
View file @
38068dc1
...
...
@@ -430,14 +430,14 @@ int main (int argc, char** argv)
printf
(
"
\n
*Config Listing*
\n
"
);
const
char
*
email
;
int
j
;
int
32_t
j
;
git_config
*
cfg
;
// Open a config object so we can read global values from it.
git_config_open_ondisk
(
&
cfg
,
"~/.gitconfig"
);
git_config_get_int
(
cfg
,
"help.autocorrect"
,
&
j
);
git_config_get_int
32
(
cfg
,
"help.autocorrect"
,
&
j
);
printf
(
"Autocorrect: %d
\n
"
,
j
);
git_config_get_string
(
cfg
,
"user.email"
,
&
email
);
...
...
examples/network/.gitignore
0 → 100644
View file @
38068dc1
/git2
examples/network/fetch.c
View file @
38068dc1
...
...
@@ -119,7 +119,7 @@ int fetch(git_repository *repo, int argc, char **argv)
if
(
error
<
GIT_SUCCESS
)
return
error
;
git__
free
(
packname
);
free
(
packname
);
git_indexer_free
(
idx
);
git_remote_free
(
remote
);
...
...
examples/network/git2.c
View file @
38068dc1
...
...
@@ -44,7 +44,8 @@ int main(int argc, char **argv)
int
i
,
error
;
if
(
argc
<
2
)
{
fprintf
(
stderr
,
"usage: %s <cmd> [repo]"
,
argv
[
0
]);
fprintf
(
stderr
,
"usage: %s <cmd> [repo]
\n
"
,
argv
[
0
]);
exit
(
EXIT_FAILURE
);
}
for
(
i
=
0
;
commands
[
i
].
name
!=
NULL
;
++
i
)
{
...
...
@@ -53,5 +54,5 @@ int main(int argc, char **argv)
}
fprintf
(
stderr
,
"Command not found: %s
\n
"
,
argv
[
1
]);
return
1
;
}
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