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


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
	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"/*' -


Back to the top