Tool for uploading changesets to Gerrit from git
Go to file
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
doc Switch from tox to nox 2023-03-13 10:19:07 -07:00
git_review Vendor a copy of Gerrit's commit-msg Git hook 2024-03-04 23:14:16 +00:00
releasenotes/notes Vendor a copy of Gerrit's commit-msg Git hook 2024-03-04 23:14:16 +00:00
.gitignore Switch from tox to nox 2023-03-13 10:19:07 -07:00
.gitreview Corrected git-review project organization 2019-06-19 14:57:13 +00:00
.mailmap Migrate to pbr. 2013-08-15 20:42:37 +00:00
.stestr.conf Switch from testrepository to stestr 2019-02-12 09:58:46 +00:00
.zuul.yaml Test old and new Gerrit 2023-03-14 08:08:22 -07:00
bindep.txt Upgrade testing to Gerrit 3.4.4 2023-03-07 15:56:59 -08:00
CONTRIBUTING.rst Switch from tox to nox 2023-03-13 10:19:07 -07:00
git-review.1 Vendor a copy of Gerrit's commit-msg Git hook 2024-03-04 23:14:16 +00:00
LICENSE Ported rfc.sh to a standalone program. 2011-09-25 09:16:31 -07:00
noxfile.py Switch from tox to nox 2023-03-13 10:19:07 -07:00
README.rst Overhaul Python package metadata and OpenDev URLs 2021-02-26 20:45:24 +00:00
requirements.txt Drop support for py27 2021-01-13 14:10:31 +00:00
setup.cfg Switch from tox to nox 2023-03-13 10:19:07 -07:00
setup.py Drop support for py27 2021-01-13 14:10:31 +00:00
test-requirements.txt Uncap test requirements 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.