-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git hook post-checkout does not work as expected #3241
Labels
Comments
Yep, was able to reproduce. It can be skipped to the step 4 directly to reproduce this. |
efiop
added
p0-critical
Critical issue. Needs to be fixed ASAP.
triage
Needs to be triaged
labels
Jan 27, 2020
@shcheklein Thanks for approval. |
For the record, it is caused by my recent change to post-checkout hook, which accounted for branches but didn't account for tags properly 🙁 I will look into it soon. Thanks for the feedback! |
efiop
added a commit
to efiop/dvc
that referenced
this issue
Jan 30, 2020
We should skip running post-checkout hook on rebases and merges to not accidentally break them in the middle of the process. Git doesn't provide any native mechanisms for hooks to know whether or not this is a rebase/merge that we are going through, but we can use `.git/rebase-merge` existance as a marker. Previous approach has only accounted for branches and was causing issues when checking-out tags. Fixes iterative#3241
efiop
added a commit
to efiop/dvc
that referenced
this issue
Jan 30, 2020
We should skip running post-checkout hook on rebases and merges to not accidentally break them in the middle of the process. Git doesn't provide any native mechanisms for hooks to know whether or not this is a rebase/merge that we are going through, but we can use `.git/rebase-merge` existance as a marker. Previous approach has only accounted for branches and was causing issues when checking-out tags. Fixes iterative#3241
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Hi,
The best procedure to reproduce the bug is following step 4 of basic scenarios, versioning:
https://katacoda.com/dvc/courses/basics/versioning
It is expected that git checkout automatically triggers dvc checkout so the file.txt is restored to proper version which was committed, but it does not and
cat file.txt
givestest 3
after every checkout.dvc install
has successfully installed the hooks, I checked, but I do not know if the tutorial is wrong or the hook is not working properly.The text was updated successfully, but these errors were encountered: