Merging Make Glide installable
diff --git a/.travis.yml b/.travis.yml
index 81104d3..e2a6a62 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,4 +20,9 @@
   - GO15VENDOREXPERIMENT=1 make test
 
 notifications:
-  irc: "irc.freenode.net#masterminds"
+  webhooks:
+    urls:
+      - https://webhooks.gitter.im/e/67e4b42cbf763625d0b4
+    on_success: change
+    on_failure: always
+    on_start: never
diff --git a/README.md b/README.md
index ba59ded..532ed3e 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@
 installed by a tool (e.g. glide), similar to `go get` or they can be vendored and
 distributed with the package.
 
-[![Build Status](https://travis-ci.org/Masterminds/glide.svg)](https://travis-ci.org/Masterminds/glide) [![Go Report Card](http://goreportcard.com/badge/Masterminds/glide)](http://goreportcard.com/report/Masterminds/glide) [![GoDoc](https://godoc.org/github.com/Masterminds/glide?status.svg)](https://godoc.org/github.com/Masterminds/glide) [![Documentation Status](https://readthedocs.org/projects/glide/badge/?version=latest)](http://glide.readthedocs.org/en/latest/?badge=latest) [![Join us on #masterminds on Freenode](https://www.irccloud.com/invite-svg?channel=%23masterminds&hostname=irc.freenode.net&port=6697&ssl=1)](https://www.irccloud.com/invite?channel=%23masterminds&hostname=irc.freenode.net&port=6697&ssl=1)
+[![Build Status](https://travis-ci.org/Masterminds/glide.svg)](https://travis-ci.org/Masterminds/glide) [![Go Report Card](http://goreportcard.com/badge/Masterminds/glide)](http://goreportcard.com/report/Masterminds/glide) [![GoDoc](https://godoc.org/github.com/Masterminds/glide?status.svg)](https://godoc.org/github.com/Masterminds/glide) [![Documentation Status](https://readthedocs.org/projects/glide/badge/?version=latest)](http://glide.readthedocs.org/en/latest/?badge=latest) [![Join the chat at https://gitter.im/Masterminds/glide](https://badges.gitter.im/Masterminds/glide.svg)](https://gitter.im/Masterminds/glide?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 
 ### Features
 
diff --git a/repo/installer.go b/repo/installer.go
index f14b595..13d4696 100644
--- a/repo/installer.go
+++ b/repo/installer.go
@@ -6,6 +6,7 @@
 	"path/filepath"
 	"strings"
 	"sync"
+	"time"
 
 	"github.com/Masterminds/glide/cfg"
 	"github.com/Masterminds/glide/dependency"
@@ -14,6 +15,7 @@
 	gpath "github.com/Masterminds/glide/path"
 	"github.com/Masterminds/glide/util"
 	"github.com/Masterminds/semver"
+	"github.com/Masterminds/vcs"
 	"github.com/codegangsta/cli"
 )
 
@@ -366,7 +368,7 @@
 	d := m.Config.Imports.Get(root)
 	// If the dependency is nil it means the Config doesn't yet know about it.
 	if d == nil {
-		d = m.Use.Get(root)
+		d, _ = m.Use.Get(root)
 		// We don't know about this dependency so we create a basic instance.
 		if d == nil {
 			d = &cfg.Dependency{Name: root}
@@ -433,7 +435,7 @@
 	d := m.Config.Imports.Get(root)
 	// If the dependency is nil it means the Config doesn't yet know about it.
 	if d == nil {
-		d = m.Use.Get(root)
+		d, _ = m.Use.Get(root)
 		// We don't know about this dependency so we create a basic instance.
 		if d == nil {
 			d = &cfg.Dependency{Name: root}
@@ -490,9 +492,9 @@
 			for _, dep := range deps {
 
 				// The fist one wins. Would something smater than this be better?
-				exists := d.Use.Get(dep.Name)
+				exists, _ := d.Use.Get(dep.Name)
 				if exists == nil && (dep.Reference != "" || dep.Repository != "") {
-					d.Use.Add(dep.Name, dep)
+					d.Use.Add(dep.Name, dep, root)
 				}
 			}
 		} else if err != nil {
@@ -519,7 +521,7 @@
 
 	v := d.Config.Imports.Get(root)
 
-	dep := d.Use.Get(root)
+	dep, req := d.Use.Get(root)
 	if dep != nil && v != nil {
 		if v.Reference == "" && dep.Reference != "" {
 			v.Reference = dep.Reference
@@ -528,7 +530,7 @@
 			dep = v
 		} else if v.Reference != "" && dep.Reference != "" && v.Reference != dep.Reference {
 			dest := filepath.Join(d.Destination, filepath.FromSlash(v.Name))
-			dep = determineDependency(v, dep, dest)
+			dep = determineDependency(v, dep, dest, req)
 		} else {
 			dep = v
 		}
@@ -560,7 +562,7 @@
 	return
 }
 
-func determineDependency(v, dep *cfg.Dependency, dest string) *cfg.Dependency {
+func determineDependency(v, dep *cfg.Dependency, dest, req string) *cfg.Dependency {
 	repo, err := v.GetRepo(dest)
 	if err != nil {
 		singleWarn("Unable to access repo for %s\n", v.Name)
@@ -573,7 +575,11 @@
 
 	// Both are references and they are different ones.
 	if vIsRef && depIsRef {
-		singleWarn("Conflict: %s ref is %s, but also asked for %s\n", v.Name, v.Reference, dep.Reference)
+		singleWarn("Conflict: %s rev is currently %s, but %s wants %s\n", v.Name, v.Reference, req, dep.Reference)
+
+		displayCommitInfo(repo, v)
+		displayCommitInfo(repo, dep)
+
 		singleInfo("Keeping %s %s", v.Name, v.Reference)
 		return v
 	} else if vIsRef {
@@ -589,6 +595,7 @@
 		if err != nil {
 			// The existing version is not a semantic version.
 			singleWarn("Conflict: %s version is %s, but also asked for %s\n", v.Name, v.Reference, dep.Reference)
+			displayCommitInfo(repo, v)
 			singleInfo("Keeping %s %s", v.Name, v.Reference)
 			return v
 		}
@@ -612,6 +619,7 @@
 		ver, err := semver.NewVersion(dep.Reference)
 		if err != nil {
 			singleWarn("Conflict: %s version is %s, but also asked for %s\n", v.Name, v.Reference, dep.Reference)
+			displayCommitInfo(repo, dep)
 			singleInfo("Keeping %s %s", v.Name, v.Reference)
 			return v
 		}
@@ -688,23 +696,48 @@
 
 type importCache struct {
 	cache map[string]*cfg.Dependency
+	from  map[string]string
 }
 
 func newImportCache() *importCache {
 	return &importCache{
 		cache: make(map[string]*cfg.Dependency),
+		from:  make(map[string]string),
 	}
 }
 
-func (i *importCache) Get(name string) *cfg.Dependency {
+func (i *importCache) Get(name string) (*cfg.Dependency, string) {
 	d, f := i.cache[name]
 	if f {
-		return d
+		return d, i.from[name]
 	}
 
-	return nil
+	return nil, ""
 }
 
-func (i *importCache) Add(name string, dep *cfg.Dependency) {
+func (i *importCache) Add(name string, dep *cfg.Dependency, root string) {
 	i.cache[name] = dep
+	i.from[name] = root
+}
+
+var displayCommitInfoPrefix = msg.Default.Color(msg.Green, "[INFO] ")
+var displayCommitInfoTemplate = "%s reference %s:\n" +
+	displayCommitInfoPrefix + "- author: %s\n" +
+	displayCommitInfoPrefix + "- commit date: %s\n" +
+	displayCommitInfoPrefix + "- subject (first line): %s\n"
+
+func displayCommitInfo(repo vcs.Repo, dep *cfg.Dependency) {
+	c, err := repo.CommitInfo(dep.Reference)
+	if err == nil {
+		singleInfo(displayCommitInfoTemplate, dep.Name, dep.Reference, c.Author, c.Date.Format(time.RFC1123Z), commitSubjectFirstLine(c.Message))
+	}
+}
+
+func commitSubjectFirstLine(sub string) string {
+	lines := strings.Split(sub, "\n")
+	if len(lines) <= 1 {
+		return sub
+	}
+
+	return lines[0]
 }