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
8572e225
Commit
8572e225
authored
Jan 12, 2017
by
Patrick Steinhardt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples: general: clean up committer/author variables
parent
ffe259d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
examples/general.c
+4
-4
No files found.
examples/general.c
View file @
8572e225
...
@@ -264,7 +264,7 @@ static void commit_writing(git_repository *repo)
...
@@ -264,7 +264,7 @@ static void commit_writing(git_repository *repo)
git_oid
tree_id
,
parent_id
,
commit_id
;
git_oid
tree_id
,
parent_id
,
commit_id
;
git_tree
*
tree
;
git_tree
*
tree
;
git_commit
*
parent
;
git_commit
*
parent
;
const
git_signature
*
author
,
*
cm
tter
;
git_signature
*
author
,
*
commi
tter
;
char
oid_hex
[
GIT_OID_HEXSZ
+
1
]
=
{
0
};
char
oid_hex
[
GIT_OID_HEXSZ
+
1
]
=
{
0
};
printf
(
"
\n
*Commit Writing*
\n
"
);
printf
(
"
\n
*Commit Writing*
\n
"
);
...
@@ -276,9 +276,9 @@ static void commit_writing(git_repository *repo)
...
@@ -276,9 +276,9 @@ static void commit_writing(git_repository *repo)
* `user.email` configuration options. See the `config` section of this
* `user.email` configuration options. See the `config` section of this
* example file to see how to access config values.
* example file to see how to access config values.
*/
*/
git_signature_new
(
(
git_signature
**
)
&
author
,
git_signature_new
(
&
author
,
"Scott Chacon"
,
"schacon@gmail.com"
,
123456789
,
60
);
"Scott Chacon"
,
"schacon@gmail.com"
,
123456789
,
60
);
git_signature_new
(
(
git_signature
**
)
&
cm
tter
,
git_signature_new
(
&
commi
tter
,
"Scott A Chacon"
,
"scott@github.com"
,
987654321
,
90
);
"Scott A Chacon"
,
"scott@github.com"
,
987654321
,
90
);
/**
/**
...
@@ -301,7 +301,7 @@ static void commit_writing(git_repository *repo)
...
@@ -301,7 +301,7 @@ static void commit_writing(git_repository *repo)
repo
,
repo
,
NULL
,
/* do not update the HEAD */
NULL
,
/* do not update the HEAD */
author
,
author
,
c
m
tter
,
c
ommi
tter
,
NULL
,
/* use default message encoding */
NULL
,
/* use default message encoding */
"example commit"
,
"example commit"
,
tree
,
tree
,
...
...
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