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
bac695b5
Commit
bac695b5
authored
Nov 18, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Examples: fix reference names
parent
cfbe4be3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
examples/diff.c
+1
-1
examples/general.c
+2
-2
No files found.
examples/diff.c
View file @
bac695b5
...
...
@@ -30,7 +30,7 @@ static int resolve_to_tree(
git_reference_resolve
(
&
resolved
,
ref
);
git_reference_free
(
ref
);
if
(
resolved
)
{
git_object_lookup
(
&
obj
,
repo
,
git_reference_
oid
(
resolved
),
GIT_OBJ_ANY
);
git_object_lookup
(
&
obj
,
repo
,
git_reference_
target
(
resolved
),
GIT_OBJ_ANY
);
git_reference_free
(
resolved
);
}
}
...
...
examples/general.c
View file @
bac695b5
...
...
@@ -405,12 +405,12 @@ int main (int argc, char** argv)
switch
(
git_reference_type
(
ref
))
{
case
GIT_REF_OID
:
git_oid_fmt
(
out
,
git_reference_
oid
(
ref
));
git_oid_fmt
(
out
,
git_reference_
target
(
ref
));
printf
(
"%s [%s]
\n
"
,
refname
,
out
);
break
;
case
GIT_REF_SYMBOLIC
:
printf
(
"%s => %s
\n
"
,
refname
,
git_reference_target
(
ref
));
printf
(
"%s => %s
\n
"
,
refname
,
git_reference_
symbolic_
target
(
ref
));
break
;
default:
fprintf
(
stderr
,
"Unexpected reference type
\n
"
);
...
...
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