diff options
author | Patrick Steinhardt <ps@pks.im> | 2015-10-21 12:02:31 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2017-02-13 10:28:15 +0100 |
commit | d3bc09e81687ca132226e93ce69b9a28b8d3c66b (patch) | |
tree | fd1c69feb7f9cc665ac995ed4f30c45212c8b419 /src/worktree.h | |
parent | 45f2b7a43ffe77bac3acbf21a041b56f03842ba8 (diff) | |
download | libgit2-d3bc09e81687ca132226e93ce69b9a28b8d3c66b.tar.gz |
worktree: introduce `struct git_worktree`
Introduce a new `struct git_worktree`, which holds information
about a possible working tree connected to a repository.
Introduce functions to allow opening working trees for a
repository.
Diffstat (limited to 'src/worktree.h')
-rw-r--r-- | src/worktree.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/worktree.h b/src/worktree.h new file mode 100644 index 000000000..0e1666c42 --- /dev/null +++ b/src/worktree.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) the libgit2 contributors. All rights reserved. + * + * 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_worktree_h__ +#define INCLUDE_worktree_h__ + +#include "git2/common.h" +#include "git2/worktree.h" + +struct git_worktree { + /* Name of the working tree. This is the name of the + * containing directory in the `$PARENT/.git/worktrees/` + * directory. */ + char *name; + + /* Path to the .git file in the working tree's repository */ + char *gitlink_path; + /* Path to the .git directory inside the parent's + * worktrees directory */ + char *gitdir_path; + /* Path to the common directory contained in the parent + * repository */ + char *commondir_path; + /* Path to the parent's .git directory */ + char *parent_path; +}; + +#endif |