mirror of
https://github.com/vbatts/git-validation.git
synced 2025-07-26 17:00:29 +00:00
dangling-whitespace: rule for trailing spaces
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
1a447a0dfc
commit
8193a24bc4
3 changed files with 63 additions and 0 deletions
|
@ -57,6 +57,19 @@ var FieldNames = map[string]string{
|
|||
"%G?": "verification_flag",
|
||||
}
|
||||
|
||||
// Show returns the diff of a commit.
|
||||
//
|
||||
// NOTE: This could be expensive for very large commits.
|
||||
func Show(commit string) ([]byte, error) {
|
||||
cmd := exec.Command("git", "show", commit)
|
||||
cmd.Stderr = os.Stderr
|
||||
out, err := cmd.Output()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// CommitEntry represents a single commit's information from `git`.
|
||||
// See also FieldNames
|
||||
type CommitEntry map[string]string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue