Otherwise, problems arise when branches depend (via .topdeps) on SHA1s:
$ tg push -r tmp t/____longjmp_chk_cleanup_linux_x86_64
fatal:
77c84aeb81808c3109665949448dba59965c391e cannot be resolved to branch.
fatal: The remote end hung up unexpectedly
Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
# if so desired omit non tgish deps
$tgish_deps_only && [ -z "$_dep_is_tgish" ] && return 0
+ # filter out plain SHA1s. These don't need to be pushed explicitly as
+ # the patches that depend on the sha1 have it already in their ancestry.
+ is_sha1 "$_dep" && return 0
+
echo "$_dep" >> "$_listfile"
[ -z "$_dep_is_tgish" ] ||
echo "top-bases/$_dep" >> "$_listfile"
test "$(git rev-parse "$mb^{tree}")" = "$(git rev-parse "$_name^{tree}")";
}
+# is_sha1 REF
+# Whether REF is a SHA1 (compared to a symbolic name).
+is_sha1()
+{
+ [ "$(git rev-parse "$1")" = "$1" ]
+}
+
# recurse_deps CMD NAME [BRANCHPATH...]
# Recursively eval CMD on all dependencies of NAME.
# CMD can refer to $_name for queried branch name,