Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStagedContent ¶
GetStagedContent 는 git show 를 사용하여 파일의 스테이지된(인덱스) 내용을 반환합니다. 동일 경로는 캐싱하여 중복 git show 호출을 방지합니다.
func HasExtension ¶
HasExtension 는 path 가 주어진 파일 확장자 목록 중 하나를 가지는지 확인합니다. "dockerfile" 은 특수 식별자로, Dockerfile, Dockerfile.*, *.dockerfile 파일명 패턴에 매칭됩니다.
func ResetStagedContentCache ¶ added in v1.2.0
func ResetStagedContentCache()
ResetStagedContentCache: 콘텐츠 캐시를 초기화합니다 (테스트용).
Types ¶
type FileDiff ¶
type FileDiff struct {
Path string
AddedLines map[int]bool // 새 파일에서 추가된 줄 번호 집합 (1 기반)
IsDeleted bool
IsSubmodule bool // git mode 160000 (서브모듈)
IsSymlink bool // git mode 120000 (심볼릭 링크)
}
FileDiff 는 스테이지된 diff 에서 파일 정보를 담습니다.
func GetStagedDiff ¶
GetStagedDiff 는 git diff --staged 를 실행하고 파싱된 파일 diff 목록을 반환합니다.
Click to show internal directories.
Click to hide internal directories.