mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 15:11:19 +02:00
Configure git author name and git author email in .gitconfig.
If git author name is different in the chroot from outside the chroot, repo may auto-delete your changes when you run repo sync. These changes can be recovered, but their deletion is inconvenient. BUG=chromium-os:5934 TEST=Check that git var GIT_COMMITTER_IDENT is now correct inside chroot. Change-Id: I622cd37caa404a7482c55c4b3984877b32b3807c Review URL: http://codereview.chromium.org/3352008
This commit is contained in:
parent
70b297a263
commit
0fd8af4a9b
@ -285,6 +285,12 @@ if [ -d "$HOME/.subversion" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Configure committer username and email in chroot .gitconfig
|
||||||
|
git config -f ${FLAGS_chroot}/home/${USER}/.gitconfig --replace-all user.name \
|
||||||
|
"$(cd /tmp; git var GIT_COMMITTER_IDENT | sed -e 's/ *<.*//')"
|
||||||
|
git config -f ${FLAGS_chroot}/home/${USER}/.gitconfig --replace-all user.email \
|
||||||
|
"$(cd /tmp; git var GIT_COMMITTER_IDENT | sed -e 's/.*<\([^>]*\)>.*/\1/')"
|
||||||
|
|
||||||
# Run command or interactive shell. Also include the non-chrooted path to
|
# Run command or interactive shell. Also include the non-chrooted path to
|
||||||
# the source trunk for scripts that may need to print it (e.g.
|
# the source trunk for scripts that may need to print it (e.g.
|
||||||
# build_image.sh).
|
# build_image.sh).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user