Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: "unable to switch worktree" in gitlab
Automatically invalidate inconsistent service git worktree which werf creates in the ~/.werf/local_cache/git_worktrees. Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
- Loading branch information
1 parent
ccc0d22
commit fe6c2d4
Showing
2 changed files
with
87 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package util | ||
|
||
import ( | ||
"bufio" | ||
"strings" | ||
) | ||
|
||
func SplitLines(s string) []string { | ||
var lines []string | ||
sc := bufio.NewScanner(strings.NewReader(s)) | ||
sc.Split(bufio.ScanLines) | ||
for sc.Scan() { | ||
lines = append(lines, sc.Text()) | ||
} | ||
return lines | ||
} |