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
Saving an old revision of an LFS file saves only the LFS pointer #6146
Comments
Just a lark. Try upgrading git.
…On Mon, Jan 21, 2019 at 11:38 AM Markonius ***@***.***> wrote:
Current behaviour
When viewing the history of an LFS-tracked file, if I click "Save as" in
the right click menu of an old revision of the file, only the LFS pointer
exists in the saved file.
If, however, I choose "Difftool selected < - > local", the entire file is
shown in KDiff.
Expected behaviour
The entire file should be saved to disk when selecting "Save as" on an old
revision of an LFS-tracked file.
Steps to reproduce
1. Have a file in git-LFS
2. Commit some changes to it several times
3. Find the file in the file tree
4. Select "Viev history"
5. Try to save an old revision of the file
6. Observe that the file is corrupted (only the LFS pointer is saved)
7. Try to diff it
8. Observe that the entire file is visible in KDiff
Screenshots
[image: image]
<https://user-images.githubusercontent.com/19593085/51487077-b29c3580-1da2-11e9-9abe-5580c4b754c1.png>
[image: image]
<https://user-images.githubusercontent.com/19593085/51487178-ed05d280-1da2-11e9-912d-871f5373dee0.png>
[image: image]
<https://user-images.githubusercontent.com/19593085/51487244-20486180-1da3-11e9-87a3-0fbff60988c6.png>
Did this work in previous version of GitExtensions
As far as I'm aware, no.
Environment
- Git Extensions 3.00.00.4433
- Build fca7cf2
<fca7cf2>
- Git 2.19.1.windows.1
- Microsoft Windows NT 10.0.17134.0
- .NET Framework 4.7.3260.0
- DPI 96dpi (no scaling)
Diagnostics
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6146>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ADdhsbvS5ZZpU_RrgkerUrFlZ8LGOYGaks5vFez0gaJpZM4aLLEZ>
.
|
@markonius are you in a position to debug it? |
Yo, I can spare some time. Gonna try upgrading git first. I'm available on gitter currently. EDIT: Updating Git had no effect |
GE uses what Git supplies here The textual diff uses
The GUI tool uses
I use LFS quite a lot and do not believe this is a limitation. Files are set to LFS because they are binary (no diff anyway) or very big (where plain text diff is not usable). A 3rd party difftool like Beyond Compare makes more sense. I recommend registering this as a feature, to wrap the diff for LFS files, but for me personally it has low priority. |
@gerhardol Well, I'm mostly concerned with the "Save as" functionality, not the diff itself, since that is the case when I would be prepared to download a big file from the server. |
That will also require special handling, if the object is a LFS object it has to be fetched first and the LFS only runs on checking out. |
@vbjay As far as I understand, this downloads the files to the working directory. I found |
No fetch does not download to working directory. It was in response to
Where does git store objects by default? .git\objects Where does lfs store objects? Think about lfs fetch as the same as git fetch. |
Oh OK. So, in theory, running |
No. You would not copy anything. You know. smudge will do it all. We can use fetch when needing to go offline( think working on an airplane) |
Just be mindful of git-for-windows/git#1063 |
OK, sorry, but you lost me.
I don't understand this comment at all 😮 As a starting point, let's agree I want to fix the issue I originaly reported (make "Save as" work with LFS). What's your take on this? Am I missing something? |
Nope. Smudge. We would provide fetch for I want to work offline and still have access to lfs files. |
So yes. We would write the output of smudge to the path passed in to save as. |
Just to point out offline flow: You have cloned and checked out a repo. Let's say you are going to do some work on an airplane( no internet). The lfs files will need to be fetched before you can check them out. You could fetch recent or all or whatever. This would pull down the lfs files to your repo folder. You could then go offline and checkout without any issue of not having the file. Later on the lfs cache could be cleaned to clear up the local storage if desired. |
I'm poking around and gonna try to figure out how to implement this |
Current behaviour
When viewing the history of an LFS-tracked file, if I click "Save as" in the right click menu of an old revision of the file, only the LFS pointer exists in the saved file.
If, however, I choose "Difftool selected < - > local", the entire file is shown in KDiff.
Expected behaviour
The entire file should be saved to disk when selecting "Save as" on an old revision of an LFS-tracked file.
Steps to reproduce
Screenshots
Did this work in previous version of GitExtensions
As far as I'm aware, no.
Environment
Diagnostics
The text was updated successfully, but these errors were encountered: