Skip to content

Commit

Permalink
fix(cli): Fix Git LFS autocommit hook not committing new pointer files (
Browse files Browse the repository at this point in the history
  • Loading branch information
Panaetius committed Jun 8, 2021
1 parent e28e308 commit dca5aa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions renku/data/pre-commit.sh
Expand Up @@ -99,6 +99,7 @@ if [ ${#ADDED_FILES[@]} -ne 0 ]; then
files=${UNTRACKED_PATHS[*]}
git lfs track -- "$files"
git add .gitattributes
git add -- "$files"
IFS=$saveIFS
else
echo 'Large files:'
Expand Down
2 changes: 2 additions & 0 deletions tests/cli/test_datasets.py
Expand Up @@ -1413,6 +1413,7 @@ def test_lfs_hook_autocommit(runner, client, subdirectory, large_file):
assert "You are trying to commit large files to Git instead of Git-LFS" in result[2]
assert "Adding files to LFS" in result[2]
assert 'Tracking "large-file"' in result[2]
assert len(client.dirty_paths) == 0 # NOTE: make sure repo is clean


def test_lfs_hook_autocommit_env(runner, client, subdirectory, large_file):
Expand All @@ -1432,6 +1433,7 @@ def test_lfs_hook_autocommit_env(runner, client, subdirectory, large_file):
assert "You are trying to commit large files to Git instead of Git-LFS" in result[2]
assert "Adding files to LFS" in result[2]
assert 'Tracking "large-file"' in result[2]
assert len(client.dirty_paths) == 0 # NOTE: make sure repo is clean


def test_lfs_hook_can_be_avoided(runner, project, subdirectory, large_file):
Expand Down

0 comments on commit dca5aa4

Please sign in to comment.