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

Re: [PATCH] mktag.c: improve verification of tagger field and tests

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Mar 26, 2008, 16:26 UTC
Message-ID
<47EA7927.9060201@nrlssc.navy.mil>
In-Reply-To
<1b46aba20803260421t4db4987gc6fc8b2e556032e0@mail.gmail.com>
Carlos Rica wrote:
Show 8 quoted lines
> On Wed, Mar 26, 2008 at 1:40 AM, Brandon Casey <casey@nrlssc.navy.mil> wrote:
>>  Well, since I looked at this code and used it in filter-branch, I figured I
>>  should fix the verification code for the tagger field (even though it's
>>  probably dieing soon).
>>
>>  I'm thinking this utility should be fairly strict about the format it accepts.
> 
> Why not using git-tag to make tags in filter-branch?
How?

With cat-file and mktag I don't have to parse the tag, I can ignore nearly the entire thing and only change the parts I'm interested in.

With git-tag, wouldn't I have to parse the tag, splitting the header from the body and redirect the body to a tmpfile, parse the tagger field, and set GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, GIT_COMMITTER_DATE environment variables?

> git-mktag was used in git-tag.sh before convert it into
> builtin-tag.c, and I didn't know that anyone was using it.

I don't think anything other than filter-branch is (and the usage there is only tentative).

Show 8 quoted lines
> I agree that, if this program exists and it is used,
> we should double-check the accepted format and data,
> so this patch is a good addition.
> 
> However, I think that we should progressively deprecate its
> use to avoid mantaining two different ways for creating tags,
> so you must have a very good reason to keep using
> this tool in a script...

Eventually filter-branch along with the rest of git will be rewritten in c and the need for many low-level git tools will vanish.

-brandon
Previous: Carlos RicaNext: Brandon Casey
Message 4 of 12 in “mktag.c: improve verification of tagger field and tests”
  1. mktag.c: improve verification of tagger field and testsBrandon Casey, Mar 26, 2008
  2. Brandon CaseyMar 26, 2008
  3. Carlos RicaMar 26, 2008
  4. Brandon CaseyMar 26, 2008
  5. Brandon CaseyMar 26, 2008
  6. Junio C HamanoMar 26, 2008
  7. Brandon CaseyMar 26, 2008
  8. mktag.c: improve verification of tagger field and testsBrandon Casey, Mar 27, 2008
  9. Junio C HamanoMar 31, 2008
  10. Brandon CaseyMar 31, 2008
  11. mktag.c: tweak validation of tagger field and adjust test scriptBrandon Casey, Mar 31, 2008
  12. Junio C HamanoApr 1, 2008

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.