[ARVADOS-DEV] updated: 5299abea2be4525f91fb2947f2f7eef79ce0dc63
Git user
git at public.curoverse.com
Sun Sep 24 14:43:23 EDT 2017
Summary of changes:
arvados-version-server/arvados-version-server.go | 2 +-
arvados-version-server/arvados-version-server_test.go | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
via 5299abea2be4525f91fb2947f2f7eef79ce0dc63 (commit)
from 4a352f600f940fdbc5df98ada981cca717b0e2bc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 5299abea2be4525f91fb2947f2f7eef79ce0dc63
Author: Ward Vandewege <ward at curoverse.com>
Date: Sun Sep 24 14:39:41 2017 -0400
Newer git version (2.11.0) default to 9 characters for the abbreviated
git hash. Explicitly select a minimum of 9 in the code, and adjust tests
to have 9 characters for the return value that is checked.
No issue #
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege at veritasgenetics.com>
diff --git a/arvados-version-server/arvados-version-server.go b/arvados-version-server/arvados-version-server.go
index 2f40df0..f377979 100644
--- a/arvados-version-server/arvados-version-server.go
+++ b/arvados-version-server/arvados-version-server.go
@@ -423,7 +423,7 @@ func versionFromGit(prefix string) (string, error) {
if err != nil {
return "", err
}
- cmdArgs := []string{"log", "-n1", "--first-parent", "--max-count=1", "--format=format:%h", "."}
+ cmdArgs := []string{"log", "-n1", "--first-parent", "--max-count=1", "--format=format:%h", "--abbrev=9", "."}
gitHash, err := exec.Command(theConfig.GitExecutablePath, cmdArgs...).Output()
if err != nil {
logError([]string{"There was an error running the command ", theConfig.GitExecutablePath, strings.Join(cmdArgs, " "), err.Error()})
diff --git a/arvados-version-server/arvados-version-server_test.go b/arvados-version-server/arvados-version-server_test.go
index 347ab18..874c4b3 100644
--- a/arvados-version-server/arvados-version-server_test.go
+++ b/arvados-version-server/arvados-version-server_test.go
@@ -171,7 +171,7 @@ func (s *ServerRequiredSuite) TestResults(c *C) {
c.Check(err, Equals, nil)
c.Check(resp.StatusCode, Equals, 200)
body, err := ioutil.ReadAll(resp.Body)
- c.Check(string(body), Matches, ".*\"arvados-src\":\"0.1.20130104011935.155848c\".*")
+ c.Check(string(body), Matches, ".*\"arvados-src\":\"0.1.20130104011935.155848c15\".*")
}
// Check the arvados-src version string for a more recent commit
@@ -184,7 +184,7 @@ func (s *ServerRequiredSuite) TestResults(c *C) {
c.Check(err, Equals, nil)
c.Check(resp.StatusCode, Equals, 200)
body, err := ioutil.ReadAll(resp.Body)
- c.Check(string(body), Matches, ".*\"arvados-src\":\"0.1.20161208152419.9c1a287\".*")
+ c.Check(string(body), Matches, ".*\"arvados-src\":\"0.1.20161208152419.9c1a28719\".*")
}
// Check the arvados-src version string for a weirdly truncated commit
@@ -197,7 +197,7 @@ func (s *ServerRequiredSuite) TestResults(c *C) {
c.Check(err, Equals, nil)
c.Check(resp.StatusCode, Equals, 200)
body, err := ioutil.ReadAll(resp.Body)
- c.Check(string(body), Matches, ".*\"arvados-src\":\"0.1.20161208152419.9c1a287\".*")
+ c.Check(string(body), Matches, ".*\"arvados-src\":\"0.1.20161208152419.9c1a28719\".*")
}
// Check an invalid request hash
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list