aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-09-10 15:02:11 -0600
committerPatrick Georgi <pgeorgi@google.com>2016-09-20 22:20:30 +0200
commit03b9ecb2cf9c9fea8c9e849b6ebd5860a842329d (patch)
tree5a584ad7f827d0d471ef6402277eb0fe6b7dc71f /Makefile.inc
parenta5aad2ed68690d748c650f69a2e39f91a7b02608 (diff)
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 <martinroth@google.com> Reviewed-on: https://review.coreboot.org/16573 Tested-by: build bot (Jenkins) Reviewed-by: Omar Pakker Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc2
1 files changed, 2 insertions, 0 deletions
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