On 10/01/2020 14:01, Richard Earnshaw (lists) wrote:
On 10/01/2020 13:29, Richard Biener wrote:
On Fri, Jan 10, 2020 at 2:23 PM Richard Earnshaw (lists)
<richard.earns...@arm.com> wrote:

This patch is intended to help with folks setting up a git work
environment for use with GCC following the transition to git.  It
currently does a couple of things.

1) Add an alias 'svn-rev' to git so that you can look up a legacy commit
by its svn revision number.  This enables you to type
git svn-rev 1234
and git will show the commit log entry relating to SVN r1234.

2) Sets up tracking information for the user's private name area in the
git repo.  It tries to figure out some sensible answers to the data it
needs, but allows the user to override the values.  It then creates the
fetch and push entries that are needed for tracking the extra refs.
This implements one part of the recommendations that I've proposed in
svnwrite.html for dealing with private branches.

It should be possible to run the script more than once and for it to
DTRT.  If you change your answers the configuration should be correctly
updated.

I assume the script is invoked from a clone of the new (final) repo. Does it
need to be cloned in any special way?

Richard.

2020-01-10  Richard Earnshaw  <rearn...@arm.com>

         * gcc-git-customization: New file.


You can run the script after doing a clone.  It adds the bits that a normal clone would not.  I don't know if there's any way of hooking git to run this automatically, but I'm not sure if that would be a good idea anyway, since that would break non-interactive cloning.

R.

The expected using is:

$ git clone git+svn://{id}@gcc.gnu.org/git/gcc
$ cd gcc
$ contrib/gcc-git-customization
# Now pull the additional refs
$ git fetch

R.

Reply via email to