From d355910d09298c8fa9fb71305545669b8e4e86f7 Mon Sep 17 00:00:00 2001 From: Thomas Zerr Date: Tue, 31 Mar 2026 10:08:43 +0000 Subject: [PATCH] Fix handling of branches without sources An empty branch without sources, has been treated like an empty repository without any commits, branches or sources. --- .../changelog/fix-handling-of-empty-branch-in-actionbar.yaml | 2 ++ scm-ui/ui-components/src/Breadcrumb.tsx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 gradle/changelog/fix-handling-of-empty-branch-in-actionbar.yaml diff --git a/gradle/changelog/fix-handling-of-empty-branch-in-actionbar.yaml b/gradle/changelog/fix-handling-of-empty-branch-in-actionbar.yaml new file mode 100644 index 0000000000..5abebb0790 --- /dev/null +++ b/gradle/changelog/fix-handling-of-empty-branch-in-actionbar.yaml @@ -0,0 +1,2 @@ +- type: fixed + description: Creation and Upload of a file for an empty branch with no sources diff --git a/scm-ui/ui-components/src/Breadcrumb.tsx b/scm-ui/ui-components/src/Breadcrumb.tsx index 7935f12db8..07b5c8600c 100644 --- a/scm-ui/ui-components/src/Breadcrumb.tsx +++ b/scm-ui/ui-components/src/Breadcrumb.tsx @@ -268,7 +268,8 @@ const Breadcrumb: FC = ({ const renderExtensionPoints = () => { if ( binder.hasExtension("repos.sources.empty.actionbar", extProps) && - sources?._embedded?.children?.length === 0 + sources?._embedded?.children?.length === 0 && + (repository.type !== "git" || sources.revision === "HEAD") ) { return (