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
98303ea3
Unverified
Commit
98303ea3
authored
Jan 03, 2018
by
Patrick Steinhardt
Committed by
GitHub
Jan 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4457 from libgit2/ethomson/tree_error_messages
tree: standard error messages are lowercase
parents
7610638e
2c99011a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
src/tree.c
+10
-10
No files found.
src/tree.c
View file @
98303ea3
...
...
@@ -440,16 +440,16 @@ int git_tree__parse(void *_tree, git_odb_object *odb_obj)
unsigned
int
attr
;
if
(
parse_mode
(
&
attr
,
buffer
,
&
buffer
)
<
0
||
!
buffer
)
return
tree_error
(
"
Failed to parse tree. C
an't parse filemode"
,
NULL
);
return
tree_error
(
"
failed to parse tree: c
an't parse filemode"
,
NULL
);
if
((
nul
=
memchr
(
buffer
,
0
,
buffer_end
-
buffer
))
==
NULL
)
return
tree_error
(
"
Failed to parse tree. O
bject is corrupted"
,
NULL
);
return
tree_error
(
"
failed to parse tree: o
bject is corrupted"
,
NULL
);
if
((
filename_len
=
nul
-
buffer
)
==
0
)
return
tree_error
(
"
Failed to parse tree. C
an't parse filename"
,
NULL
);
return
tree_error
(
"
failed to parse tree: c
an't parse filename"
,
NULL
);
if
((
buffer_end
-
(
nul
+
1
))
<
GIT_OID_RAWSZ
)
return
tree_error
(
"
Failed to parse tree. C
an't parse OID"
,
NULL
);
return
tree_error
(
"
failed to parse tree: c
an't parse OID"
,
NULL
);
/* Allocate the entry */
{
...
...
@@ -496,7 +496,7 @@ static int append_entry(
int
error
=
0
;
if
(
!
valid_entry_name
(
bld
->
repo
,
filename
))
return
tree_error
(
"
Failed to insert entry. I
nvalid name for a tree entry"
,
filename
);
return
tree_error
(
"
failed to insert entry: i
nvalid name for a tree entry"
,
filename
);
entry
=
alloc_entry
(
filename
,
strlen
(
filename
),
id
);
GITERR_CHECK_ALLOC
(
entry
);
...
...
@@ -735,14 +735,14 @@ int git_treebuilder_insert(
assert
(
bld
&&
id
&&
filename
);
if
(
!
valid_filemode
(
filemode
))
return
tree_error
(
"
Failed to insert entry. I
nvalid filemode for file"
,
filename
);
return
tree_error
(
"
failed to insert entry: i
nvalid filemode for file"
,
filename
);
if
(
!
valid_entry_name
(
bld
->
repo
,
filename
))
return
tree_error
(
"
Failed to insert entry. I
nvalid name for a tree entry"
,
filename
);
return
tree_error
(
"
failed to insert entry: i
nvalid name for a tree entry"
,
filename
);
if
(
filemode
!=
GIT_FILEMODE_COMMIT
&&
!
git_object__is_valid
(
bld
->
repo
,
id
,
otype_from_mode
(
filemode
)))
return
tree_error
(
"
Failed to insert entry;
invalid object specified"
,
filename
);
return
tree_error
(
"
failed to insert entry:
invalid object specified"
,
filename
);
pos
=
git_strmap_lookup_index
(
bld
->
map
,
filename
);
if
(
git_strmap_valid_index
(
bld
->
map
,
pos
))
{
...
...
@@ -793,7 +793,7 @@ int git_treebuilder_remove(git_treebuilder *bld, const char *filename)
git_tree_entry
*
entry
=
treebuilder_get
(
bld
,
filename
);
if
(
entry
==
NULL
)
return
tree_error
(
"
Failed to remove entry. F
ile isn't in the tree"
,
filename
);
return
tree_error
(
"
failed to remove entry: f
ile isn't in the tree"
,
filename
);
git_strmap_delete
(
bld
->
map
,
filename
);
git_tree_entry_free
(
entry
);
...
...
@@ -946,7 +946,7 @@ int git_tree_entry_bypath(
return
GIT_ENOTFOUND
;
}
/* If there's only a slash left in the path, we
/* If there's only a slash left in the path, we
* return the current entry; otherwise, we keep
* walking down the path */
if
(
path
[
filename_len
+
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