[coreboot-gerrit] New patch to review for coreboot: Makefile.inc: Add aliases for submodule updates to gitconfig target

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Sat Sep 10 23:04:17 CEST 2016


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16573

-gerrit

commit f07b7e0f32c4b3995a7827d9fbd8f9ce5650e45d
Author: Martin Roth <martinroth at google.com>
Date:   Sat Sep 10 15:02:11 2016 -0600

    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 at google.com>
---
 Makefile.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile.inc b/Makefile.inc
index 0caab91..fc53edf 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -525,6 +525,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 at example.com\n'; exit 1)
 
 include util/crossgcc/Makefile.inc



More information about the coreboot-gerrit mailing list