guix pull: error: Git error: unable to parse OID - contains invalid characters when COMMIT-ID is shortened

  • Done
  • quality assurance status badge
Details
2 participants
  • Björn Höfling
  • Ludovic Courtès
Owner
unassigned
Submitted by
Björn Höfling
Severity
normal
B
B
Björn Höfling wrote on 5 Mar 2018 21:29
(address . bug-guix@gnu.org)
20180305212912.625ecf29@alma-ubu
Guix pull has the wrong error message when the commit-id for the
"--commit" parameter is too short:

$>guix pull --commit=d20647722ad36024a3a0b6e1e75c1ba49b9f61d
Updating from Git repository at
error: unable to parse OID - contains invalid characters

Instead of that error-message it should complain that the OID is too
short.

Even better, it should just accept a shortened OID and use it, as long
as it is unique.

Note: When there really is a wrong character used, this error message
is also correctly shown:

$>guix pull --commit=d20647722ad36024a3a0b6e1e75c1ba49b9f61dz
Updating from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
guix pull: error: Git error: unable to parse OID - contains invalid characters


Note: If the OID is long enough and well-formed, but just non-existent,
the error message is adequately correct:

$> guix pull --commit=d20647722ad36024a3a0b6e1e75c1ba49b9f61dd
Updating from Git repository at
error: object not found - no match for id
(d20647722ad36024a3a0b6e1e75c1ba49b9f61dd)


Björn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlqdqJgACgkQvyhstlk+X/12HACfW4XDQl4pIrvhJJCTOZ9aUJQ0
zPUAoKDUf03If3R7+vKtf/i4y4KG4+sy
=UqPm
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 18 Mar 2018 00:04
(name . Björn Höfling)(address . bjoern.hoefling@bjoernhoefling.de)(address . 30716-done@debbugs.gnu.org)
87vadujobp.fsf@gnu.org
Hi Björn,

Björn Höfling <bjoern.hoefling@bjoernhoefling.de> skribis:

Toggle quote (4 lines)
> $>guix pull --commit=d20647722ad36024a3a0b6e1e75c1ba49b9f61dz
> Updating from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> guix pull: error: Git error: unable to parse OID - contains invalid characters

This was actually and out-of-bounds read in Guile-Git (!), now fixed:


Furthermore, ‘guix pull’ now supports short IDs provided a recent-enough
Guile-Git is available:


Thanks,
Ludo’.
Closed
?