mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 16:01:31 +02:00
sch2fig/git-file.c (select_repo): we actually iterated, but did it wrong
This commit is contained in:
parent
a97ea5bf74
commit
f4745953b5
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user