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
1cda43ba
Unverified
Commit
1cda43ba
authored
Jan 03, 2018
by
Brian Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make comment_line_char const a macro
parent
6bc7301e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/trailer.c
+4
-4
No files found.
src/trailer.c
View file @
1cda43ba
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#include <string.h>
#include <string.h>
#include <ctype.h>
#include <ctype.h>
static
const
char
comment_line_char
=
'#'
;
#define COMMENT_LINE_CHAR '#'
static
const
char
*
const
git_generated_prefixes
[]
=
{
static
const
char
*
const
git_generated_prefixes
[]
=
{
"Signed-off-by: "
,
"Signed-off-by: "
,
...
@@ -119,7 +119,7 @@ static int ignore_non_trailer(const char *buf, size_t len)
...
@@ -119,7 +119,7 @@ static int ignore_non_trailer(const char *buf, size_t len)
else
else
next_line
++
;
next_line
++
;
if
(
buf
[
bol
]
==
comment_line_char
||
buf
[
bol
]
==
'\n'
)
{
if
(
buf
[
bol
]
==
COMMENT_LINE_CHAR
||
buf
[
bol
]
==
'\n'
)
{
/* is this the first of the run of comments? */
/* is this the first of the run of comments? */
if
(
!
boc
)
if
(
!
boc
)
boc
=
bol
;
boc
=
bol
;
...
@@ -176,7 +176,7 @@ static int find_trailer_start(const char *buf, size_t len)
...
@@ -176,7 +176,7 @@ static int find_trailer_start(const char *buf, size_t len)
/* The first paragraph is the title and cannot be trailers */
/* The first paragraph is the title and cannot be trailers */
for
(
s
=
buf
;
s
<
buf
+
len
;
s
=
next_line
(
s
))
{
for
(
s
=
buf
;
s
<
buf
+
len
;
s
=
next_line
(
s
))
{
if
(
s
[
0
]
==
comment_line_char
)
if
(
s
[
0
]
==
COMMENT_LINE_CHAR
)
continue
;
continue
;
if
(
is_blank_line
(
s
))
if
(
is_blank_line
(
s
))
break
;
break
;
...
@@ -196,7 +196,7 @@ static int find_trailer_start(const char *buf, size_t len)
...
@@ -196,7 +196,7 @@ static int find_trailer_start(const char *buf, size_t len)
const
char
*
const
*
p
;
const
char
*
const
*
p
;
int
separator_pos
;
int
separator_pos
;
if
(
bol
[
0
]
==
comment_line_char
)
{
if
(
bol
[
0
]
==
COMMENT_LINE_CHAR
)
{
non_trailer_lines
+=
possible_continuation_lines
;
non_trailer_lines
+=
possible_continuation_lines
;
possible_continuation_lines
=
0
;
possible_continuation_lines
=
0
;
continue
;
continue
;
...
...
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