lakeFS
lakeFS copied to clipboard
[Bug]: `lakectl local commit` commits staged changes outside of its directory
What happened?
What actually happened, including error codes if applies.
Steps to Reproduce:
-
Ensure lakefs://repo/main is dirty but has no "directory" path
xyzzy
. -
lakectl local init lakefs://repo/main/xyzzy
-
touch x
-
lakectl local commit --message 'add xyzzy for lulz'
-
lakectl diff lakefs://repo/main{~,}
:Left ref: lakefs://ariels-repo/main~ Right ref: lakefs://ariels-repo/main + added .hidden-foo + added foofoo + added xyzzy/x
These 2 files were added by lakectl local
because I added them elsewhere.
Expected behavior
lakectl commit
should fail with an error about the branch being dirty, or lakectl should be more like Git LFS and not hide changes from me.
lakeFS version
No response
How lakeFS is installed
No response
Affected clients
No response
Relevant log output
No response
Contact details
No response
Requires @treeverse/product specification
Expected behavior
- Fail the commit
- Print an error message:
error: The branch you are trying to commit to contains uncommitted changes outside the lakeFS path your local directory '<DIR_NAME>' is synced with.
To proceed, use the --force option.
- add a --force -f flag lakectl local commit
FYI @N-o-Z
@eladlachmi @arielshaqed @talSofer making sure we understand the implications of this since it is a breaking change.