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
52e9120c
Commit
52e9120c
authored
Sep 16, 2014
by
The rugged tests are fragile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attr: Cleanup the containing dir logic
parent
62595764
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/attr.c
+5
-5
No files found.
src/attr.c
View file @
52e9120c
...
...
@@ -411,7 +411,7 @@ static int collect_attr_files(
const
char
*
path
,
git_vector
*
files
)
{
int
error
;
int
error
=
0
;
git_buf
dir
=
GIT_BUF_INIT
;
const
char
*
workdir
=
git_repository_workdir
(
repo
);
attr_walk_up_info
info
=
{
NULL
};
...
...
@@ -422,12 +422,12 @@ static int collect_attr_files(
/* Resolve path in a non-bare repo */
if
(
workdir
!=
NULL
)
error
=
git_path_find_dir
(
&
dir
,
path
,
workdir
);
else
error
=
git_path_dirname_r
(
&
dir
,
path
);
/* when in a bare repo, find the containing folder if the given
* path is a subfolder (if not, the containing folder is the root) */
else
if
(
strchr
(
path
,
'/'
)
!=
NULL
)
error
=
git_path_dirname_r
(
&
dir
,
path
);
if
(
error
<
0
)
goto
cleanup
;
if
(
dir
.
size
==
1
&&
dir
.
ptr
[
0
]
==
'.'
)
git_buf_clear
(
&
dir
);
/* in precendence order highest to lowest:
* - $GIT_DIR/info/attributes
...
...
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