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
7f26b1b9
Commit
7f26b1b9
authored
Feb 18, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stash: use git_commit_summary for a summary
parent
35d39761
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
src/stash.c
+4
-12
No files found.
src/stash.c
View file @
7f26b1b9
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include "common.h"
#include "common.h"
#include "repository.h"
#include "repository.h"
#include "commit.h"
#include "commit.h"
#include "message.h"
#include "tree.h"
#include "tree.h"
#include "reflog.h"
#include "reflog.h"
#include "git2/diff.h"
#include "git2/diff.h"
...
@@ -50,23 +51,14 @@ static int append_abbreviated_oid(git_buf *out, const git_oid *b_commit)
...
@@ -50,23 +51,14 @@ static int append_abbreviated_oid(git_buf *out, const git_oid *b_commit)
static
int
append_commit_description
(
git_buf
*
out
,
git_commit
*
commit
)
static
int
append_commit_description
(
git_buf
*
out
,
git_commit
*
commit
)
{
{
const
char
*
message
;
const
char
*
summary
=
git_commit_summary
(
commit
)
;
size_t
pos
=
0
,
len
;
GITERR_CHECK_ALLOC
(
summary
)
;
if
(
append_abbreviated_oid
(
out
,
git_commit_id
(
commit
))
<
0
)
if
(
append_abbreviated_oid
(
out
,
git_commit_id
(
commit
))
<
0
)
return
-
1
;
return
-
1
;
message
=
git_commit_message
(
commit
);
len
=
strlen
(
message
);
/* TODO: Replace with proper commit short message
* when git_commit_message_short() is implemented.
*/
while
(
pos
<
len
&&
message
[
pos
]
!=
'\n'
)
pos
++
;
git_buf_putc
(
out
,
' '
);
git_buf_putc
(
out
,
' '
);
git_buf_put
(
out
,
message
,
pos
);
git_buf_put
s
(
out
,
summary
);
git_buf_putc
(
out
,
'\n'
);
git_buf_putc
(
out
,
'\n'
);
return
git_buf_oom
(
out
)
?
-
1
:
0
;
return
git_buf_oom
(
out
)
?
-
1
:
0
;
...
...
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