gerrit


Is it possible to run Gerrit's commit-msg script standalone, not as hook?


I have no Gerrit hook installed
I have simple commit
I would like to check the Change-id of the commit
Is it possible to get the change id by running some command, for example
./commit-msg xyz
?
I don't want to use Eclipse. I don't want to configure hook.
The commit-msg script assumes to be run as Git hook (see example file). Therefore, it makes couple of assumptions.
Executing it stand-alone (you just could have tried that, right?) fails with
sed: : No such file or directory
Thus, no, you cannot run this standalone.
You might be able to fix it to work when called manually, but I'm unsure about your motivation. You sound like you don't want to install anything, but git-review is a nice helper.
You don't need to manually install the commit-msg hook in every repository you clone. You can configure Git to do this job for you automatically. When you execute the clone command Git copies a repository template located at:
Linux = /usr/share/git-core/templates
Windows = C:/Program Files (x86)/Git/share/git-core/templates
If you add the commit-msg hook to the template it will be installed automatically for every cloned repository.
However, the best thing to do is the following:
Create a personal template (e.g. $HOME/.git-templates)
Install the commit-msg in $HOME/.git-templates/hooks
Configure Git to use your personal template:
git config --global init.templatedir $HOME/.git-templates

Related Links

What is the effect of deleting a branch in gerrit
Right way to resolve gerrit “pending changes” merge conflict
Buck build failing for “events-logs” Gerrit plugin (jar)
Disable direct push and allow Gerrit push
Set “topic” of multiple patches simultaneously in gerrit
Using Gerrit to restrict read access to a git branch
Is it possible to search for commit by Change-Id in Gerrit?
Why is the gerrit change-id commit-hook not a push-hook?
LDAP changed acccount Full Name is not displaying in gerrit web page
Can I change the order of verification and code review in gerrit
Is it possible to make review optional on any particular branch in gerrit?
customize logo on home page gerrit
Failed to start gerrit service
How to get previous patch in gerrit
Integrate Gitolite with Gerrit ACL.
How to display reset password link on gerrit portal?

Categories

HOME
ms-access
testing
hive
zeromq
nullpointerexception
tizen-web-app
amortized-analysis
infragistics
pivotal-cloud-foundry
fancybox
convolution
constraint-programming
podio
contact
gorm
floating-action-button
correlation
resize
zend-framework3
windows-server-2012
decimal
carthage
lombok
systemc
tostring
zapier
excel-2007
telerik-reporting
language-agnostic
blazemeter
trading
angular2-aot
tdd
url-scheme
traffic
opentype
sql-server-2012-express
stormpath
galsim
titanium-mobile
fog
lxd
azure-sql-database
revolution-slider
devextreme
disassembling
lto
dynamics-crm-2013
streamreader
graphenedb
avro4s
isbn
modelmapper
wso2carbon
outlook-2013
network-flow
kbuild
nsarray
windows-mobile-6.5
flow-control
chord-diagram
or-tools
gnome-shell-extensions
spring-android
persist
ubuntu-10.04
xna-4.0
purge
dundas
p2
streambase
javax.mail
gadt
network-interface
heisenbug
undefined-reference
meteor-velocity
java.nio.file
ccss
runtime.exec
coverflow
easy-install
dataadapter
android-screen-support
comaddin
android-hardware
typoscript2
funscript
frameset
cascalog
ticoredatasync
buildr
amazon-appstore
netdna-api
gnu-prolog
django-tagging
xdomainrequest
calling-convention
temporal-database
port-number
3gp

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App