We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39102df commit 51cf26bCopy full SHA for 51cf26b
1 file changed
git/git.go
@@ -26,9 +26,10 @@ type Repository struct {
26
gitBin string
27
}
28
29
-// smartJoin returns the path that can be described as `relPath`
30
-// relative to `path`, given that `path` is either absolute or is
31
-// relative to the current directory.
+// smartJoin returns `relPath` if it is an absolute path. If not, it
+// assumes that `relPath` is relative to `path`, so it joins them
+// together and returns the result. In that case, if `path` itself is
32
+// relative, then the return value is also relative.
33
func smartJoin(path, relPath string) string {
34
if filepath.IsAbs(relPath) {
35
return relPath
0 commit comments