git-map-branches: Fix --show-subject for branches that are gone

Without this change, the script would try to query the subject of
branches that no longer exist (these are shown as
`{branch-name:GONE}` in the output of the command).

Bug: None
Change-Id: Ia8dafe428654a1ab995dcd0be794e6fd9e25bc7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4078970
Commit-Queue: Christian Flach <cmfcmf@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
diff --git a/git_map_branches.py b/git_map_branches.py
index da63d7a..560532d 100755
--- a/git_map_branches.py
+++ b/git_map_branches.py
@@ -288,7 +288,7 @@
 
     # The subject of the most recent commit on the branch.
     if self.show_subject:
-      if branch:
+      if not self.__is_invalid_parent(branch):
         line.append(run('log', '-n1', '--format=%s', branch, '--'))
       else:
         line.append('')