InfoGrab DocsInfoGrab Docs

Git LFS 개발 가이드라인

대용량 바이너리 파일 처리를 위한 Git LFS(Large File Storage)의 아키텍처, 코드 흐름 및 컨트롤러·서비스 구성 요소를 설명합니다.

대용량 바이너리 파일을 처리하기 위해 Git Large File Storage(LFS)는 여러 구성 요소가 함께 작동합니다. 이 가이드라인은 GitLab LFS 코드베이스를 작업할 때의 아키텍처와 코드 흐름을 설명합니다. 사용자 문서는 Git Large File Storage 를 참조하세요. 다음은 Git LFS 사용 시 Git push 동작을 설명하는 상위 수준 다이어그램입니다: %%{init: { "fontFamily": "GitLab Sans" }}%% flowchart LR accTitle: Git pushes with Git LFS accDescr: Explains how the LFS hook routes new files depending on type A[Git push] -->B[LFS hook] B -->C[Pointers] B -->D[Binary files] C -->E[Repository] D -->F[LFS server] 다음 다이어그램은 Git LFS 사용 시 Git pull 동작을 상위 수준에서 설명합니다: %%{init: { "fontFamily": "GitLab Sans" }}%% flowchart LR accTitle: Git pull using Git LFS accDescr: Explains how the LFS hook pulls LFS assets from the LFS server, and everything else from the Git repository A[User] -->|initiates git pull| B[Repository] B -->|Pull data and LFS transfers| C[LFS hook] C -->|LFS pointers| D[LFS server] D -->|Binary files| C C -->|Pull data and binary files| A 컨트롤러 및 서비스 # Repositories::GitHttpClientController # 여기에 정의된 인증 메서드는 다른 모든 LFS 컨트롤러가 상속합니다. Repositories::LfsApiController # #batch # 인증이 완료되면 batch 액션은 다운로드 및 업로드(pull, push, clone 등) 시 Git LFS 클라이언트가 처음으로 호출하는 액션입니다. Repositories::LfsStorageController # #upload_authorize # Workhorse에 페이로드를 제공하며, Workhorse가 파일을 저장할 경로를 포함합니다. 원격 오브젝트 스토리지일 수 있습니다. #upload_finalize # Workhorse가 이미 업로드한 파일에 대한 정보를 담은 Workhorse 요청을 처리합니다( 이 미들웨어 참조). 이를 통해 gitlab 은 다음 중 하나를 수행합니다: LfsObject 생성. LfsObjectsProject 를 사용하여 기존 LfsObject 를 프로젝트에 연결. LfsObject 및 LfsObjectsProject # 파일 oid (파일의 S