diff options
author | Ben Straub <bstraub@github.com> | 2012-06-06 23:25:22 +0400 |
---|---|---|
committer | Ben Straub <bstraub@github.com> | 2012-06-06 23:25:22 +0400 |
commit | 8a385c0482aff009738f509892863707592434b9 (patch) | |
tree | 9596ac3acca99274393c0f8e68f9ee0386088eaf /src | |
parent | 2c2cde47b8241e66cacd535d5f8c269d623a47f0 (diff) |
Move git__date_parse declaration to util.h.
Diffstat (limited to 'src')
-rw-r--r-- | src/date.c | 2 | ||||
-rw-r--r-- | src/date.h | 14 | ||||
-rw-r--r-- | src/revparse.c | 1 | ||||
-rw-r--r-- | src/util.h | 10 |
4 files changed, 11 insertions, 16 deletions
diff --git a/src/date.c b/src/date.c index a2f36982a..5529dc2f6 100644 --- a/src/date.c +++ b/src/date.c @@ -10,7 +10,7 @@ #include <sys/time.h> #endif -#include "date.h" +#include "util.h" #include "cache.h" #include "posix.h" diff --git a/src/date.h b/src/date.h deleted file mode 100644 index 6859ee5e6..000000000 --- a/src/date.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2009-2012 the libgit2 contributors - * - * This file is part of libgit2, distributed under the GNU GPL v2 with - * a Linking Exception. For full terms see the included COPYING file. - */ -#ifndef INCLUDE_date_h__ -#define INCLUDE_date_h__ - -#include "git2/types.h" - -int git__date_parse(git_time_t *out, const char *date); - -#endif diff --git a/src/revparse.c b/src/revparse.c index a6f2a159f..3312345bb 100644 --- a/src/revparse.c +++ b/src/revparse.c @@ -9,7 +9,6 @@ #include "common.h" #include "buffer.h" -#include "date.h" #include "tree.h" #include "git2.h" diff --git a/src/util.h b/src/util.h index c4a55f524..eed2bc80c 100644 --- a/src/util.h +++ b/src/util.h @@ -230,4 +230,14 @@ GIT_INLINE(bool) git__iswildcard(int c) */ extern int git__parse_bool(int *out, const char *value); +/* + * Parse a string into a value as a git_time_t. + * + * Sample valid input: + * - "yesterday" + * - "July 17, 2003" + * - "2003-7-17 08:23" + */ +int git__date_parse(git_time_t *out, const char *date); + #endif /* INCLUDE_util_h__ */ |