We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
branch --show-current
1 parent 679ead2 commit 7c36e56Copy full SHA for 7c36e56
CodeEdit/Features/Git/Client/GitClient+Branches.swift
@@ -31,7 +31,7 @@ extension GitClient {
31
32
/// Get current branch
33
func getCurrentBranch() async throws -> GitBranch? {
34
- let branchName = try await run("rev-parse --abbrev-ref HEAD").trimmingCharacters(in: .whitespacesAndNewlines)
+ let branchName = try await run("branch --show-current").trimmingCharacters(in: .whitespacesAndNewlines)
35
let components = try await run(
36
"for-each-ref --format=\"%(refname)|%(upstream:short)\" refs/heads/\(branchName)"
37
)
0 commit comments