Show current branch name in staging view
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -54,6 +54,7 @@ public class RepoController
|
|||||||
public String changes(@PathVariable String name, Model model) throws IOException, GitAPIException
|
public String changes(@PathVariable String name, Model model) throws IOException, GitAPIException
|
||||||
{
|
{
|
||||||
model.addAttribute("name", name);
|
model.addAttribute("name", name);
|
||||||
|
model.addAttribute("branch", gitService.getCurrentBranch(name));
|
||||||
model.addAttribute("modifiedFiles", gitService.getModifiedFiles(name));
|
model.addAttribute("modifiedFiles", gitService.getModifiedFiles(name));
|
||||||
model.addAttribute("stagedFiles", gitService.getStagedFiles(name));
|
model.addAttribute("stagedFiles", gitService.getStagedFiles(name));
|
||||||
return "changes";
|
return "changes";
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h2>Staging</h2>
|
<h2>Staging</h2>
|
||||||
|
<p>Branch: <b th:text="${branch}"></b></p>
|
||||||
|
|
||||||
<h3>Modified Files (unstaged)</h3>
|
<h3>Modified Files (unstaged)</h3>
|
||||||
<form method="post" th:action="@{/repo/{name}/stage(name=${name})}" th:if="${!#lists.isEmpty(modifiedFiles)}">
|
<form method="post" th:action="@{/repo/{name}/stage(name=${name})}" th:if="${!#lists.isEmpty(modifiedFiles)}">
|
||||||
|
|||||||
Reference in New Issue
Block a user