Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
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
7618324
commit 2ef0735
Showing
3 changed files
with
140 additions
and
43 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
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 | ||
} |