Skip to content
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

Missing GIT LFS Documentation #4327

Closed
1 task done
jasonnicholson opened this issue Mar 7, 2023 · 9 comments · Fixed by git-for-windows/build-extra#491
Closed
1 task done

Missing GIT LFS Documentation #4327

jasonnicholson opened this issue Mar 7, 2023 · 9 comments · Fixed by git-for-windows/build-extra#491
Assignees
Labels
Help Wanted help is requested from collaborators, please! Potential Project This issue can be used as a development Project for those loooking for a nice challenge sdk-packages
Milestone

Comments

@jasonnicholson
Copy link

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.39.2.windows.1
cpu: x86_64
built from commit: a82fa99b36ddfd643e61ed45e52abe314687df67
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.19042.2604]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: VisualStudioCode
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Disabled
Enable FSMonitor: Enabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

No

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Bash
CMD

git lfs --help
  • What did you expect to occur after running these commands?

I expected an HTML page to open up related to git lfs.

  • What actually happened instead?
    I received the following error:

fatal: 'C:/Program Files/Git/mingw64/share/doc/git-doc/git-lfs.html': documentation file not found.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

repository not needed

The git-lfs documentation is included with git lfs.
https://github.com/git-lfs/git-lfs/releases/download/v3.3.0/git-lfs-windows-amd64-v3.3.0.zip
image

@dscho
Copy link
Member

dscho commented Mar 7, 2023

Wow, you're right. In all the years that Git for Windows ships with Git LFS, you're the first one to point that out.

To fix that, I suggest to

  1. install Git for Windows' SDK,
  2. sdk cd mingw-w64-git-lfs,
  3. edit PKGBUILD to extend the package function
  4. build a new package via sdk build and test by pacman -U <just-built-package> and then git lfs --help
  5. If necessary, make a duplicate of git-lfs.1.html that misses the .1 infix
  6. commit, push and open a PR?

@dscho dscho added sdk-packages Potential Project This issue can be used as a development Project for those loooking for a nice challenge Help Wanted help is requested from collaborators, please! labels Mar 7, 2023
@rimrul
Copy link
Member

rimrul commented Mar 7, 2023

  1. If necessary, make a duplicate of git-lfs.1.html that misses the .1 infix

From a quick look it doesn't seem like git-lfs --help or any other dashed invocation tries to open these files, so we probably don't need a copy with the .1. Something like this should do the job:

for f in $srcdir/$folder/man/html/git-lfs*.1.html; do
    install -m755 $f $pkgdir/$MINGW_PREFIX/share/doc/git-core/${${f##*/}%.1.html}.html
done

@dscho
Copy link
Member

dscho commented Mar 7, 2023

  1. If necessary, make a duplicate of git-lfs.1.html that misses the .1 infix

From a quick look it doesn't seem like git-lfs --help or any other dashed invocation tries to open these files, so we probably don't need a copy with the .1.

I'm slightly concerned that there are links between those pages (which would rely on the .1 infix).

@rimrul
Copy link
Member

rimrul commented Mar 8, 2023

I'm slightly concerned that there are links between those pages

From what I've seen there currently aren't any, but we probably shouldn't rely on that staying that way.

@dscho
Copy link
Member

dscho commented Mar 24, 2023

@jasonnicholson how about giving it a try?

@jasonnicholson
Copy link
Author

Sure. I will give it a try.

@jasonnicholson
Copy link
Author

I getting lost here. I looked at the PKGBUILD file. How do I debug the PKGBUILD file?

I tried @rimrul's code. However, it produces an error, "bad substitution" as shown below.

$ sdk build
==>  MINGW_ARCH: mingw64
  -> Building mingw64...
==> Making package: mingw-w64-git-lfs 3.3.0-1 (Sun Mar 26 19:59:23 2023)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found git-lfs-windows-amd64-v3.3.0.zip
  -> Found v3.3.0.zip
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
  -> Extracting git-lfs-windows-amd64-v3.3.0.zip with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting package()...
/usr/src/build-extra/mingw-w64-git-lfs/PKGBUILD: line 52: $pkgdir/$MINGW_PREFIX/share/doc/git-core/${${f##*/}%.1.html}.html: bad substitution

I tried to hack something together but it didn't work. I get an error as shown below.

package() {
  install -d -m755 $pkgdir/$MINGW_PREFIX/bin
  install -m755 $srcdir/$folder/git-lfs$exesuffix.exe $pkgdir/$MINGW_PREFIX/bin/git-lfs.exe
  install -d -m755 $pkgdir/$MINGW_PREFIX/share/doc/git-lfs
  install -m755 $srcdir/$folder/README.md $pkgdir/$MINGW_PREFIX/share/doc/git-lfs/README.md
  for f in $srcdir/$folder/man/html/git-lfs*.1.html; do
    ff=${f##*/}
    install -m755 $f $pkgdir/$MINGW_PREFIX/share/doc/git-core/${ff%.1.html}.html
  done
}
$ sdk build
==>  MINGW_ARCH: mingw64
  -> Building mingw64...
==> Making package: mingw-w64-git-lfs 3.3.0-1 (Sun Mar 26 20:02:21 2023)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found git-lfs-windows-amd64-v3.3.0.zip
  -> Found v3.3.0.zip
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
  -> Extracting git-lfs-windows-amd64-v3.3.0.zip with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting package()...
install: cannot create regular file '/usr/src/build-extra/mingw-w64-git-lfs/pkg/mingw-w64-x86_64-git-lfs//mingw64/share/doc/git-core/git-lfs-checkout.html': No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...

@dscho
Copy link
Member

dscho commented Mar 27, 2023

@jasonnicholson could you commit what you have, push it, and open a draft PR? That will make it easier to see what needs to be changed.

@jasonnicholson
Copy link
Author

I will commit my changes when I get home this evening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted help is requested from collaborators, please! Potential Project This issue can be used as a development Project for those loooking for a nice challenge sdk-packages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants