commit | 2fb12a0272a7339b17557cf34032265a6c715ef9 | [log] [tgz] |
---|---|---|
author | Khai Do <zaro0508@gmail.com> | Thu Aug 11 12:05:15 2016 -0700 |
committer | David Pursehouse <dpursehouse@collab.net> | Fri Aug 12 02:18:08 2016 +0000 |
tree | e51bfb8e1990f09bc9a278616f0aaeb2e1506e87 | |
parent | 9d8447b470b6a22cf6ffd2030e15285740c50456 [diff] |
Make download patchset filename match link on UI The patchset file name link in the download dialog box has an abbreviated git sha of 7 characters while the actual downloaded file contains 8 characters. Set the downloaded filename to 7 chars to match the link on the UI. Change-Id: I97bc4a0c4ff4f67b3ad2667fe1176dbae2c493c8
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetPatch.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetPatch.java index 3c4d79d..a13e7be 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetPatch.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetPatch.java
@@ -167,7 +167,7 @@ private static String fileName(RevWalk rw, RevCommit commit) throws IOException { - AbbreviatedObjectId id = rw.getObjectReader().abbreviate(commit, 8); + AbbreviatedObjectId id = rw.getObjectReader().abbreviate(commit, 7); return id.name() + ".diff"; } }