worktree.h 1.01 KB
Newer Older
1 2 3 4 5 6 7 8 9
/*
 * 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__

10 11
#include "common.h"

12 13 14 15 16 17 18 19 20
#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;

21 22
	/* Path to the where the worktree lives in the filesystem */
	char *worktree_path;
23 24 25 26 27 28 29 30
	/* 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;
31
	/* Path to the parent's working directory */
32
	char *parent_path;
33 34

	int locked:1;
35 36
};

37 38
char *git_worktree__read_link(const char *base, const char *file);

39
#endif