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

Re: [ANNOUNCE] Git v2.8.0-rc2

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 17, 2016, 16:15 UTC
Message-ID
<xmqqio0l13nz.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<56EAC47F.6000708@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> So, in short, I do believe there is a good reason for the "out of sync"
> git.pot. That doesn't make the negative side effect that I describe any
> less true, and I'm looking for ways to ammeliorate that. Something as
> easy as "make check" or "make test-lint".

Yes, I agree fully with the last sentence. I think the task probably needs two building blocks:

 - A tool to generate up-to-date git.pot contents and store into a
   given filename.
 - A tool that can be used to compare two versions of a .pot file,
   stored as two separate files in the filesystem, without the noise
   that comes from auto-generator (e.g. line numbers, the difference
   of line-wrapping the same messge).

With that, a user can (1) run the former and save the result in git.pot-before-change before making any change (2) do her work, (3) run the former again and save the result in git.pot-after-change, and (4) run the latter between these two.

This is a bit hard to drive from the Makefile, though, as our Makefile cannot assume people are using Git (they may be working off of a tarball extract to produce a one-liner patch), and there is the issue of "then how do we ensure that the user runs the former first on prestine before starting to hack so that later the result can be compared?"

But just like the version number generation, it is OK for some targets to be optional, so perhaps it is OK for this "view pot changes" task is limited to those who work on their own clone of Git. If we add that assumption, then the Makefile target for "view-pot-changes" would

 - see if untracked file git.pot-$(git rev-parse HEAD) exists (treat
   this as a build artifact, like *.o files).  If it does not exist:
  - check out HEAD to a temporary location elsewhere on the
    filesystem;
  - run the first tool and store the result in the above file.
 - run the first tool in the working tree and store the result in
   another file git.pot-now (treat this file as a build artifact,
   too).
 - run the second tool on these two git.pot files.

Add "git.pot-*" to our .gitignore file, and make sure "make clean" removes them.

Previous: Junio C HamanoNext: Jiang Xin
Message 16 of 22 in “[ANNOUNCE] Git v2.8.0-rc2”
  1. Junio C HamanoMar 10, 2016
  2. Max HornMar 12, 2016
  3. Junio C HamanoMar 14, 2016
  4. Michael J GruberMar 14, 2016
  5. wt-status: allow "ahead " to be picked up by l10nMichael J Gruber, Mar 14, 2016
  6. Junio C HamanoMar 14, 2016
  7. Junio C HamanoMar 14, 2016
  8. Junio C HamanoMar 14, 2016
  9. Michael J GruberMar 16, 2016
  10. Duy NguyenMar 16, 2016
  11. Michael J GruberMar 16, 2016
  12. Junio C HamanoMar 16, 2016
  13. Michael J GruberMar 17, 2016
  14. Makefile: allow po generation through po targetMichael J Gruber, Mar 17, 2016
  15. Junio C HamanoMar 17, 2016
  16. Junio C HamanoMar 17, 2016
  17. Jiang XinMar 20, 2016
  18. Michael J GruberMar 20, 2016
  19. Junio C HamanoMar 21, 2016
  20. Michael J GruberMar 22, 2016
  21. Junio C HamanoMar 22, 2016
  22. Jiang XinMar 15, 2016

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.