git

package
v1.9.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2022 License: MPL-2.0 Imports: 12 Imported by: 0

README

GitLogs

git log --all --date=short --pretty="format:[%h] %aN %ad %s" --numstat --reverse --summary

Delete

git log --pretty=%H --name-status
git log --pretty=format:"[%h] %aN %ad %s" --reverse --summary --numstat --encoding=UTF-8 --no-renames

Related Projects: https://github.com/bast/gitink

$ cat example.txt

                     [feature]
                      |
                      v
               x1-----x2
              /
c1----c2----m1----c3----c4
  \        /            ^
   b1----b2----b3       |
   ^           ^       [master,HEAD]
   |           |
  [_branch]   [branch]

$ gitink --time-direction=90 --in-file=example.txt | display

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GIT_RELATED_MAX_SIZE = 10
View Source
var MIN_DATASET = 2

Functions

func BuildChangeMap

func BuildChangeMap(commits []CommitMessage) map[string]map[string]int

func BuildCommitMessageMap

func BuildCommitMessageMap(messages []CommitMessage, infos map[string]ProjectInfo) map[string]ProjectInfo

func GetRelatedFiles

func GetRelatedFiles(commitMessages []CommitMessage, relatedConfig []byte) [][]string

func ParseLog

func ParseLog(text string)

func ShowChangeLogSummary

func ShowChangeLogSummary(commits []CommitMessage, output io.Writer)

high fix high features

func UpdateMessageForChange

func UpdateMessageForChange(changedFile string) (string, string, string)

Types

type CodeAgeDisplay

type CodeAgeDisplay struct {
	EntityName string
	Month      string
}

type CommitMessage

type CommitMessage struct {
	Rev     string
	Author  string
	Date    string
	Message string
	Changes []FileChange
}

func BuildMessageByInput

func BuildMessageByInput(inputStr string) []CommitMessage

type FileChange

type FileChange struct {
	Added   int
	Deleted int
	File    string
	Mode    string
}

type GitSummary

type GitSummary struct {
	Commits  int
	Entities int
	Changes  int
	Authors  int
}

func BasicSummary

func BasicSummary(commitMessages []CommitMessage) *GitSummary

type ProjectInfo

type ProjectInfo struct {
	EntityName string
	Authors    map[string]string
	Revs       map[string]string
	Age        time.Time
}

func CalculateCodeAge

func CalculateCodeAge(messages []CommitMessage) []ProjectInfo

type TeamSummary

type TeamSummary struct {
	EntityName  string
	AuthorCount int
	RevsCount   int
}

func GetTeamSummary

func GetTeamSummary(messages []CommitMessage) []TeamSummary

type TopAuthor

type TopAuthor struct {
	Name        string
	CommitCount int
	LineCount   int
}

func GetTopAuthors

func GetTopAuthors(commitMessages []CommitMessage) []TopAuthor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL