branch: externals/vc-got
commit 7a5ead659d51fa249e2af1fcbf0ad79e969e5204
Author: Omar Polo <[email protected]>
Commit: Omar Polo <[email protected]>

    vc-got-repository-url: avoid infinite loops in parsing
    
    add a missing forward-line and make sure we don't try to go past the
    end of the file (another thing that may cause an infinite loop).
---
 vc-got.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/vc-got.el b/vc-got.el
index 8440bf5..f4121be 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -665,9 +665,11 @@ Value is returned as floating point fractional number of 
days."
         (when (search-forward heading nil t)
           (forward-line)
           (while (and (not found)
-                      (looking-at ".*="))       ;too broad?
+                      (looking-at ".*=") ;too broad?
+                      (not (= (point) (point-max))))
             (when (looking-at ".*url = \\(.*\\)")
-              (setq found (match-string-no-properties 1))))
+              (setq found (match-string-no-properties 1)))
+            (forward-line))
           found)))))
 
 (provide 'vc-got)

Reply via email to