[edk2-devel] [PATCH 0/2] BaseTools: add script to set up git environment

Leif Lindholm posted 2 patches 13 weeks ago
Only 0 patches received!
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

[edk2-devel] [PATCH 0/2] BaseTools: add script to set up git environment

Posted by Leif Lindholm 13 weeks ago
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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42094): https://edk2.groups.io/g/devel/message/42094
Mute This Topic: https://groups.io/mt/32003227/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 0/2] BaseTools: add script to set up git environment

Posted by Philippe Mathieu-Daudé 13 weeks ago
On 6/10/19 1:54 PM, Leif Lindholm wrote:
> 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).

Laszlo, why do you set 'git config core.pager cat'?

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42462): https://edk2.groups.io/g/devel/message/42462
Mute This Topic: https://groups.io/mt/32003227/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 0/2] BaseTools: add script to set up git environment

Posted by Laszlo Ersek 12 weeks ago
On 06/15/19 10:47, Philippe Mathieu-Daudé wrote:
> On 6/10/19 1:54 PM, Leif Lindholm wrote:
>> 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).
> 
> Laszlo, why do you set 'git config core.pager cat'?
> 

Because I dislike git invoking "less" automatically, when run from a
terminal. If I need "less", I can pipe git's output to "less" just fine.

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42605): https://edk2.groups.io/g/devel/message/42605
Mute This Topic: https://groups.io/mt/32003227/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-