From 09eca959cb9a3f2af0b69a9181ef47f311f7da9c Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sat, 22 Aug 2020 05:11:04 +0200 Subject: [PATCH] fix #59 - git menu, no label in the list of branch when in "detached HEAD" after a checkout --- CHANGELOG.md | 4 ++++ src/u_main.pas | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a8cfdd6..2cdb78f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ - Project menu, git: add the first line of last commit message as additional information, between square brackets, to the items of the list of branches. (#53) - Symbol list: keep errors and warnings at the top of the tree and never sort these two categories, to respect the lexicographic order. (#58) +## Bugs + +- Project menu, git: no label in the list of branches when in "detached HEAD" after a checkout + ## Other - compilation: FPC 3.2.0 now required to compile dexed. diff --git a/src/u_main.pas b/src/u_main.pas index e0be7a90..7ce94b7c 100644 --- a/src/u_main.pas +++ b/src/u_main.pas @@ -4218,7 +4218,10 @@ begin processOutputToStrings(p, c); while p.Running do ; if not c.Count.equals(0) then - m.caption := m.Hint + ' [last commit: ' + c[0] + ' ]'; + m.caption := m.Hint + ' [last commit: ' + c[0] + ' ]' + else + // e.g "(HEAD detached on ...)" + m.caption := m.Hint; mnuGitBranch.Add(m); end; end;