Teach fsck and prune about the new location of temporary objects
[gitweb.git] / exec_cmd.c
index da04efe951e5b8dc4e7b72246212d8ebabc09ec6..8899e31b3b9edb528a339df394f891f76b8de594 100644 (file)
@@ -40,6 +40,16 @@ static const char *builtin_exec_path(void)
 #endif
 }
 
+const char *system_path(const char *path)
+{
+       if (!is_absolute_path(path)) {
+               struct strbuf d = STRBUF_INIT;
+               strbuf_addf(&d, "%s/%s", git_exec_path(), path);
+               path = strbuf_detach(&d, NULL);
+       }
+       return path;
+}
+
 void git_set_argv_exec_path(const char *exec_path)
 {
        argv_exec_path = exec_path;