MCPcopy Create free account
hub / github.com/github/gh-aw / stageGitAttributesIfChanged

Function stageGitAttributesIfChanged

pkg/cli/git.go:396–403  ·  view source on GitHub ↗

stageGitAttributesIfChanged stages .gitattributes if it was modified

()

Source from the content-addressed store, hash-verified

394
395// stageGitAttributesIfChanged stages .gitattributes if it was modified
396func stageGitAttributesIfChanged() error {
397 gitRoot, err := gitutil.FindGitRoot()
398 if err != nil {
399 return err
400 }
401 gitAttributesPath := filepath.Join(gitRoot, ".gitattributes")
402 return exec.Command("git", "-C", gitRoot, "add", gitAttributesPath).Run()
403}
404
405// ensureLogsGitignore ensures that .github/aw/logs/.gitignore exists to ignore log files
406func ensureLogsGitignore() error {

Callers 3

stageWorkflowChangesFunction · 0.85
addWorkflowsWithPRFunction · 0.85

Calls 2

FindGitRootFunction · 0.92
RunMethod · 0.45

Tested by 1