Skip to content

Commit

Permalink
Support pijul channels (like branches in git)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoichi committed Feb 1, 2024
1 parent dafa59d commit 026adc2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions vcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,17 +300,16 @@ 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 {
return err
}

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...)
Expand Down

0 comments on commit 026adc2

Please sign in to comment.