From: "Leif Lindholm" <leif.lindholm@linaro.org>
To: devel@edk2.groups.io
Cc: "Feng, Bob C" <bob.c.feng@intel.com>,
Liming Gao <liming.gao@intel.com>,
Yonghong Zhu <yonghong.zhu@intel.com>,
Andrew Fish <afish@apple.com>, Laszlo Ersek <lersek@redhat.com>,
Michael D Kinney <michael.d.kinney@intel.com>
Subject: [PATCH 0/2] BaseTools: add script to set up git environment
Date: Mon, 10 Jun 2019 12:54:08 +0100 [thread overview]
Message-ID: <20190610115410.13458-1-leif.lindholm@linaro.org> (raw)
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
environment->packages (pypi), and searching for 'gitpython'.
Note2: for simplicity's sake, the script uses a single copy of the
configuration files for each repository - pointing all of them to the
copies in edk2 BaseTools.
Note3: we're hardcoding absolute paths here, so if you move repositories
around, you need to re-run the script.
Note4: all of the settings are done only on a per-repository basis, so as
not to mess with environments for unrelated projects. This also means
many settings that are common across all repositories are set in each of
them.
Note5: the script identifies repositories based on their 'origin' URL, so
if someone had a good use-case for something cute, there may be more work
required.
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
also make sense to add some sanity checking for global settings (name,
email, mail server config...).
New in v1 (from RFC):
- Script matches on both .git and no extension repo URLs
- Fixed typo and stale comment pointed out.
- Added Laszlo's R-b and Ack.
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 | 204 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 226 insertions(+)
create mode 100644 BaseTools/Conf/diff.order
create mode 100644 BaseTools/Conf/gitattributes
create mode 100644 BaseTools/Scripts/SetupGit.py
--
2.11.0
next reply other threads:[~2019-06-10 11:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 11:54 Leif Lindholm [this message]
2019-06-15 8:47 ` [edk2-devel] [PATCH 0/2] BaseTools: add script to set up git environment Philippe Mathieu-Daudé
2019-06-19 23:34 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190610115410.13458-1-leif.lindholm@linaro.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox