From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=lkqyg4M5; spf=pass (domain: linaro.org, ip: 209.85.128.41, mailfrom: leif.lindholm@linaro.org) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by groups.io with SMTP; Mon, 10 Jun 2019 04:54:14 -0700 Received: by mail-wm1-f41.google.com with SMTP id x15so8199874wmj.3 for ; Mon, 10 Jun 2019 04:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Tn89v1JXY9/HFs4QiZWeE4SwM4AxteQdkuK6J54YBZ0=; b=lkqyg4M5cK4Ns9h2crZVdHIBNhqKYC3Q4TCda21BjoUKr1j0xmm9pYEqj2Lxyh5Xvm KvukRtJxmSbeF0BbTdz8Z3zkLOWJXi7SBGPoluMLaQadQ4kvogBS5pkR/plUWGxxJHJx lDhuUdwqQMv9qVLZhr4vDPA6w/TQvlW8Z62jATe6G5BUYaYTZZT3SwB9S7gzw/xDcRAY yhmQ19Jo0X2P2ZODrfgj0KC2uxR6Vteqkb3IKn50r2IfsIcpOVBvXEwtNjmjpUtmRGC3 jvzr61/q5oQlDP61B8W5XnMCFdT2lzmNZF6TpI7rEWI62ymDV0OHO3IVt/pIYpm8Sdcz FTnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Tn89v1JXY9/HFs4QiZWeE4SwM4AxteQdkuK6J54YBZ0=; b=dhVUZ9b3+MuTvLdthXG41GimBvjC20i9gEon22tjxk/tyVK3o1YVdcZlIqlAtHtJuM ct6UGPZw87YtIouEZ+E931F88zBR6Eb8Y85YyRiCnjV1S3TV6k17QX4tLvqLoKRDSVwS O3hlPatqSnp0FlMY5ggW2Dpe6P3zp9TcqzX/VBw1rLyk8yLdDM8r7U7NOyKCdtrTyx5a u1td9ZAKHCbvVUAFGk4A7zh7+Nh+B3WiQIzRPAG4HxgMqxEiGVQyPWt6QzGp/u1F8mon GbAtPufoQSHMhfemMiQwFOUXO/pIZc2uaIqst2A0M7iIDJY/zAaWizOcBD386lOKaM4V 3ylQ== X-Gm-Message-State: APjAAAW6+WY4uB5UagaDmXkaojUoVv+CVfTXVM3XhFBROuGSdejOoJkg KUHDgS/8UVZlNB5WGm05Ew1gYCgIKljrqA== X-Google-Smtp-Source: APXvYqyTFlKI4wNOP4vaGgwK+4tjFQZFTbLLo7uCgVjUPy1UaFTCa2SafIgDGwtOW0ZAT88XxxZ2Lg== X-Received: by 2002:a1c:2004:: with SMTP id g4mr12351902wmg.173.1560167651936; Mon, 10 Jun 2019 04:54:11 -0700 (PDT) Return-Path: Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id y2sm10828635wra.58.2019.06.10.04.54.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 04:54:11 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: "Feng, Bob C" , Liming Gao , Yonghong Zhu , Andrew Fish , Laszlo Ersek , Michael D Kinney Subject: [PATCH 0/2] BaseTools: add script to set up git environment Date: Mon, 10 Jun 2019 12:54:08 +0100 Message-Id: <20190610115410.13458-1-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 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