1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-12-23 13:04:15 +02:00

sch2fig/git-file.c (select_repo): we actually iterated, but did it wrong

This commit is contained in:
Werner Almesberger 2016-08-02 10:23:39 -03:00
parent a97ea5bf74
commit f4745953b5
2 changed files with 3 additions and 3 deletions

View File

@ -22,5 +22,3 @@
- move path name guessing into file.c
- return indication of whether diff found any differences
- in diff, pass only options understood by cairo_png
- git_repository_open_ext does not open repo if the path points to a dead file;
need to iterate here, too

View File

@ -37,10 +37,12 @@ static git_repository *select_repo(const char *path)
* So we trim off elements until we find a repository.
*/
while (1) {
if (verbose > 2)
fprintf(stderr, "trying \"%s\"\n", tmp);
if (!git_repository_open_ext(&repo, *tmp ? tmp : "/",
GIT_REPOSITORY_OPEN_CROSS_FS, NULL))
break;
slash = strrchr(path, '/');
slash = strrchr(tmp, '/');
if (!slash)
break;
*slash = 0;