Skip to content

Commit 026adc2

Browse files
committed
Support pijul channels (like branches in git)
https://pijul.org/manual/workflows/channels.html
1 parent dafa59d commit 026adc2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

vcs.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,17 +300,16 @@ var DarcsBackend = &VCSBackend{
300300
// PijulBackend is the VCSBackend for pijul
301301
var PijulBackend = &VCSBackend{
302302
Clone: func(vg *vcsGetOption) error {
303-
if vg.branch != "" {
304-
return errors.New("pijul does not support branch")
305-
}
306-
307303
dir, _ := filepath.Split(vg.dir)
308304
err := os.MkdirAll(dir, 0755)
309305
if err != nil {
310306
return err
311307
}
312308

313309
args := []string{"clone"}
310+
if vg.branch != "" {
311+
args = append(args, "--channel", vg.branch)
312+
}
314313
args = append(args, vg.url.String(), vg.dir)
315314

316315
return run(vg.silent)("pijul", args...)

0 commit comments

Comments
 (0)