public static bool IsDetachedHead(this Branch branch) { return branch.CanonicalName.Equals("(no branch)", StringComparison.OrdinalIgnoreCase); }