libgit2/src/worktree.h
Patrick Steinhardt 20a368e2d7 worktree: parent path should point to the working dir
The working tree's parent path should not point to the parent's gitdir,
but to the parent's working directory. Pointing to the gitdir would not
make any sense, as the parent's working directory is actually equal to
both repository's common directory.

Fix the issue.
2017-03-17 09:27:55 +01:00

36 lines
933 B
C

/*
* 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 working directory */
char *parent_path;
int locked:1;
};
char *git_worktree__read_link(const char *base, const char *file);
#endif