Hi Axel and Guido,

Axel Beckert <[email protected]> writes:
> But it would be nice to do the pushing of branches and tags in one
> short DWIM command instead of two short commands or one long command
> (git push + git push --tags or listing all refs manually), like "dpt
> push" does. So I extended "dpt push" to parse gbp.conf files, so that
> I can use it outside the Debian Perl Group, too, e.g. for the Debian
> Zsh Maintainers.

I do agree, pushing in one command is much more user-friendly than not
providing any help when pushing. I used to forget pushing the
pristine-tar/upstream branches and/or tags _ALL THE TIME_.

It was such a big problem for me that I wrote a custom wrapper for gbp
clone, which would set up the repository in such a way that I couldn’t
forget anymore:

        # This tells git to push all branches at once,
        # i.e. if you changed upstream and debian (after git-import-orig),
        # both upstream and debian will be pushed when running “git push”.
        git config push.default matching

        # This tells git to push tags automatically,
        # so you don’t have to use “git push && git push --tags”.
        git config --add remote.origin.push "+refs/heads/*:refs/heads/*"
        git config --add remote.origin.push "+refs/tags/*:refs/tags/*"

Needless to say, the above could easily be added to gbp clone, so that
at least newly cloned repositories would be set up accordingly.

What do you think of the solution above, i.e. configuring git so that
“git push” is all that’s necessary, instead of introducing a new “gbp
push” command? Would a corresponding patch be accepted into
git-buildpackage?

Thanks!

-- 
Best regards,
Michael

Reply via email to