Documentation
¶
Index ¶
- type Client
- func (c *Client) Add(files ...string) error
- func (c *Client) Commit(msg string) error
- func (c *Client) HasRemote() bool
- func (c *Client) Init() error
- func (c *Client) Lock() (func(), error)
- func (c *Client) Rm(files ...string) error
- func (c *Client) Run(args ...string) (string, error)
- func (c *Client) Status() (string, error)
- func (c *Client) Sync() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client wraps git command execution with a global file-based lock for process safety.
func (*Client) HasRemote ¶
HasRemote checks if there is a 'origin' remote configured. For now, we hardcode 'origin' as the default remote to check.
func (*Client) Run ¶
Run executes a raw git command in the working directory. NOTE: It does NOT acquire the lock automatically. The caller must manage transaction safety via Client.Lock().
Click to show internal directories.
Click to hide internal directories.