diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2007-08-01 01:28:59 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-08-01 00:38:30 -0700 |
commit | e5392c51469c25851f9c6e53165d75fc61901768 (patch) | |
tree | 9fc9e6a7b22c40694e5bb6994c599da1a159d96e /test-absolute-path.c | |
parent | --base-path-relaxed option (diff) | |
download | tgif-e5392c51469c25851f9c6e53165d75fc61901768.tar.xz |
Add is_absolute_path() and make_absolute_path()
This patch adds convenience functions to work with absolute paths.
The function is_absolute_path() should help the efforts to integrate
the MinGW fork.
Note that make_absolute_path() returns a pointer to a static buffer.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-absolute-path.c')
-rw-r--r-- | test-absolute-path.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test-absolute-path.c b/test-absolute-path.c new file mode 100644 index 0000000000..c959ea20d3 --- /dev/null +++ b/test-absolute-path.c @@ -0,0 +1,11 @@ +#include "cache.h" + +int main(int argc, char **argv) +{ + while (argc > 1) { + puts(make_absolute_path(argv[1])); + argc--; + argv++; + } + return 0; +} |