From 1de55c1cf7a3d965cf2e7db329a4d0788cbab4f5 Mon Sep 17 00:00:00 2001 From: Praveen Chaudhary Date: Sun, 15 Aug 2021 00:01:31 -0700 Subject: [PATCH] [sonic-frr]: Checkout gracefully if branch exists already. (#8289) If branch exist already, today FRR build fails. Branch may exist on rebuild. With this PR, we will Checkout branch gracefully if branch exists already. Signed-off-by: Praveen Chaudhary --- src/sonic-frr/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-frr/Makefile b/src/sonic-frr/Makefile index 4bac1e42769d..45f37e52781e 100644 --- a/src/sonic-frr/Makefile +++ b/src/sonic-frr/Makefile @@ -10,7 +10,7 @@ STG_BRANCH = stg_temp.$(SUFFIX) $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : # Build the package pushd ./frr - git checkout -b $(FRR_BRANCH) origin/$(FRR_BRANCH) + git checkout -b $(FRR_BRANCH) origin/$(FRR_BRANCH) || git checkout $(FRR_BRANCH) stg branch --create $(STG_BRANCH) $(FRR_TAG) stg import -s ../patch/series tools/tarsource.sh -V -e '-sonic'