diff options
author | Koni Marti <koni.marti@gmail.com> | 2023-11-24 16:03:10 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-12-30 15:42:09 +0100 |
commit | f8c9e7fff564667700c3dbc239d55db8fcd032a6 (patch) | |
tree | 2fbe2e87ed8e713e119aaadf0f2e317fb01d90fc /lib/pama/apply.go | |
parent | cfcab6c5c883a08afa3a56c11e4f48d9725be2a0 (diff) | |
download | aerc-f8c9e7fff564667700c3dbc239d55db8fcd032a6.tar.gz |
patch: implement worktree support
Implement worktree support for the patch management.
Use ":patch apply -w <commit-ish> <tag>" to create a new worktree and
apply the selected messages to it. The worktree is linked to repo in the
current project.
Internally, the worktree is stored as a new project. When this project
is deleted with ":patch delete", the underlying linked worktree is
removed as well.
":patch list" shows when a project is a worktree and to what project it
is linked to.
Worktrees enable the users to create a new copy of the repo at a given
commit and apply patches without interrupting the current work in the
base repo.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/pama/apply.go')
-rw-r--r-- | lib/pama/apply.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pama/apply.go b/lib/pama/apply.go index 15875818..3d701347 100644 --- a/lib/pama/apply.go +++ b/lib/pama/apply.go @@ -15,7 +15,7 @@ func (m PatchManager) CurrentProject() (p models.Project, err error) { name, err := store.CurrentName() if name == "" || err != nil { log.Errorf("failed to get current name: %v", storeErr(err)) - err = fmt.Errorf("No current project set. " + + err = fmt.Errorf("no current project set. " + "Run :patch init first") return } @@ -32,7 +32,7 @@ func (m PatchManager) CurrentProject() (p models.Project, err error) { } } if notFound { - err = fmt.Errorf("Project '%s' does not exist anymore. "+ + err = fmt.Errorf("project '%s' does not exist anymore. "+ "Run :patch init or :patch switch", name) return } |