From fa624b451a7d21165fd064d03b70c96f51e6b27c Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Wed, 14 Oct 2020 17:08:39 +0200 Subject: Re-enable git pulls and repo clean checks at startup --- bpkg-rep/manage.in | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'bpkg-rep') diff --git a/bpkg-rep/manage.in b/bpkg-rep/manage.in index 738802e..ceede3c 100644 --- a/bpkg-rep/manage.in +++ b/bpkg-rep/manage.in @@ -86,19 +86,19 @@ fi # Check that both git repositories are clean. # -# if [ -n "$(git -C $src_dir status --porcelain)" ]; then -# error "git repository in '$src_dir' is not clean" -# fi - -# if [ -n "$(git -C $dst_dir status --porcelain)" ]; then -# error "git repository in '$dst_dir' is not clean" -# fi - -# # Use run() to show the user that git is the source of the diagnostics. -# # "Already up to date", for example, is too vague. -# # -# run git -C "$src_dir" pull >&2 -# run git -C "$dst_dir" pull >&2 +if [ -n "$(git -C $src_dir status --porcelain)" ]; then + error "git repository in '$src_dir' is not clean" +fi + +if [ -n "$(git -C $dst_dir status --porcelain)" ]; then + error "git repository in '$dst_dir' is not clean" +fi + +# Use run() to show the user that git is the source of the diagnostics. +# "Already up to date", for example, is too vague. +# +run git -C "$src_dir" pull >&2 +run git -C "$dst_dir" pull >&2 # Load the source and destination repositories' submit configurations (section # name/directory mappings and owners directory path). -- cgit v1.1