Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] aliases to get all proposals for a gerrit change

Hi,

with some aliases you can easily get all proposals for a change as
tags in your repo:

   git getchange <remote-name> <change-id>    : to fetch all proposals
for a change into tags called <remote-name>/<change-id>/<#proposal>
   git addchange <remote-name> <change-id>    : to change your
configuration that a subsequent "fetch <remote-name>" will always get
the proposals for a change

Here is what to add to your ~/.gitconfig
[alias]
	getchange = !sh -c 'git fetch "$1"
refs/changes/"${2:2:2}"/"$2"/*:refs/tags/"$1"/"$2"/*' -
	addchange = !sh -c 'git config --add remote."$1".fetch
refs/changes/"${2:2:2}"/"$2"/*:refs/tags/"$1"/"$2"/*' -

Ciao
  Chris


Back to the top