[fuchsia_roller] Use 14-char git hashes in footer

The roll_comment recipe uses this footer to do a `git log` via gitiles
to get a list of the rolled commits to comment on. However, when using
7-character hashes gitiles sometimes detects a hash ambiguity and
returns a 404 (this doesn't make sense, because 7 characters leaves room
for >268 million commits and fuchsia.git only has 75,000). So we use a
longer hash to make it much less likely that the hash will be ambiguous,
while still keeping the footer line under the git commit message line
length limit of 72 characters.

See http://b/148289050 for discussion.

Bug: 44619
Change-Id: I3ed5e9754c089a29194fb42e62965de89ce0fba4
diff --git a/recipes/fuchsia_roller.expected/cobalt_project.json b/recipes/fuchsia_roller.expected/cobalt_project.json
index 5b15dc5..2b8bcf7 100644
--- a/recipes/fuchsia_roller.expected/cobalt_project.json
+++ b/recipes/fuchsia_roller.expected/cobalt_project.json
@@ -383,7 +383,7 @@
       "git",
       "commit",
       "-m",
-      "[roll] Roll cobalt [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://cobalt-analytics.googlesource.com/config\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
+      "[roll] Roll cobalt [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://cobalt-analytics.googlesource.com/config\nRolled-Commits: [OLD_REVISION]..fc4dc762688d22\nChange-Id: Iabc123\n",
       "-a"
     ],
     "cwd": "[START_DIR]/garnet",
diff --git a/recipes/fuchsia_roller.expected/garnet.json b/recipes/fuchsia_roller.expected/garnet.json
index 8564d62..a7fb3e9 100644
--- a/recipes/fuchsia_roller.expected/garnet.json
+++ b/recipes/fuchsia_roller.expected/garnet.json
@@ -382,7 +382,7 @@
       "git",
       "commit",
       "-m",
-      "[roll] Roll garnet [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/garnet\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
+      "[roll] Roll garnet [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/garnet\nRolled-Commits: [OLD_REVISION]..fc4dc762688d22\nChange-Id: Iabc123\n",
       "-a"
     ],
     "cwd": "[START_DIR]/peridot",
diff --git a/recipes/fuchsia_roller.expected/missing_revision.json b/recipes/fuchsia_roller.expected/missing_revision.json
index 6bf90d8..ea69476 100644
--- a/recipes/fuchsia_roller.expected/missing_revision.json
+++ b/recipes/fuchsia_roller.expected/missing_revision.json
@@ -413,7 +413,7 @@
       "git",
       "commit",
       "-m",
-      "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
+      "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_REVISION]..fc4dc762688d22\nChange-Id: Iabc123\n",
       "-a"
     ],
     "cwd": "[START_DIR]/garnet",
diff --git a/recipes/fuchsia_roller.expected/peridot.json b/recipes/fuchsia_roller.expected/peridot.json
index 70c7a3b..9342863 100644
--- a/recipes/fuchsia_roller.expected/peridot.json
+++ b/recipes/fuchsia_roller.expected/peridot.json
@@ -382,7 +382,7 @@
       "git",
       "commit",
       "-m",
-      "[roll] Roll peridot [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/peridot\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
+      "[roll] Roll peridot [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/peridot\nRolled-Commits: [OLD_REVISION]..fc4dc762688d22\nChange-Id: Iabc123\n",
       "-a"
     ],
     "cwd": "[START_DIR]/topaz",
diff --git a/recipes/fuchsia_roller.expected/peridot_with_lockfile.json b/recipes/fuchsia_roller.expected/peridot_with_lockfile.json
index 63b9e2f..1253d85 100644
--- a/recipes/fuchsia_roller.expected/peridot_with_lockfile.json
+++ b/recipes/fuchsia_roller.expected/peridot_with_lockfile.json
@@ -405,7 +405,7 @@
       "git",
       "commit",
       "-m",
-      "[roll] Roll peridot [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/peridot\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
+      "[roll] Roll peridot [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/peridot\nRolled-Commits: [OLD_REVISION]..fc4dc762688d22\nChange-Id: Iabc123\n",
       "-a"
     ],
     "cwd": "[START_DIR]/topaz",
diff --git a/recipes/fuchsia_roller.expected/roll_from_non_https_remote.json b/recipes/fuchsia_roller.expected/roll_from_non_https_remote.json
index 19a6cc1..1dfbae1 100644
--- a/recipes/fuchsia_roller.expected/roll_from_non_https_remote.json
+++ b/recipes/fuchsia_roller.expected/roll_from_non_https_remote.json
@@ -382,7 +382,7 @@
       "git",
       "commit",
       "-m",
-      "[roll] Roll third_party/foo [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://host.googlesource.com/foo\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
+      "[roll] Roll third_party/foo [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://host.googlesource.com/foo\nRolled-Commits: [OLD_REVISION]..fc4dc762688d22\nChange-Id: Iabc123\n",
       "-a"
     ],
     "cwd": "[START_DIR]/garnet",
diff --git a/recipes/fuchsia_roller.expected/zircon.json b/recipes/fuchsia_roller.expected/zircon.json
index 284d518..fe18217 100644
--- a/recipes/fuchsia_roller.expected/zircon.json
+++ b/recipes/fuchsia_roller.expected/zircon.json
@@ -382,7 +382,7 @@
       "git",
       "commit",
       "-m",
-      "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
+      "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_REVISION]..fc4dc762688d22\nChange-Id: Iabc123\n",
       "-a"
     ],
     "cwd": "[START_DIR]/garnet",
diff --git a/recipes/fuchsia_roller.expected/zircon_dry_run.json b/recipes/fuchsia_roller.expected/zircon_dry_run.json
index acf4347..3b06f4d 100644
--- a/recipes/fuchsia_roller.expected/zircon_dry_run.json
+++ b/recipes/fuchsia_roller.expected/zircon_dry_run.json
@@ -382,7 +382,7 @@
       "git",
       "commit",
       "-m",
-      "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
+      "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_REVISION]..fc4dc762688d22\nChange-Id: Iabc123\n",
       "-a"
     ],
     "cwd": "[START_DIR]/garnet",
diff --git a/recipes/fuchsia_roller.expected/zircon_no_changeid.json b/recipes/fuchsia_roller.expected/zircon_no_changeid.json
index 1293613..76d9d5b 100644
--- a/recipes/fuchsia_roller.expected/zircon_no_changeid.json
+++ b/recipes/fuchsia_roller.expected/zircon_no_changeid.json
@@ -382,7 +382,7 @@
       "git",
       "commit",
       "-m",
-      "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
+      "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158 fake A msg 0\n3380b83 fake A msg 1\n363caa9 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_REVISION]..fc4dc762688d22\nChange-Id: Iabc123\n",
       "-a"
     ],
     "cwd": "[START_DIR]/garnet",
diff --git a/recipes/fuchsia_roller.expected/zircon_with_commit_links.json b/recipes/fuchsia_roller.expected/zircon_with_commit_links.json
index 0550ac8..0f68546 100644
--- a/recipes/fuchsia_roller.expected/zircon_with_commit_links.json
+++ b/recipes/fuchsia_roller.expected/zircon_with_commit_links.json
@@ -481,7 +481,7 @@
       "git",
       "commit",
       "-m",
-      "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 0\n3380b83:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 1\n363caa9:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_RE..fc4dc76\nChange-Id: Iabc123\n",
+      "[roll] Roll zircon [OLD_RE..fc4dc76 (3 commits)\n\n3e30158:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 0\n3380b83:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 1\n363caa9:https://origin-host-review.googlesource.com/c/zircon/+/12345 fake A msg 2\n\nCq-Cl-Tag: roller-builder:\nCq-Cl-Tag: roller-bid:0\nCQ-Do-Not-Cancel-Tryjobs: true\nRolled-Repo: https://fuchsia.googlesource.com/zircon\nRolled-Commits: [OLD_REVISION]..fc4dc762688d22\nChange-Id: Iabc123\n",
       "-a"
     ],
     "cwd": "[START_DIR]/garnet",
diff --git a/recipes/fuchsia_roller.py b/recipes/fuchsia_roller.py
index 4d9d538..069d51f 100644
--- a/recipes/fuchsia_roller.py
+++ b/recipes/fuchsia_roller.py
@@ -155,8 +155,11 @@
   )
   if send_comment:
     message += COMMENT_FOOTERS.format(
-        old=old_rev[:7],
-        new=new_rev[:7],
+        # For some reason gitiles occasionally considers 7-character hashes for
+        # fuchsia.git to be ambiguous, so we use longer ones here (see
+        # http://b/148289050).
+        old=old_rev[:14],
+        new=new_rev[:14],
         repo=roll_from_repo,
     )
   return message