From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: bob.c.feng@intel.com) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by groups.io with SMTP; Wed, 05 Jun 2019 03:37:35 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2019 03:37:34 -0700 X-ExtLoop1: 1 Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 05 Jun 2019 03:37:34 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 5 Jun 2019 03:37:34 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 5 Jun 2019 03:37:34 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.10]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.120]) with mapi id 14.03.0415.000; Wed, 5 Jun 2019 18:37:32 +0800 From: "Bob Feng" To: Leif Lindholm , "devel@edk2.groups.io" CC: "Gao, Liming" , "Zhu, Yonghong" , Andrew Fish , Laszlo Ersek , "Kinney, Michael D" Subject: Re: [RFC PATCH 0/2] BaseTools: add script to set up git environment Thread-Topic: [RFC PATCH 0/2] BaseTools: add script to set up git environment Thread-Index: AQHVFwCxsYW0Yd7rrUimqnzhybBPL6aM4vCg Date: Wed, 5 Jun 2019 10:37:31 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16013285D@SHSMSX101.ccr.corp.intel.com> References: <20190530155933.25588-1-leif.lindholm@linaro.org> In-Reply-To: <20190530155933.25588-1-leif.lindholm@linaro.org> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Leif, https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-= guide-for-edk2-contributors-and-maintainers is a great resource. It's very = useful. I tested this scripts. I found a minor issue that I have a local edk2 repo = which was cloned by the command: "git clone https://github.com/tianocore/ed= k2" not "git clone https://github.com/tianocore/edk2.git" and when I run t= his script, it reported "Unknown upstream ....". =20 The script works well if the git url is https://github.com/tianocore/edk2.g= it So would you update the script to support the url with or without the ".git= " suffix? Thanks, Bob -----Original Message----- From: Leif Lindholm [mailto:leif.lindholm@linaro.org]=20 Sent: Friday, May 31, 2019 12:00 AM To: devel@edk2.groups.io Cc: Feng, Bob C ; Gao, Liming ;= Zhu, Yonghong ; Andrew Fish ; Las= zlo Ersek ; Kinney, Michael D Subject: [RFC PATCH 0/2] BaseTools: add script to set up git environment https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-= guide-for-edk2-contributors-and-maintainers is a great resource, but it's a lot of manual steps to go through for each = repository (especially as the number seems to grow). Script works with python2/3 under both Posix and Windows. Note: the script does require the 'gitpython' module to be installed. Under Linux, this can be achieved with your distribution package manager. Under Windows, you can install this from the Visual Studio python environme= nt->packages (pypi), and searching for 'gitpython'. Note2: for simplicity's sake, the script uses a single copy of the configur= ation files for each repository - pointing all of them to the copies in edk= 2 BaseTools. Note3: we're hardcoding absolute paths here, so if you move repositories ar= ound, you need to re-run the script. Note4: all of the settings are done only on a per-repository basis, so as n= ot to mess with environments for unlelated projects. This also means many s= ettings that are common across all repositories are set in each of them. Note4: the script identifies repositories based on their 'origin' URL, so i= f someone had a good use-case for something cute, there may be more work re= quired. Future plans: It would be useful to also add common git-hook scripts to install. I already have some for my own maintainer use. Even though we only modify settings for the current repository, it would al= so make sense to add some sanity checking for global settings (name, email,= mail server config...). Leif Lindholm (2): BaseTools: add centralized location for git config files BaseTools: add script to configure local git options BaseTools/Conf/diff.order | 8 ++ BaseTools/Conf/gitattributes | 14 ++++ BaseTools/Scripts/SetupGit.py | = 187 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 209 insertions(+) create mode 100644 BaseTools/Conf/diff.order create mode 100644 BaseTools= /Conf/gitattributes create mode 100644 BaseTools/Scripts/SetupGit.py -- 2.11.0