ros-infrastructure / catkin_pkg

Standalone Python library for the catkin build system.
https://github.com/ros/catkin
Other
46 stars 89 forks source link

catkin_generate_changelog fails if multiple refnames point to the same commit #349

Open orensbruli opened 1 year ago

orensbruli commented 1 year ago

If several branches/tags point to the same repo catkin_generate_changelog fails because it interprets the first-line of the output of the command

> /usr/bin/git log <refname> --format=format:%H
warning: refname '<refnam>' is ambiguous
987a9953e3ce3279a40f81a1a4039310bd08761b

as a valid sha and fails on the next command:

> /usr/bin/git log warning: refname '3.0.1' is ambiguous. -n 1 --format=format:%B
ERROR: Could not fetch commit message:
fatal: invalid object name 'warning'.

To fix this, the warning warning: refname '<refnam>' is ambiguous should not be part of the output but of stderr of the executed command.

Suggested PR: https://github.com/ros-infrastructure/catkin_pkg/pull/348