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=p8fra5jR; spf=pass (domain: linaro.org, ip: 209.85.128.49, mailfrom: leif.lindholm@linaro.org) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by groups.io with SMTP; Thu, 30 May 2019 08:59:38 -0700 Received: by mail-wm1-f49.google.com with SMTP id c6so1221459wml.0 for ; Thu, 30 May 2019 08:59:38 -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=ho6T1X5poYfsnsQpRT0A+b7tXu0zAqE1sLu7HQm8KQo=; b=p8fra5jRnLpaTHIkvZrhwdSzROqHiAHbaLqEbUaEOWqNyZcOgKCWh0g0tr9TPjSkz4 AewVtbhEECB6pEyIRf5tC2/NT8GzS1dF2tpYiWFH+ciZS2ObwithThE3jvti1/47Fydl oHg6JNhRb3jO7gtFzk8nJ6jrA4iqBULzBRll1QPJDboDbLPLE6b1vhWhxiE5toPo618x zRH8nA/DhZ8COeFNNG2ja3GR67VmbTuptoZwyrIFWmlMv4/P5DsfXam7DWL8TxniAE5Z 8HPE136R5gVX3dcrG5urvTkDlwFAtdnmesotcBAulG6Bh0Fgo7Mu9DJe1TpVTWwP4mrZ 487g== 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=ho6T1X5poYfsnsQpRT0A+b7tXu0zAqE1sLu7HQm8KQo=; b=Tri9yEy66r8b5NpFKLpPoc2reohvTHTsbj8JnyvWXl7tvZo2DJTMwV7upcEzlFc2Rf Mpm0+59O610HWV7ip/HTwWXF2czeajLaOKKKbzlmgiMIEIjeBnaPDj+DtdP6j3A8Dt2/ 0wUQ04sxE1SPpWnPpy0B5RqKpMMN+9P4icup+xlDNI4KBqtPpLgWhnFAimD9WITX0oIH peFSJ7POUOdukFIbap3HRdqLWJ1Qn9+yB6rac+VTJcakWSgc4vV3Z76xtdmda7lNpokK G7xN2ibMQsOQD/uQzS8LGA8y46BcMKY1Bl2P00z+x4RSlBLNT+7HueMp8TxD4hWP0T/G CQ+w== X-Gm-Message-State: APjAAAU4kBVmMnAWOVMmcjcQPaqCeY6NmSNhN1oTu89MjNvae+eh+U5g /r1Bc4XLikFgAnnIjtbBxNUdn5fza7kp4w== X-Google-Smtp-Source: APXvYqw0eAOOq2XBTNyvNFrGYx14SOHuFtTkvOObEQX9x4iN1Z3vduv2QfoyKR0vKACaIBWECaaUvw== X-Received: by 2002:a1c:2c89:: with SMTP id s131mr2828846wms.142.1559231976557; Thu, 30 May 2019 08:59:36 -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 o21sm3748705wmc.46.2019.05.30.08.59.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 May 2019 08:59:34 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yonghong Zhu , Andrew Fish , Laszlo Ersek , Michael D Kinney Subject: [RFC PATCH 0/2] BaseTools: add script to set up git environment Date: Thu, 30 May 2019 16:59:31 +0100 Message-Id: <20190530155933.25588-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 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