[Insight-developers] ITK / Gerrit question

Marcus D. Hanwell marcus.hanwell at kitware.com
Tue Oct 26 13:21:04 EDT 2010


On Tue, Oct 26, 2010 at 11:40 AM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
> Hi Marcus,
>
> At the ITK tcon we were wondering if we could modify our installation of
> Gerrit
> to have the git command line create a branch with the topic that is just
> checked out.
>
> so, to change:
>
> git fetch ssh://ibanez@review.source.kitware.com:29418/ITK
> refs/changes/34/234/1
> && git checkout FETCH_HEAD
>
> into
>
>
> git fetch ssh://ibanez@review.source.kitware.com:29418/ITK
> refs/changes/34/234/1
> && git checkout FETCH_HEAD -b topic-name
>
>
> Do you think this could be done ?
>
I think it could be done, but the majority of the time when reviewing
a topic branch there is no need to make it into a named topic branch.
You only really need to assign it a name if you are going to stage it,
and merge it. Then a,

git checkout -b topic-name

Would give you that from the detached head. You still need to ensure
you are at the tip of the topic, and most of the time I would rather
have the current behavior. I can take a look and see where the change
would be required, and how likely it is that it would be accepted
upstream (as we would rather not maintain a patched version of Gerrit
long term).

Marcus


More information about the Insight-developers mailing list