[openstack-dev] Announcing a simple new tool: git-restack

Bailey, Darragh dbailey at hpe.com
Mon Feb 8 12:20:30 UTC 2016


I've got some git aliases that handle this, so I did a quick review to
see what might be useful additions to the tool.

  * Looks like passing of the branch should change the branch used for a
    .gitreview file to parse
      o This looks to be unnecessary with newer git-review anyway, but
        is probably a reasonable fallback for a while
  * Defaulting to looking for an explicit upstream using the
    '<branch>@{u}' notation first looks like it would allow this tool to
    work in any repo
      o newer git-review already sets this from 1.25


The aliases in case they help:

diverge-commit = !f() { git merge-base $(git show-upstream $@)
${1:-HEAD}; }; f
review-branch = !f() { git show ${1:-HEAD}:.gitreview | git config --get
--file - gerrit.defaultbranch || echo master;}; f
rework = !git rebase -i $(git diverge-commit $@)
show-upstream = !f() { git rev-parse --symbolic-full-name --abbrev-ref
${1}@{u} 2>/dev/null || git rev-parse --symbolic-full-name --abbrev-ref
$(git review-branch)@{u}; }; f

Regards,
Darragh Bailey
IRC: electrofelix
"Nothing is foolproof to a sufficiently talented fool" - Unknown

On 02/02/16 23:50, James E. Blair wrote:
> Paul Michali <pc at michali.net> writes:
>
>> Sounds interesting... the link
>> https://docs.openstack.org/infra/git-restack/ referenced
>> as the home page in PyPI is a broken link.
> I'm clearly getting ahead of things.  The correct link is:
>
>   http://docs.openstack.org/infra/git-restack/
>
> Thanks,
>
> Jim
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




More information about the OpenStack-dev mailing list