From 026adc2fd3bfcd1b3bef3cd0ad17bc5ca933358c Mon Sep 17 00:00:00 2001 From: Yoichi NAKAYAMA Date: Fri, 2 Feb 2024 07:39:15 +0900 Subject: [PATCH] Support pijul channels (like branches in git) https://pijul.org/manual/workflows/channels.html --- vcs.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vcs.go b/vcs.go index edef1f4..1d0dd6d 100644 --- a/vcs.go +++ b/vcs.go @@ -300,10 +300,6 @@ var DarcsBackend = &VCSBackend{ // PijulBackend is the VCSBackend for pijul var PijulBackend = &VCSBackend{ Clone: func(vg *vcsGetOption) error { - if vg.branch != "" { - return errors.New("pijul does not support branch") - } - dir, _ := filepath.Split(vg.dir) err := os.MkdirAll(dir, 0755) if err != nil { @@ -311,6 +307,9 @@ var PijulBackend = &VCSBackend{ } args := []string{"clone"} + if vg.branch != "" { + args = append(args, "--channel", vg.branch) + } args = append(args, vg.url.String(), vg.dir) return run(vg.silent)("pijul", args...)