{"thread":{"id":"61687","subject":"Find commit of currently included subtree?","startedAt":"2024-06-27T17:50:22Z","lastAt":"2024-06-27T17:50:22Z","messageCount":1,"participants":["Hilco Wijbenga"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"497761","messageId":"CAE1pOi2ia9DTo6XkHF7-D7QJxiPhd6emEmRz+ZoQ1iUyiNJtPA@mail.gmail.com","threadId":"61687","inReplyTo":null,"subject":"Find commit of currently included subtree?","fromName":"Hilco Wijbenga","fromEmail":"hilco.wijbenga@gmail.com","sentAt":"2024-06-27T17:50:07Z","receivedAt":"2024-06-27T17:50:22Z","isPatch":false,"sender":{"key":"hilco.wijbenga@gmail.com","avatar":null},"body":"Hi all,\n\nI have a subtree (from repo \"Tools\") included in our Git repo (\"App\")\nusing \"git subtree ...\". This is all working fine.\n\nThe next step is to automate checking whether that subtree (in \"App\")\nneeds to be updated. Checking the remote \"Tools\" repo for its latest\ncommit is easy with \"git ls-remote\" but I did not find an (obvious)\nway to check what subtree is currently part of our repo (\"App\").\n\nIt looks like I could parse the message of the commit where the\nsubtree was last updated. It contains a line like \"git-subtree-split:\n1234..cdef\" that appears to match the included commit in \"Tools\". That\nseems rather fragile and relatively complex.\n\nOr I could just run \"git subtree\" and parse its output (as it seems to\nnotice if there is nothing to do)?\n\nAny suggestions for a better/simpler way?\n\nCheers,\nHilco\n"}]}