Skip to content

Conversation

@technoweenie
Copy link
Contributor

Instead of requiring git lfs update to be run inside a git working directory, this relies on lfs.LocalGitDir to install the hooks in the correct place.

/cc @ttaylorr since you touched hook code recently. Though I'm pretty sure I'm the one that added the invalid repo error.

@technoweenie
Copy link
Contributor Author

Had to add GIT_LFS_TEST_DIR to travis. Some of the tests rely on commands being run outside of git repositories. By default, tests run inside the git-lfs repository, causing those to fail. Setting GIT_LFS_TEST_DIR outside of the git-lfs directory fixes it.

Ideally, the tests would warn and probably skip tests that should fail when this happens.

@technoweenie
Copy link
Contributor Author

Confirmed this improves the process for migrating a repository to use LFS with BFG:

$ git clone --mirror https://github.com/mventurelli/relichunterszero
Cloning into bare repository 'relichunterszero.git'...

$ cd relichunterszero.git 
$ java -jar /path/to/bfg.jar --no-blob-protection --convert-to-git-lfs "*.{wav,mp3}"
$ git lfs init # sets up pre-push hook for the migrated repo

After that, set up the remote and push away!

@technoweenie technoweenie mentioned this pull request Sep 17, 2015
6 tasks
technoweenie added a commit that referenced this pull request Sep 23, 2015
teach 'update' cmd how to install hooks in bare repos
@technoweenie technoweenie merged commit 59fad47 into master Sep 23, 2015
@technoweenie technoweenie deleted the update-in-bare-repo branch September 23, 2015 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants