From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: kevin@sb.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 0/5] Custom extended SHA-1 syntax
Date: Fri, 24 Dec 2010 21:07:44 +0700 [thread overview]
Message-ID: <1293199669-19016-1-git-send-email-pclouds@gmail.com> (raw)
Merry Christmas!
This series introduces two new syntax: @{~foo} and ^{~foo}.
Both syntax allow an external program to run and return the result. So
users can extend the ref/sha1 syntax as they want. External commands are
defined similar to aliases in config.
The former does ref->ref mapping. The latter does SHA-1->SHA-1
mapping. Both allow @{} and ^{} in the result respectively, so you can
make a chain of mapping (*). This should allow Kevin to add "search
the n-th commit that matches 'foo'" syntax.
I think this is something nice to have. For one thing, commonly used
mappings can be collected in config file and distributed. Shell requirements
can be loosened because you don't need shell backquotes
(OK I'm always on a shell so this is moot, but an IDE, maybe).
OK time for movies..
(*) They can also make infinite chain. I don't think I can stop them
from doing that.
Nguyễn Thái Ngọc Duy (5):
alias: add functions to do param substitution and alias running
get_sha1: allow custom SHA-1 mapping with $SHA1^{~alias} syntax
sha1_name: move interpret_nth_prior_checkout closer to
interpret_branch_name
interpret_branch_name: takes @{u} code out and reorder the function
get_sha1: allow custom ref mapping with $ref@{~alias} syntax
Documentation/config.txt | 18 +++
Documentation/revisions.txt | 12 ++
alias.c | 167 ++++++++++++++++++++++-
cache.h | 13 ++
sha1_name.c | 321 ++++++++++++++++++++++++++++++++----------
t/t1511-rev-parse-caret.sh | 45 ++++++
t/t1512-rev-parse-at.sh | 63 +++++++++
7 files changed, 557 insertions(+), 82 deletions(-)
create mode 100755 t/t1512-rev-parse-at.sh
--
1.7.3.3.476.g10a82
next reply other threads:[~2010-12-24 14:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-24 14:07 Nguyễn Thái Ngọc Duy [this message]
2010-12-24 14:07 ` [PATCH 1/5] alias: add functions to do param substitution and alias running Nguyễn Thái Ngọc Duy
2010-12-24 14:07 ` [PATCH 2/5] get_sha1: allow custom SHA-1 mapping with $SHA1^{~alias} syntax Nguyễn Thái Ngọc Duy
2010-12-24 14:07 ` [PATCH 3/5] sha1_name: move interpret_nth_prior_checkout closer to interpret_branch_name Nguyễn Thái Ngọc Duy
2010-12-24 14:07 ` [PATCH 4/5] interpret_branch_name: takes @{u} code out and reorder the function Nguyễn Thái Ngọc Duy
2010-12-24 14:07 ` [PATCH 5/5] get_sha1: allow custom ref mapping with $ref@{~alias} syntax Nguyễn Thái Ngọc Duy
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=1293199669-19016-1-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=kevin@sb.org \
/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).