]> git.proxmox.com Git - libgit2.git/commitdiff
Add error messages for failed submodule lookup
authorRussell Belfer <rb@github.com>
Wed, 1 May 2013 12:34:01 +0000 (05:34 -0700)
committerRussell Belfer <rb@github.com>
Wed, 1 May 2013 12:34:01 +0000 (05:34 -0700)
src/submodule.c

index 0a22e3b13e55b93ce74c5e51fd0745a985a49f37..f4fbcd35afaa60307c26818f912ad4a581e98a1c 100644 (file)
@@ -128,6 +128,10 @@ int git_submodule_lookup(
                        git_buf_free(&path);
                }
 
+               giterr_set(GITERR_SUBMODULE, (error == GIT_ENOTFOUND) ?
+                       "No submodule named '%s'" :
+                       "Submodule '%s' has not been added yet", name);
+
                return error;
        }