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

Shibboleth protected Gerrit installation
gerrit hooks - automatically push upstream for review
How to specify ID when use set-reviewers
Redirect loop when connecting to Gerrit
Customize gerrit home page:logo and color
Gerrit mistakenly deleted tables Any solution?
What's the role of Change-Id in commit message
Unpublish gerrit change
how to cherry pick a patch with all its dependencies?
Purge Abandoned Change-Ids from Gerrit for good
Gerrit behaviour to find change-id in last paragraph
Gerrit Code review tool
finding out Gerrit server version when having URL
Creating folders in gerrit base path?
How to get patchset “Author” out of Gerrit?
Gerrit code/peer review data extraction

Categories

HOME
log4j
blogger
dictionary
smarty
homebrew
installshield
angular-ui-bootstrap
iggrid
metatrader4
tomcat6
google-cloud-ml
commonmark
decimal
designer
shared-hosting
viewport
opencover
ehcache
sylius
google-search-api
mustache.php
pass-by-reference
language-agnostic
opennlp
user-interaction
nhapi
applozic
maquette
windowbuilder
hexo
dynamics-crm-2013
c11
ncalc
segment
galleria
babel-core
skeleton-css-boilerplate
revapi
atomicity
lowpass-filter
nstextview
lift-json
boost-preprocessor
sqldf
color-profile
time-and-attendance
wdf
nsfilemanager
ctest
plottable.js
persist
simplewebrtc
vhd
jmeter-maven-plugin
tmuxinator
libressl
tarjans-algorithm
myo
device-orientation
javax.mail
gwidgets
typekit
oxwall
socketexception
responsive-slides
p4java
datagridviewcolumn
balanced-payments
cloud-connect
runtime.exec
ora-00911
cos
rabl
pushbackinputstream
jquery-mobile-dialog
interface-orientation
kyotocabinet
sublist
bluepill
word-processor
parametric-equations
infobox
coercion
django-tagging
gdlib
.nettiers
suppress
routedevent
avatar
project-hosting
zune

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App