From b0016767e884a9a348118d75700028bbd281b413 Mon Sep 17 00:00:00 2001 From: Sebastiaan de Schaetzen Date: Fri, 27 Feb 2026 11:12:13 +0100 Subject: [PATCH] Show current branch name in staging view Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../java/be/seeseepuff/webgit/controller/RepoController.java | 1 + src/main/resources/templates/changes.html | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/be/seeseepuff/webgit/controller/RepoController.java b/src/main/java/be/seeseepuff/webgit/controller/RepoController.java index 6503e9b..a2efe71 100644 --- a/src/main/java/be/seeseepuff/webgit/controller/RepoController.java +++ b/src/main/java/be/seeseepuff/webgit/controller/RepoController.java @@ -54,6 +54,7 @@ public class RepoController public String changes(@PathVariable String name, Model model) throws IOException, GitAPIException { model.addAttribute("name", name); + model.addAttribute("branch", gitService.getCurrentBranch(name)); model.addAttribute("modifiedFiles", gitService.getModifiedFiles(name)); model.addAttribute("stagedFiles", gitService.getStagedFiles(name)); return "changes"; diff --git a/src/main/resources/templates/changes.html b/src/main/resources/templates/changes.html index 8c25014..7a056ed 100644 --- a/src/main/resources/templates/changes.html +++ b/src/main/resources/templates/changes.html @@ -5,6 +5,7 @@

Staging

+

Branch:

Modified Files (unstaged)