git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcus Comstedt <marcus@mc.pp.se>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2 1/2] convert: fix normalization of foreign idents
Date: Mon, 13 Sep 2010 00:06:39 +0200	[thread overview]
Message-ID: <yf9d3siiplc.fsf@chiyo.mc.pp.se> (raw)
In-Reply-To: <7vd3sid4bo.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Sun, 12 Sep 2010 14:44:59 -0700")


Junio C Hamano <gitster@pobox.com> writes:

> Imagine there isn't any "$Id$" (or "$ident$" as it was originally known)
> expansion in git.  You can implement it easily using a smudge/clean pair,

Sorry, but here I have to go off a little at a tangent.  Yes, you
could implement the ident-expansion currently provided by git as a
smudge/clean pair.  However, you could not implement an ident which
actually puts something more useful (such as the id of the commit
where the file was last modified) into the id string by using
smudge/clean.  I know, because I tried to do just that.  ;-)
The reason:  smudge/clean do not get the pathname, so they are not
able to query any information about the file from the repository.
I might submit a patch adressing this issue later.


> and the smudge and clean should be conditionally applied in the codepath
> you touched using exactly the same logic as your patch uses, no?
>
> That is what I meant.  It smells wrong to make this "sometime we do,
> sometimes we don't" as a special case for "$Id$".  Specifically, the
> parameter name "normalize_foreign_ident" feels wrong; the concept that the
> parameter tries to convey covers much wider than just "foreign ident", no?

Ok, I think I follow where you are going.  _If_ we say that clean
(and smudge?) should be able to run in different "modes", with
cleaning for a commit being such an mode, then this ought to be
triggered by the same parameter, yes.  The parameter name describes
what the parameter does now, but not necessarily what it would do in a
possible future where such new concepts as modal clean scripts have
been introduced.

Generally, I'm kind of wondering if the parameters of convert_to_git
wouldn't be better off just specifying a mode (like the, perhaps also
slightly mis-named, write_object paremeter to index_mem) rather than
trying to micro-manage specific features like they have before.  Was
that what you had in mind?


  // Marcus

  reply	other threads:[~2010-09-12 22:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23 21:30 Fix for normalization of foreign idents Marcus Comstedt
2010-08-23 21:30 ` [PATCH] convert: fix " Marcus Comstedt
2010-08-23 21:35 ` Fix for " Jonathan Nieder
2010-08-23 21:44   ` Marcus Comstedt
2010-08-23 22:33     ` Jonathan Nieder
2010-08-23 23:46       ` Junio C Hamano
2010-08-24  7:23         ` Marcus Comstedt
2010-09-06  9:42     ` Marcus Comstedt
2010-09-06 21:07       ` Jonathan Nieder
2010-09-07 19:37         ` Marcus Comstedt
2010-08-23  7:05           ` [PATCH v2 1/2] convert: fix " Marcus Comstedt
2010-09-10  0:26             ` Junio C Hamano
2010-09-12 21:01               ` Marcus Comstedt
2010-09-12 21:44                 ` Junio C Hamano
2010-09-12 22:06                   ` Marcus Comstedt [this message]
2010-09-13 22:00                     ` [PATCH] convert: generalize checksafe parameter Marcus Comstedt
2010-09-07 19:16           ` [PATCH v2 2/2] t0021: test checkout and commit of foreign idents Marcus Comstedt
2010-09-07 20:00           ` [PATCH v2 0/2] fix normalization of foreign idents (now with test cases) Marcus Comstedt
2010-09-08  4:32           ` Fix for normalization of foreign idents Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yf9d3siiplc.fsf@chiyo.mc.pp.se \
    --to=marcus@mc.pp.se \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).