pijul_org / pijul

#388 pijul clone [url with trailing slash] fails

Opened by lnnl, on April 25, 2019
Bug
Closed
lnnl commented on April 25, 2019

Steps to reproduce

# note the trailing slash
pijul clone https://nest.pijul.com/pijul_org/pijul/

outputs:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:345:21

Technical details

pijul 0.12.0

FlorentBecker commented on May 14, 2019

I wasn't able to reproduce this issue. Do you have access to a debug build of pijul? If so, can you run RUST_BACKTRACE=1 pijul clone https://nest.pijul.com/pijul_org/pijul/

lnnl commented on May 14, 2019

@FlorentBecker:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:345:21
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   6: rust_begin_unwind
             at src/libstd/panicking.rs:312
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::panicking::panic
             at src/libcore/panicking.rs:49
   9: <core::option::Option<T>>::unwrap
             at /rustc/91856ed52c58aa5ba66a015354d1cc69e9779bdf/src/libcore/macros.rs:11
  10: pijul::commands::clone::run
             at /home/vlad/.cargo/registry/src/github.com-1ecc6299db9ec823/pijul-0.12.0/src/commands/clone.rs:122
  11: pijul::main
             at /home/vlad/.cargo/registry/src/github.com-1ecc6299db9ec823/pijul-0.12.0/src/main.rs:74
  12: std::rt::lang_start::{{closure}}
             at /rustc/91856ed52c58aa5ba66a015354d1cc69e9779bdf/src/libstd/rt.rs:64
  13: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  14: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:87
  15: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  16: std::rt::lang_start
             at /rustc/91856ed52c58aa5ba66a015354d1cc69e9779bdf/src/libstd/rt.rs:64
  17: main
  18: __libc_start_main
  19: _start
             at ../sysdeps/x86_64/start.S:120
FlorentBecker commented on May 16, 2019

Thanks for the stacktrace. What system are you running?

FlorentBecker commented on May 16, 2019

One more question: can you run the command again, using RUST_LOG="pijul=debug" pijul clone …? Thanks.

lnnl commented on May 16, 2019

My system is NixOS

  • system: "x86_64-linux"
  • host os: Linux 5.1.2, NixOS, 19.09pre179853.bc9df0f6611 (Loris)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.2.2
  • channels(root): "nixos-19.09pre179853.bc9df0f6611"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Output of RUST_LOG="pijul=debug" pijul clone http://nest.pijul.com/pijul_org/pijul/:

[2019-05-16T12:13:03Z DEBUG pijul::commands::clone] Params { from: Uri { uri: "http://nest.pijul.com/pijul_org/pijul/" }, from_branch: "master", from_path: [], to: Local { path: RepoRoot { repo_root: "" } }, to_branch: "master" }
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:345:21
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

UPD:

Versus RUST_LOG="pijul=debug" pijul clone http://nest.pijul.com/pijul_org/pijul (without trailing slash):

[2019-05-16T12:19:01Z DEBUG pijul::commands::clone] Params { from: Uri { uri: "http://nest.pijul.com/pijul_org/pijul" }, from_branch: "master", from_path: [], to: Local { path: RepoRoot { repo_root: "pijul" } }, to_branch: "master" }

"diff":

- Params { from: Uri { uri: "http://nest.pijul.com/pijul_org/pijul/" }, from_branch: "master", from_path: [], to: Local { path: RepoRoot { repo_root: "" } }, to_branch: "master" }
+ Params { from: Uri { uri: "http://nest.pijul.com/pijul_org/pijul" }, from_branch: "master", from_path: [], to: Local { path: RepoRoot { repo_root: "pijul" } }, to_branch: "master" }
lnnl commented on May 29, 2019

Seems like issue is fixed in yet unreleased version of pijul

pmeunier commented on May 29, 2019

Cool, thanks for testing again!

pmeunier closed this discussion on May 29, 2019