pijul_org / pijul

#271 pijul record --branch may panick

Opened by lthms, on May 8, 2018
Bug
Closed
lthms commented on May 8, 2018

Okay, this is strange, and probably related to #270.

I have created the following bats test case:

#!/usr/bin/env bats

load ../test_helper

@test "record to another branch" {
  mkdir test
  cd test
  pijul init
  pijul fork "test"
  echo a > a
  pijul add a
  pijul record -a -A "me" -m "adding a file" --branch master

  test_patches=$(("$(pijul log --hash-only | wc -l)" - 1))
  master_patches=$(("$(pijul log --branch master --hash-only | wc -l)" - 1))

  [ ${test_patches} -eq 0 ]
  [ ${master_patches} -eq 1 ]
}

To my surprise, the test is a success. However, if I try to do the same thing to my pijul repo, more precisely add \n\nTada at the end of README.md, and record the change, I get the very same error message as in #270.

lthms commented on May 8, 2018

A test case to reproduce:

pijul clone https://nest.pijul.com/pijul_org/pijul pijul-test-271
cd pijul-test-271
pijul pull https://nest.pijul.com/pijul_org/pijul --from-branch testing --to-branch testing -a # This fails, to my surprise
# what I wanted to show is…
echo Tada >> README.md
pijul record --branch testing # this fails, too
lthms commented on May 12, 2018

With the latest fixes, The pijul pull call succeeds, but not the record one.

pmeunier closed this discussion on May 13, 2018
pmeunier commented on May 13, 2018

Thanks for reporting!