summaryrefslogtreecommitdiffstats
path: root/pkg/utils
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-07 18:27:18 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-07 18:59:56 +1000
commit660cc2f3d1d5253817d52e8991f74e836d3db6ba (patch)
tree6ca6d605851b6f71d27713cf9f5cb5afb2e6eeac /pkg/utils
parent469ac116efde8dd107bc227ef8fc0f1927a629cb (diff)
follow cursor when staging and unstaging a file rename
Diffstat (limited to 'pkg/utils')
-rw-r--r--pkg/utils/utils.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go
index 2e17527aa..6eca59a6b 100644
--- a/pkg/utils/utils.go
+++ b/pkg/utils/utils.go
@@ -322,3 +322,15 @@ func FindStringSubmatch(str string, regexpStr string) (bool, []string) {
match := re.FindStringSubmatch(str)
return len(match) > 0, match
}
+
+func StringArraysOverlap(strArrA []string, strArrB []string) bool {
+ for _, first := range strArrA {
+ for _, second := range strArrB {
+ if first == second {
+ return true
+ }
+ }
+ }
+
+ return false
+}