Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

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

From: Brandon Casey <hidden>
Date: 2016-06-15 22:44:26

Possibly related (same subject, not in this thread)

Carlos Rica wrote:
On Wed, Mar 26, 2008 at 1:40 AM, Brandon Casey [off-list ref] wrote:
quoted
 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).
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help