From: "Dana How" <danahow@gmail.com>
To: "Junio C Hamano" <junkio@cox.net>
Cc: "Git Mailing List" <git@vger.kernel.org>, danahow@gmail.com
Subject: Re: [PATCH] Support ent:relative_path
Date: Fri, 4 May 2007 01:45:17 -0700 [thread overview]
Message-ID: <56b7f5510705040145k781da6farff3d02c3c1a5f3f9@mail.gmail.com> (raw)
In-Reply-To: <7v7irpuhhr.fsf@assigned-by-dhcp.cox.net>
On 5/4/07, Junio C Hamano <junkio@cox.net> wrote:
> I do not think it is wrong per-se, to want to make this hold true:
>
> A=$(git rev-parse :somedir/file)
> B=$(cd somedir && git rev-parse :file)
> test "$A" = "$B"
>
> One thing I am reasonably certain however is that this should
> NOT be conditional to a config setting. Doing so would force
> scripts that take (or compute) path and commit and concatenate
> them to make "${commit}:${path}" to name a blob (or tree) to
> first inspect the current setting of core.relativepaths and undo
> what the new code does by prefixing/subtracting the prefix
> string depending on the config.
>
> In other words, having that config is not really helping scripts
> or compatibility.
>
> I think the choices are:
>
> (1) we say it was a mistake that we did not make it relative to
> the current directory when we introduced the X:<path>
> syntax (X could be empty or :[0-3]: for index, or a commit
> or tree object name), and change the semantics in a future
> major release for everybody, apologizing for potentially
> breaking existing scripts; or
>
> (2) keep the current behaviour as is, and come up with a
> different syntax to use relative; or
>
> (3) do nothing.
>
> My preference is (2), (3) and then (1), but I do not have
> offhand a suggestion for a good metacharacter we could use.
Let us require:
* No config settings as you prefer
* Current interpretations are unchanged.
The current path supports
:fullpath
:/string
:./relpath
[assuming core.relativepaths=no always since it goes away].
(:/string is the "find string in commit msg" feature.)
A new metacharacter lets us drop the "./" ,
and I think that's desirable.
How about = ? It's not even shifted on my keyboard:
ent=relpath
ent=2=relpath
ent=/fullpath
1. We would accept the same new metacharacter before stage if any.
2, You could still use ent:/string , or ent:fullpath .
The patch should also be extended so relpath can start
with a sequence of ./ or ../ prefixes,
which is easily handled in prepend_prefix()..
What do you think of "=" ?
--
Dana L. How danahow@gmail.com +1 650 804 5991 cell
next prev parent reply other threads:[~2007-05-04 8:45 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-04 7:18 [PATCH] Support ent:relative_path Dana How
2007-05-04 7:22 ` Dana How
2007-05-04 8:21 ` Junio C Hamano
2007-05-04 8:45 ` Dana How [this message]
2007-05-04 8:47 ` Alex Riesen
2007-05-04 8:53 ` Dana How
2007-05-04 9:17 ` Alex Riesen
2007-05-04 9:26 ` Dana How
2007-05-04 9:46 ` Alex Riesen
2007-05-04 16:57 ` Dana How
2007-05-04 17:17 ` Alex Riesen
2007-05-04 19:00 ` Johannes Schindelin
2007-05-04 20:23 ` Alex Riesen
2007-05-04 9:19 ` Johannes Sixt
2007-05-04 17:17 ` Junio C Hamano
2007-05-04 18:23 ` Dana How
2007-05-04 19:06 ` Johannes Schindelin
2007-05-04 19:22 ` Junio C Hamano
2007-05-04 19:31 ` Johannes Schindelin
2007-05-04 19:38 ` Junio C Hamano
2007-05-04 19:42 ` Johannes Schindelin
2007-05-04 20:21 ` Alex Riesen
2007-05-04 23:36 ` Jakub Narebski
2007-05-05 0:04 ` Junio C Hamano
2007-05-05 0:52 ` Dana How
2007-05-05 1:06 ` Jakub Narebski
2007-05-05 1:15 ` Junio C Hamano
2007-05-04 8:20 ` Alex Riesen
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=56b7f5510705040145k781da6farff3d02c3c1a5f3f9@mail.gmail.com \
--to=danahow@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).