Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Warn user about non-existing configured branch #1937

Merged
merged 1 commit into from
Apr 15, 2019
Merged

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Apr 15, 2019

When a user tried to configure Flux against an empty repository or a
branch that did not exist we would report a bogus status and left the
user confused.

This commit makes it possible to configure a branch that should be
checked for existence on creation of a new repository. In case there
is no HEAD found for this branch, it does not exist in git terms, and
we report back a meaningful error message to the user.

As a bonus we also use this configured branch when we create a tag for
our write check, so we do not touch anything the user has not told us
to.

Fixes #904, bonus fixes #1885

@hiddeco hiddeco requested a review from 2opremio April 15, 2019 12:02
When a user tried to configure Flux against an empty repository or a
branch that did not exist we would report a bogus status and left the
user confused.

This commit makes it possible to configure a branch that should be
checked for existence on creation of a new repository. In case there
is no HEAD found for this branch, it does not exist in git terms, and
we report back a meaningful error message to the user.

As a bonus we also use this configured branch when we create a tag for
our write check, so we do not touch anything the user has not told us
to.
@hiddeco hiddeco force-pushed the bug/904-empty-repo branch from bda15d7 to 9d6355f Compare April 15, 2019 12:05
@2opremio
Copy link
Contributor

Thanks!

@hiddeco hiddeco merged commit 1bf880c into master Apr 15, 2019
@hiddeco hiddeco deleted the bug/904-empty-repo branch April 15, 2019 13:26
@squaremo squaremo added this to the v1.12.1 milestone Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants