I LIKE THESE NAMES

This commit is contained in:
Vicent Marti 2012-10-31 20:52:01 +01:00
parent c8b511f3cd
commit c1f61af66b
4 changed files with 15 additions and 15 deletions

View File

@ -261,13 +261,13 @@ bool git_attr_cache__is_cached(
static int load_attr_file( static int load_attr_file(
const char **data, const char **data,
git_futils_file_stamp *stamp, git_futils_filestamp *stamp,
const char *filename) const char *filename)
{ {
int error; int error;
git_buf content = GIT_BUF_INIT; git_buf content = GIT_BUF_INIT;
error = git_futils_file_stamp_has_changed(stamp, filename); error = git_futils_filestamp_check(stamp, filename);
if (error < 0) if (error < 0)
return error; return error;
@ -380,7 +380,7 @@ int git_attr_cache__push_file(
git_attr_cache *cache = git_repository_attr_cache(repo); git_attr_cache *cache = git_repository_attr_cache(repo);
git_attr_file *file = NULL; git_attr_file *file = NULL;
git_blob *blob = NULL; git_blob *blob = NULL;
git_futils_file_stamp stamp; git_futils_filestamp stamp;
assert(filename && stack); assert(filename && stack);
@ -402,7 +402,7 @@ int git_attr_cache__push_file(
/* if not in cache, load data, parse, and cache */ /* if not in cache, load data, parse, and cache */
if (source == GIT_ATTR_FILE_FROM_FILE) { if (source == GIT_ATTR_FILE_FROM_FILE) {
git_futils_file_stamp_set( git_futils_filestamp_set(
&stamp, file ? &file->cache_data.stamp : NULL); &stamp, file ? &file->cache_data.stamp : NULL);
error = load_attr_file(&content, &stamp, filename); error = load_attr_file(&content, &stamp, filename);
@ -440,7 +440,7 @@ int git_attr_cache__push_file(
if (blob) if (blob)
git_oid_cpy(&file->cache_data.oid, git_object_id((git_object *)blob)); git_oid_cpy(&file->cache_data.oid, git_object_id((git_object *)blob));
else else
git_futils_file_stamp_set(&file->cache_data.stamp, &stamp); git_futils_filestamp_set(&file->cache_data.stamp, &stamp);
finish: finish:
/* push file onto vector if we found one*/ /* push file onto vector if we found one*/

View File

@ -61,7 +61,7 @@ typedef struct {
bool pool_is_allocated; bool pool_is_allocated;
union { union {
git_oid oid; git_oid oid;
git_futils_file_stamp stamp; git_futils_filestamp stamp;
} cache_data; } cache_data;
} git_attr_file; } git_attr_file;

View File

@ -671,8 +671,8 @@ int git_futils_cp_r(
return error; return error;
} }
int git_futils_file_stamp_has_changed( int git_futils_filestamp_check(
git_futils_file_stamp *stamp, const char *path) git_futils_filestamp *stamp, const char *path)
{ {
struct stat st; struct stat st;
@ -695,8 +695,8 @@ int git_futils_file_stamp_has_changed(
return 1; return 1;
} }
void git_futils_file_stamp_set( void git_futils_filestamp_set(
git_futils_file_stamp *target, const git_futils_file_stamp *source) git_futils_filestamp *target, const git_futils_filestamp *source)
{ {
assert(target); assert(target);

View File

@ -277,7 +277,7 @@ typedef struct {
git_time_t mtime; git_time_t mtime;
git_off_t size; git_off_t size;
unsigned int ino; unsigned int ino;
} git_futils_file_stamp; } git_futils_filestamp;
/** /**
* Compare stat information for file with reference info. * Compare stat information for file with reference info.
@ -291,8 +291,8 @@ typedef struct {
* @param path Path to stat and check if changed * @param path Path to stat and check if changed
* @return 0 if up-to-date, 1 if out-of-date, <0 on error * @return 0 if up-to-date, 1 if out-of-date, <0 on error
*/ */
extern int git_futils_file_stamp_has_changed( extern int git_futils_filestamp_check(
git_futils_file_stamp *stamp, const char *path); git_futils_filestamp *stamp, const char *path);
/** /**
* Set or reset file stamp data * 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 tgt File stamp to write to
* @param src File stamp to copy from or NULL to clear the target * @param src File stamp to copy from or NULL to clear the target
*/ */
extern void git_futils_file_stamp_set( extern void git_futils_filestamp_set(
git_futils_file_stamp *tgt, const git_futils_file_stamp *src); git_futils_filestamp *tgt, const git_futils_filestamp *src);
#endif /* INCLUDE_fileops_h__ */ #endif /* INCLUDE_fileops_h__ */