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
c1f61af6
Commit
c1f61af6
authored
Oct 31, 2012
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I LIKE THESE NAMES
parent
c8b511f3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
src/attr.c
+5
-5
src/attr_file.h
+1
-1
src/fileops.c
+4
-4
src/fileops.h
+5
-5
No files found.
src/attr.c
View file @
c1f61af6
...
...
@@ -261,13 +261,13 @@ bool git_attr_cache__is_cached(
static
int
load_attr_file
(
const
char
**
data
,
git_futils_file
_
stamp
*
stamp
,
git_futils_filestamp
*
stamp
,
const
char
*
filename
)
{
int
error
;
git_buf
content
=
GIT_BUF_INIT
;
error
=
git_futils_file
_stamp_has_changed
(
stamp
,
filename
);
error
=
git_futils_file
stamp_check
(
stamp
,
filename
);
if
(
error
<
0
)
return
error
;
...
...
@@ -380,7 +380,7 @@ int git_attr_cache__push_file(
git_attr_cache
*
cache
=
git_repository_attr_cache
(
repo
);
git_attr_file
*
file
=
NULL
;
git_blob
*
blob
=
NULL
;
git_futils_file
_
stamp
stamp
;
git_futils_filestamp
stamp
;
assert
(
filename
&&
stack
);
...
...
@@ -402,7 +402,7 @@ int git_attr_cache__push_file(
/* if not in cache, load data, parse, and cache */
if
(
source
==
GIT_ATTR_FILE_FROM_FILE
)
{
git_futils_file
_
stamp_set
(
git_futils_filestamp_set
(
&
stamp
,
file
?
&
file
->
cache_data
.
stamp
:
NULL
);
error
=
load_attr_file
(
&
content
,
&
stamp
,
filename
);
...
...
@@ -440,7 +440,7 @@ int git_attr_cache__push_file(
if
(
blob
)
git_oid_cpy
(
&
file
->
cache_data
.
oid
,
git_object_id
((
git_object
*
)
blob
));
else
git_futils_file
_
stamp_set
(
&
file
->
cache_data
.
stamp
,
&
stamp
);
git_futils_filestamp_set
(
&
file
->
cache_data
.
stamp
,
&
stamp
);
finish:
/* push file onto vector if we found one*/
...
...
src/attr_file.h
View file @
c1f61af6
...
...
@@ -61,7 +61,7 @@ typedef struct {
bool
pool_is_allocated
;
union
{
git_oid
oid
;
git_futils_file
_
stamp
stamp
;
git_futils_filestamp
stamp
;
}
cache_data
;
}
git_attr_file
;
...
...
src/fileops.c
View file @
c1f61af6
...
...
@@ -671,8 +671,8 @@ int git_futils_cp_r(
return
error
;
}
int
git_futils_file
_stamp_has_changed
(
git_futils_file
_
stamp
*
stamp
,
const
char
*
path
)
int
git_futils_file
stamp_check
(
git_futils_filestamp
*
stamp
,
const
char
*
path
)
{
struct
stat
st
;
...
...
@@ -695,8 +695,8 @@ int git_futils_file_stamp_has_changed(
return
1
;
}
void
git_futils_file
_
stamp_set
(
git_futils_file
_stamp
*
target
,
const
git_futils_file_
stamp
*
source
)
void
git_futils_filestamp_set
(
git_futils_file
stamp
*
target
,
const
git_futils_file
stamp
*
source
)
{
assert
(
target
);
...
...
src/fileops.h
View file @
c1f61af6
...
...
@@ -277,7 +277,7 @@ typedef struct {
git_time_t
mtime
;
git_off_t
size
;
unsigned
int
ino
;
}
git_futils_file
_
stamp
;
}
git_futils_filestamp
;
/**
* Compare stat information for file with reference info.
...
...
@@ -291,8 +291,8 @@ typedef struct {
* @param path Path to stat and check if changed
* @return 0 if up-to-date, 1 if out-of-date, <0 on error
*/
extern
int
git_futils_file
_stamp_has_changed
(
git_futils_file
_
stamp
*
stamp
,
const
char
*
path
);
extern
int
git_futils_file
stamp_check
(
git_futils_filestamp
*
stamp
,
const
char
*
path
);
/**
* Set or reset file stamp data
...
...
@@ -304,7 +304,7 @@ extern int git_futils_file_stamp_has_changed(
* @param tgt File stamp to write to
* @param src File stamp to copy from or NULL to clear the target
*/
extern
void
git_futils_file
_
stamp_set
(
git_futils_file
_stamp
*
tgt
,
const
git_futils_file_
stamp
*
src
);
extern
void
git_futils_filestamp_set
(
git_futils_file
stamp
*
tgt
,
const
git_futils_file
stamp
*
src
);
#endif
/* INCLUDE_fileops_h__ */
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