Refactor getCode in LibGitLoader