mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 07:19:45 +03:00
When parsing commit messages, the Commit class tries to optimize the process by invoking git-show once only, extracting both the commit author, title and modified files in one go. As a result, the derived Amendment class needs to implement the commit parsing separately, as the modified files need to be extracted differently for amendments (and the commit ID also needs to be retrieved differently). Furthermore, because of the list of named files, extracting the trailers needs to invoke git-show separately. Improve the situation by reworking the commit message parsing in three steps. In the first step, use git-show to extract the commit ID, author, title and body. In the second step, invoke git-interpret-trailers to extract the trailers from the body that was previously extracted. The third and final step extracts the list of modified files, using different methods for regular commits and amendments. This allows sharing code for the first two steps between the Commit and Amendment classes, making the code simpler. The Commit class still invokes git three times, while the Amendment class runs it three times instead of four, improving performance slightly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> |
||
---|---|---|
.. | ||
hooks | ||
ipc | ||
ipu3 | ||
raspberrypi | ||
rkisp1 | ||
tracepoints | ||
tuning | ||
abi-compat.sh | ||
checkstyle.py | ||
gen-controls.py | ||
gen-formats.py | ||
gen-header.sh | ||
gen-ipa-priv-key.sh | ||
gen-ipa-pub-key.py | ||
gen-version.sh | ||
meson.build | ||
release.sh | ||
run-dist.sh | ||
semver | ||
update-kernel-headers.sh | ||
update-mojo.sh |