Jeremy Stanley d633541ecc Vendor a copy of Gerrit's commit-msg Git hook
Gerrit wants each commit message to include a unique identifier
string in a special footer line, so provides a commit-msg hook to
randomly generate and insert one. Traditionally, this file is served
directly from each Gerrit server and users retrieve it via SCP or
HTTPS to install a local copy in their clone of every repository.

Retrieving this file over the network has historically presented a
number of challenges: modern OpenSSH has deprecated the SCP protocol
while the mina-sshd library Gerrit uses hasn't implemented
compatible SFTP support, authentication failures can shadow some
clearer error handling later in git-review's workflow leading to
confusing error messages, and then there are the security concerns
with needing to trust the Gerrit server to supply a script which
will end up running locally on the developer's machine.

In order to address these problems, making git-review more robust
and secure, we embed a copy of the Gerrit upstream project's
commit-msg hook in the client itself and write that to disk by
default rather than pulling a remote copy. This approach does mean
that the user will end up with a frozen version of the script
contemporary with the git-review release they've installed (but its
function is simple and the implementation has changed very
infrequently). It may also break workflows for sites which rely on
users retrieving a customized commit-msg hook. For those reasons, a
command-line option is provided to restore the prior behavior.

Change-Id: Ia26abc781a281817115cb1cafcd5e7b78b383e39
2024-03-04 23:14:16 +00:00
2023-03-13 10:19:07 -07:00
2023-03-13 10:19:07 -07:00
2013-08-15 20:42:37 +00:00
2023-03-14 08:08:22 -07:00
2023-03-07 15:56:59 -08:00
2023-03-13 10:19:07 -07:00
2011-09-25 09:16:31 -07:00
2023-03-13 10:19:07 -07:00
2021-01-13 14:10:31 +00:00
2023-03-13 10:19:07 -07:00
2021-01-13 14:10:31 +00:00
2023-09-20 15:05:25 +00:00

git-review

A git command for submitting branches to Gerrit

git-review is a tool that helps submitting Git branches to Gerrit for review.

Description
Tool for uploading changesets to Gerrit from git
Readme 7.1 MiB
Languages
Python 89.4%
Roff 10.6%