mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-18 21:55:22 -04:00
builder: Properly check for gitlink trees
Instead of expecting the second word to be "commit", we should do like
git does and check for the file mode, which is 160000 for gitlink trees.
cda1bbd474/cache.h (L96)
This commit is contained in:
@@ -327,7 +327,7 @@ git_mirror_submodules (const char *repo_location,
|
||||
|
||||
words = g_strsplit_set (lines[0], " \t", 4);
|
||||
|
||||
if (g_strcmp0 (words[1], "commit") != 0)
|
||||
if (g_strcmp0 (words[0], "160000") != 0)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Not a gitlink tree: %s", path);
|
||||
return FALSE;
|
||||
@@ -482,7 +482,7 @@ git_extract_submodule (const char *repo_location,
|
||||
|
||||
words = g_strsplit_set (lines[0], " \t", 4);
|
||||
|
||||
if (g_strcmp0 (words[1], "commit") != 0)
|
||||
if (g_strcmp0 (words[0], "160000") != 0)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Not a gitlink tree: %s", path);
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user