public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] BaseTools: add script to set up git environment
@ 2019-05-30 15:59 Leif Lindholm
  2019-06-05 10:37 ` Bob Feng
  0 siblings, 1 reply; 3+ messages in thread
From: Leif Lindholm @ 2019-05-30 15:59 UTC (permalink / raw)
  To: devel
  Cc: Bob Feng, Liming Gao, Yonghong Zhu, Andrew Fish, Laszlo Ersek,
	Michael D Kinney

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 unlelated projects. This also means many
settings that are common across all repositories are set in each of them.

Note4: 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...).

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH 0/2] BaseTools: add script to set up git environment
  2019-05-30 15:59 [RFC PATCH 0/2] BaseTools: add script to set up git environment Leif Lindholm
@ 2019-06-05 10:37 ` Bob Feng
  2019-06-06  9:14   ` Leif Lindholm
  0 siblings, 1 reply; 3+ messages in thread
From: Bob Feng @ 2019-06-05 10:37 UTC (permalink / raw)
  To: Leif Lindholm, devel@edk2.groups.io
  Cc: Gao, Liming, Zhu, Yonghong, Andrew Fish, Laszlo Ersek,
	Kinney, Michael D

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/edk2"  not "git clone https://github.com/tianocore/edk2.git" and when I run this script, it reported "Unknown upstream ....".  

The script works well if the git url is https://github.com/tianocore/edk2.git

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] 
Sent: Friday, May 31, 2019 12:00 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>; Andrew Fish <afish@apple.com>; Laszlo Ersek <lersek@redhat.com>; Kinney, Michael D <michael.d.kinney@intel.com>
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 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 unlelated projects. This also means many settings that are common across all repositories are set in each of them.

Note4: 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...).

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH 0/2] BaseTools: add script to set up git environment
  2019-06-05 10:37 ` Bob Feng
@ 2019-06-06  9:14   ` Leif Lindholm
  0 siblings, 0 replies; 3+ messages in thread
From: Leif Lindholm @ 2019-06-06  9:14 UTC (permalink / raw)
  To: Feng, Bob C
  Cc: devel@edk2.groups.io, Gao, Liming, Zhu, Yonghong, Andrew Fish,
	Laszlo Ersek, Kinney, Michael D

Hi Bob,

Ah, that is a very good point.
Yes, I will do that for v2.

Thanks!,

Leif

On Wed, Jun 05, 2019 at 10:37:31AM +0000, Feng, Bob C wrote:
> 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/edk2"  not "git clone https://github.com/tianocore/edk2.git" and when I run this script, it reported "Unknown upstream ....".  
> 
> The script works well if the git url is https://github.com/tianocore/edk2.git
> 
> 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] 
> Sent: Friday, May 31, 2019 12:00 AM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>; Andrew Fish <afish@apple.com>; Laszlo Ersek <lersek@redhat.com>; Kinney, Michael D <michael.d.kinney@intel.com>
> 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 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 unlelated projects. This also means many settings that are common across all repositories are set in each of them.
> 
> Note4: 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...).
> 
> 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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-06  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-30 15:59 [RFC PATCH 0/2] BaseTools: add script to set up git environment Leif Lindholm
2019-06-05 10:37 ` Bob Feng
2019-06-06  9:14   ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox