Commit 98858e3
committed
refactor: enhance current_branch function for better detection
Update the current_branch function to handle cases where the branch is either empty or set to HEAD, normalizing the output to indicate a detached state. Additionally, refactor cmd_list to utilize the updated current_branch function, improving code clarity and maintainability.1 parent 25ede69 commit 98858e3
2 files changed
Lines changed: 4 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1055 | 1055 | | |
1056 | 1056 | | |
1057 | 1057 | | |
1058 | | - | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
| 1058 | + | |
1062 | 1059 | | |
1063 | 1060 | | |
1064 | 1061 | | |
| |||
1086 | 1083 | | |
1087 | 1084 | | |
1088 | 1085 | | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
| 1086 | + | |
1093 | 1087 | | |
1094 | 1088 | | |
1095 | 1089 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
| 169 | + | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
0 commit comments