Line data Source code
1 : /*! 2 : * \file esys/repo/git/worktree_git.cpp 3 : * \brief Linked worktree list entry (ADR-0041) 4 : * 5 : * \cond 6 : * __legal_b__ 7 : * 8 : * Copyright (c) 2026 Michel Gillet 9 : * Distributed under the MIT License. 10 : * (See accompanying file LICENSE.txt or 11 : * copy at https://opensource.org/licenses/MIT) 12 : * 13 : * __legal_e__ 14 : * \endcond 15 : * 16 : */ 17 : 18 : #include "esys/repo/esysrepo_prec.h" 19 : #include "esys/repo/git/worktree.h" 20 : 21 : namespace esys::repo::git 22 : { 23 : 24 6 : void Worktree::set_path(const std::string &path) 25 : { 26 6 : m_path = path; 27 6 : } 28 : 29 6 : const std::string &Worktree::get_path() const 30 : { 31 6 : return m_path; 32 : } 33 : 34 6 : void Worktree::set_head(const std::string &head) 35 : { 36 6 : m_head = head; 37 6 : } 38 : 39 2 : const std::string &Worktree::get_head() const 40 : { 41 2 : return m_head; 42 : } 43 : 44 0 : void Worktree::set_bare(bool bare) 45 : { 46 0 : m_bare = bare; 47 0 : } 48 : 49 0 : bool Worktree::get_bare() const 50 : { 51 0 : return m_bare; 52 : } 53 : 54 3 : void Worktree::set_detached(bool detached) 55 : { 56 3 : m_detached = detached; 57 3 : } 58 : 59 1 : bool Worktree::get_detached() const 60 : { 61 1 : return m_detached; 62 : } 63 : 64 : } // namespace esys::repo::git