Hi,
On Fri, 4 Oct 2019, Gregory Shields wrote:
> I'd be happy to participate in updating the documentation, but can you be
> more explicit about what you're saying? I don't always understand things as
> well as I probably should, and I don't want to do anything stupid.
>
> Here's what I understand from what you said:
>
> 1. There's a source file, "git-wrapper.c", which can be used to find out
> what the command-line options are for "git-cmd.exe".
> 2. There's a Help file, "git.txt", which I believe you're saying would
> be a good place to add documentation on "git-cmd.exe" command-line options.
Not quite.
> Or maybe you're just saying to use that file as a guide for styling a new
> file? This same text resides on my machine as
> "file:///C:/Git/mingw64/share/doc/git-doc/git.html" and can be viewed in my
> browser by typing the command "git help git" from Git Bash.
Yes.
> Since you mentioned starting a help page on `git-cmd`, it seems like you
> may be suggesting that I create a new text file named "git-cmd.txt".
Yes.
> When you say that I should copy-edit "git.txt" next to "git-wrapper.c", I'm
> not quite sure what you mean by "next to". I'm just trying to grasp exactly
> what it is I should do.
The `git-wrapper.c` file is not tracked in
https://github.com/git-for-windows/git, but in
https://github.com/git-for-windows/MINGW-packages, in the subdirectory
`mingw64-w64-git/`. That's where that `git-cmd.txt` should live, too.
And the `mingw-w64-git.mak` file that also lives there may need to be
adjusted to render the HTML for that file. Or maybe it should be copied
to `Documentation/` in the `build` step in `PKGBUILD` before running
`make -C Documentation git-cmd.html` or some such.
> Finally, when you ask me to provide you with a "git-cmd.exe" based on
> "git.txt", can you be more explicit about what you are suggesting?
That was a late-night mess up. I meant `git-cmd.txt`, but my fingers are
so well trained to write `git-cmd.exe` (and my eyes were too tired to
spot it before sending) that it came out completely confusing. My
apologies.
> I'm not trying to be pedantic, just attempting to clarify. Also, I do
> appreciate you offering to take care of the integration, but I wonder
> whether you would be willing to give me a list of steps so that I could
> perform that task myself. If that's more hand-holding than you're up for, I
> totally understand, but I just thought it might be a good way for me to
> learn how to do it so that I could be more involved in the future.
Oh, I am glad for every bit of help you can provide!
To build the thing, it might be best to get the Git for Windows SDK from
https://gitforwindows.org/#download-sdk and install it (beware, this
will take a while). Then you can build the package via `sdk build
mingw-w64-git`.
Once you have an initial build of the package (to prove that it works,
more than anything else), you can `sdk cd mingw-w64-git && cd src/git`
to start playing.
I'd first try to just copy-edit `Documentation/git.txt` and then build
the HTML with `make -C Documentation git-cmd.html`, then looking at the
output using `(cd Documentation && start git-cmd.html)`.
Once you are satisfied with the output, it is time to copy that file
into `/usr/src/MINGW-packages/mingw-w64-git/` and then edit the
`PKGBUILD` file in the same directory: it will need to be added to the
`sources` explicitly, and I think the best place to insert this `cp
../git-cmd.txt Documentation/ && make -C Documentation git-cmd.html`
would be the end of the `build` function (I _think_, use your
judgement).
Then you can see whether a `sdk build mingw-w64-git` produces an
appropripate `*-git-doc-html*.pkg.tar.xz` file (i.e. if it contains the
`git-cmd.html` file). It may not, in which case one of the `package_*()`
functions in the `PKGBUILD` file will need to be enhanced to copy the
file into the correct location within the `$pkgdir/` tree (I type this
from memory, so the exact variable name might be different, again, use
your judgement from reading the surrounding code).
Thanks,
Johannes
>
> Thanks again,
> Gregory Shields
>
> On Friday, October 4, 2019 at 5:08:38 AM UTC-5, Johannes Schindelin wrote:
> >
> > Hi Gregory,
> >
> > On Thu, 3 Oct 2019, Gregory Shields wrote:
> >
> > > I've really tried, but cannot seem to find the documentation for
> > > git-cmd.exe. In particular, I'm interested in the command line switches.
> > > Could someone point me to that?
> >
> > Unfortunately, there isn't any, at the moment. The best thing for now is
> > the source code:
> >
> >
https://github.com/git-for-windows/MINGW-packages/blob/737f0ad83b16ee1e9771559bdf8a06ebf2493014/mingw-w64-git/git-wrapper.c#L510-L533
> >
> > You might be interested, though, in starting a help page on `git-cmd`.
> > The best idea would be to copy-edit e.g.
> >
> >
https://github.com/git-for-windows/git/blob/v2.23.0.windows.1/Documentation/git.txt
> > next to the `git-wrapper.c` and integrate it into the packaging of the
> > `mingw-w64-git` package.
> >
> > Tell you what, if you provide me with a `git-cmd.exe` based on that
> > `git.txt`, I will take care of the integration?
> >
> > Thanks,
> > Johannes
> >
>
> --
> You received this message because you are subscribed to the Google Groups "git-for-windows" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
git-for-windo...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/git-for-windows/22f86a84-f245-4c4e-b7e6-d2f08edbe3ef%40googlegroups.com.
>