git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH V3 1/4] git-mw: Introduction of GitMediawiki.pm

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 17, 2013, 07:12 UTC
Message-ID
<vpq8v299pn6.fsf@anie.imag.fr>
In-Reply-To
<CAETqRChcu+N-2uNzL9_J6abR5fnduT5UVRif5NTQYOoxPTiRTw@mail.gmail.com>
Benoît Person <benoit.person@ensimag.fr> writes:
Show 12 quoted lines
> On 16 June 2013 22:18, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
>> benoit.person@ensimag.fr writes:
>>
>>> changes from the V2:
>>>   - Add a way to test, without installation, code that uses GitMediawiki.pm.
>>
>> This still needs to be documented, even very quickly, somewhere in the
>> code (e.g a comment in the Makefile).
> Well, I think I will have to re-read some docs (and some earlier
> reviews) about what to write in commit messages, in the emails, in the
> code as comments and in the documentation ... I am just totally lost
> right now :/ .

Don't worry, reviews are meant to improve your code (present and future), not to blame you ;-).

Just think about what you expect as a user or developer. Would you run "git log Makefile" or "git blame Makefile" to know how to use the Makefile? Commit messages are primarily meant for reviewers ("here's some code, and here's why it's good and why you should merge it"), and can be very useful when bisecting a regression or blaming a source file.

Right now, git-remote-mediawiki has only little doc, and the user manual is hosted on a GitHub wiki, not in the source. So there's no ideal place to say how to use the tool as a developer, but a comment in the Makefile should be OK.

Show 9 quoted lines
>> Also, it seems to be only part of the solution. With your change, from
>> contrib/mw-to-git/ and after running only "make",
>>
>> ./git-mw takes the installed version of GitMediawiki.pm in priority
>>
>> ../../bin-wrappers/git takes the installed version of git-mw only (i.e.
>> does not know "git mw" if "make install" hasn't been ran).
> Same thing as the documentation point, I think I am a bit lost in that
> whole thing. I will re-look into it for the next version :/ .

In short, the include path should contain both the *.pm file and the git-<foo> ones.

Show 8 quoted lines
>>>  perlcritic:
>>> -     perlcritic -2 *.perl
>>> +     perlcritic -2 *.perl
>>> \ No newline at end of file
>>
>> Please, avoid these whitespace-only changes. They create noise during
>> review, and more potential conflicts.
> For that one, I don't know why git assumes there is a change in it :

I think you removed a newline from the end of the file. It's usually considered good practice to have this trailing newline (e.g. so that "cat file" in a terminal doesn't put your prompt after the last line). IIRC, it's actually required to call the file a "text file" according to POSIX.

> I will look into that for the next version ...

In any case, using "git add -p" and if needed its "s" command avoids introducing unwanted things in the commit.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Benoît PersonNext: Benoît Person
Message 5 of 13 in “git-remote-mediawiki: new tool to preview local changes without pushing”
  1. 0/4 git-remote-mediawiki: new tool to preview local changes without pushingbenoit.person@ensimag.fr, Jun 16, 2013
  2. 1/4 git-mw: Introduction of GitMediawiki.pmbenoit.person@ensimag.fr, Jun 16, 2013
  3. Matthieu MoyJun 16, 2013
  4. Benoît PersonJun 16, 2013
  5. Matthieu MoyJun 17, 2013
  6. Benoît PersonJun 18, 2013
  7. Matthieu MoyJun 18, 2013
  8. Matthieu MoyJun 18, 2013
  9. 2/4 git-mw: Move some functions from git-remote-mediawiki.perl to GitMediawiki.pmbenoit.person@ensimag.fr, Jun 16, 2013
  10. 3/4 git-mw: Adding git-mw commandbenoit.person@ensimag.fr, Jun 16, 2013
  11. 4/4 git-mw: Add preview subcommand into git mw.benoit.person@ensimag.fr, Jun 16, 2013
  12. Matthieu MoyJun 16, 2013
  13. Ramkumar RamachandraJun 16, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.