code: func GenerateLabelsFromSourceInfo(labels map[string]string, info *git.SourceInfo, namespace string) map[string]string {
  	if info == nil {
  		glog.V(3).Info("Unable to fetch source information, the output image labels will not be set")
  		return labels
  	}
  
  	if len(info.AuthorName) > 0 {
  		author := fmt.Sprintf("%s <%s>", info.AuthorName, info.AuthorEmail)
  		addBuildLabel(labels, "commit.author", author, namespace)
  	}
  
  	addBuildLabel(labels, "commit.date", info.Date, namespace)
  	addBuildLabel(labels, "commit.id", info.CommitID, namespace)
  	addBuildLabel(labels, "commit.ref", info.Ref, namespace)
  	addBuildLabel(labels, "commit.message", info.Message, namespace)
  	addBuildLabel(labels, "source-location", info.Location, namespace)
  	addBuildLabel(labels, "source-context-dir", info.ContextDir, namespace)
  	return labels
  }
docs: // GenerateLabelsFromSourceInfo generate the labels based on the source repository
  // informations.