Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
fsck.c:fsck_ident(): ident points at a const string
author
Yuxuan Shui
<yshuiv7@gmail.com>
Thu, 13 Mar 2014 04:45:50 +0000
(12:45 +0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 13 Mar 2014 20:00:30 +0000
(13:00 -0700)
Since fsck_ident doesn't change the content of **ident, the type of
ident could be const char **.
This change is required to rewrite fsck_commit() to use skip_prefix().
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fsck.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
5f95c9f
)
diff --git
a/fsck.c
b/fsck.c
index 99c049767484288f273f036b57683df04c1ef0df..7776660d53b334d19b853f10cd006e8c75aa196d 100644
(file)
--- a/
fsck.c
+++ b/
fsck.c
@@
-243,7
+243,7
@@
static int fsck_tree(struct tree *item, int strict, fsck_error error_func)
return retval;
}
return retval;
}
-static int fsck_ident(char **ident, struct object *obj, fsck_error error_func)
+static int fsck_ident(c
onst c
har **ident, struct object *obj, fsck_error error_func)
{
if (**ident == '<')
return error_func(obj, FSCK_ERROR, "invalid author/committer line - missing space before email");
{
if (**ident == '<')
return error_func(obj, FSCK_ERROR, "invalid author/committer line - missing space before email");
@@
-281,7
+281,7
@@
static int fsck_ident(char **ident, struct object *obj, fsck_error error_func)
static int fsck_commit(struct commit *commit, fsck_error error_func)
{
static int fsck_commit(struct commit *commit, fsck_error error_func)
{
- char *buffer = commit->buffer;
+ c
onst c
har *buffer = commit->buffer;
unsigned char tree_sha1[20], sha1[20];
struct commit_graft *graft;
int parents = 0;
unsigned char tree_sha1[20], sha1[20];
struct commit_graft *graft;
int parents = 0;