From 03b9ecb2cf9c9fea8c9e849b6ebd5860a842329d Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sat, 10 Sep 2016 15:02:11 -0600 Subject: [PATCH] Makefile.inc: Add aliases for submodule updates to gitconfig target Updating submodules seem to give people headaches, so this adds a pair of git aliases to update them. 'git sup' updates the submodules to the latest versions, but leaves any locally modified files. 'git sup-destroy' will remove the current submodules and re-initialize them. This deletes any local changes. Change-Id: Id62a30d88b3b6d285b3f00555d7609509aa1561f Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/16573 Tested-by: build bot (Jenkins) Reviewed-by: Omar Pakker Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi --- Makefile.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.inc b/Makefile.inc index 40e8942e24..ffe6015af5 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -575,6 +575,8 @@ gitconfig: fi [ -d 3rdparty/blobs ] && cd 3rdparty/blobs && git config remote.origin.push HEAD:refs/for/master git config remote.origin.push HEAD:refs/for/master + git config alias.sup '!git submodule update --remote --rebase && git submodule update --init --checkout' + git config alias.sup-destroy '!git submodule deinit --force "$$(git rev-parse --show-toplevel)"; git submodule init && git submodule update --checkout' (git config --global user.name >/dev/null && git config --global user.email >/dev/null) || (printf 'Please configure your name and email in git:\n\n git config --global user.name "Your Name Comes Here"\n git config --global user.email your.email@example.com\n'; exit 1) include util/crossgcc/Makefile.inc