From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38659 invoked by alias); 10 Jan 2020 10:36:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 38643 invoked by uid 89); 10 Jan 2020 10:36:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Jan 2020 10:36:25 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AECD91396; Fri, 10 Jan 2020 02:36:23 -0800 (PST) Received: from e120077-lin.cambridge.arm.com (e120077-lin.cambridge.arm.com [10.2.78.81]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2F0893F703; Fri, 10 Jan 2020 02:36:23 -0800 (PST) Subject: Re: [wwwdocs] Git transition - how to access private user and vendor branches From: "Richard Earnshaw (lists)" To: "gcc-patches@gcc.gnu.org" Cc: Joseph Myers References: <01477bd3-5733-8223-8a38-01fd96fafece@arm.com> Message-ID: <705ce4c7-e4d8-b640-707a-66e548a113e4@arm.com> Date: Fri, 10 Jan 2020 11:08:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <01477bd3-5733-8223-8a38-01fd96fafece@arm.com> Content-Type: multipart/mixed; boundary="------------EE08A4DF82D7DE5150E2D684" X-SW-Source: 2020-01/txt/msg00529.txt.bz2 This is a multi-part message in MIME format. --------------EE08A4DF82D7DE5150E2D684 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 473 On 09/01/2020 16:50, Richard Earnshaw (lists) wrote: > Given the proposed intention to use non-standard refspecs for private > and vendor branches I've written some notes on how to use these. > > It would be helpful if someone could do some experiments to ensure that > what I've written works properly for all versions of git, not just the > one I have installed locally. > > R. A minor tweak after testing it myself pushing to the gcc-reposurgeon-8.git trial R. --------------EE08A4DF82D7DE5150E2D684 Content-Type: text/x-patch; name="www-vendor.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="www-vendor.patch" Content-length: 3631 diff --git a/htdocs/svnwrite.html b/htdocs/svnwrite.html index a1346be1..1b06c495 100644 --- a/htdocs/svnwrite.html +++ b/htdocs/svnwrite.html @@ -25,6 +25,7 @@ maintainers and significant developers.

  • Checking in a change
  • Example check-in session
  • Creating and using branches
  • +
  • Private user and Vendor branches
  • Tips&Tricks around your account
  • @@ -407,6 +408,73 @@ svn cp svn+ssh://username@gcc.gnu.org/svn/gcc/trunk \ do not copy the entire set of ChangeLog entries. Just use something like "Merge from mainline" or similar.

    +
    +

    Private user and vendor branches

    + +The GCC git repository is used by many people and the branch and tag +namespace would become very polluted if all branches lived at the +top-level naming space. To help minimise the amount of data that +needs to be fetched the git repository on gcc.gnu.org contains a +number of private user and vendor branches that developers use to +share their work. These are not pulled by default, but simple +configuration steps can give access to them. + +
      +
    • Private user branches live + in refs/users/username/heads with tags + in refs/users/username/tags.
    • +
    • Vendor branches live + in refs/vendors/vendor-name/heads with tags + in refs/vendors/vendor-name/tags.
    • +
    + +To fetch any of these you will need to add a fetch refspec to your +configuration. For example, to fetch all the IBM vendor branches add to +your default upstream pull + +
    +git config --add remote.origin.fetch "+refs/vendors/IBM/heads/*:refs/remotes/origin/IBM/*"
    +git config --add remote.origin.fetch "+refs/vendors/IBM/tags/*:refs/tags/IBM/*"
    +
    + +this will cause git pull to fetch all the additional +branches and make them available locally +under remotes/origin/IBM and will also add any tags under +the sub-namespace IBM. + +Setting up a tracking branch for one of the upstream vendor branches +is slightly more complicated as git branch +--set-upstream-to does not work properly. However, it is +possible to configure the branch information directly. First, check +out the branch you want to track, for example, to check out the +arm-9-branch use something like: + +
    +git checkout -b ARM/arm-9-branch origin/ARM/arm-9-branch
    +
    + +then change the merge property for the branch to corectly identify the +upstream source + +
    +git config branch.ARM/arm-9-branch.merge refs/vendors/ARM/heads/arm-9-branch
    +git config branch.ARM/arm-9-branch.remote origin
    +
    + +Pull operations will now correctly track the upstream branch. + +It is also possible to set up push operations so that local changes will be pushed to the private namespace. For example, if you mirror your own private git information with + +
    +git config --add remote.origin.fetch "+refs/users/my-userid/heads/*:refs/remotes/origin/me/*"
    +
    + +then you can also add +
    +git config --add remote.origin.push "+refs/heads/me/*:refs/users/my-userid/heads/*"
    +
    +and then any push from a branch that begins with me/ will be pushed to the private area. +

    Tips&Tricks around your account

    --------------EE08A4DF82D7DE5150E2D684--