Skip to content

Commit 5b7d539

Browse files
committed
add comment
Signed-off-by: nitishfy <[email protected]>
1 parent 34126f9 commit 5b7d539

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

commitserver/commit/commit.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,17 @@ func (s *Service) handleCommitRequest(logCtx *log.Entry, r *apiclient.CommitHydr
159159

160160
logCtx.Debug("Clearing and preparing paths")
161161
var pathsToClear []string
162+
// range over the paths configured and skip those application
163+
// paths that are referencing to root path
162164
for _, p := range r.Paths {
163165
if hydrator.IsRootPath(p.Path) {
164166
// skip adding paths that are referencing root directory
165167
logCtx.Debugf("Path %s is referencing root directory, ignoring the path", p.Path)
166168
continue
167169
}
168-
169170
pathsToClear = append(pathsToClear, p.Path)
170171
}
172+
171173
if len(pathsToClear) > 0 {
172174
logCtx.Debugf("Clearing paths: %v", pathsToClear)
173175
out, err := gitClient.RemoveContents(pathsToClear)

0 commit comments

Comments
 (0)