Re: [PATCH v2 00/15] Towards a more awesome git branch

2013-06-10 Thread Ramkumar Ramachandra
[-CC: Duy, since he has left the community]

Junio: since Duy is no longer around to guide us, I will rely on your guidance.

Duy Nguyen wrote:
 I'm starting to think this is a half-baked solution. It hides
 problems, for example commit placeholders should produce empty string,
 not the literal placeholders.

Why should they produce empty strings?  Aren't they equivalent to
invalid placeholders?

 Doing that from a callback is really
 ugly.

Why is the callback ugly?  I thought it was a great way to extend
pretty-formats, without teaching pretty.c about every possible format
that callers could ever want.

 There's also the problem with sorting and quoting (both only
 work with for-each-ref atoms only).

Why would I want to sort by reflog-identity-name (or something) in
for-each-ref?  The sensible fields for sorting in for-each-ref are all
for-each-ref atoms.

On quoting, I agree.  We must move the quoting to pretty.c eventually,
but I don't think it is urgent.

 A better solution may be improving
 pretty.c to the point where it can more or less replace f-e-r's
 --format.

Why would you want to stuff everything into pretty.c?  If any callers
wants to implement one specialized format, the only way to do it is to
stuff it into the One True pretty-formats?

 Even more, I think pretty engine should be easily added to
 cat-file (especially --batch), as a generic way to extract
 information.

Cute theoretical exercise.  As usual, I'm not interested: this topic
is about making git-branch more awesome, not playing with
pretty-formats.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 00/15] Towards a more awesome git branch

2013-06-10 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes:

 [-CC: Duy, since he has left the community]

 Junio: since Duy is no longer around to guide us, I will rely on your 
 guidance.

 Duy Nguyen wrote:
 I'm starting to think this is a half-baked solution. It hides
 problems, for example commit placeholders should produce empty string,
 not the literal placeholders.

 Why should they produce empty strings?  Aren't they equivalent to
 invalid placeholders?

I haven't even skimmed the series, so responding to a comment given
as a response to 00/15 is a bit difficult, but I _think_ this refers
to this issue: what should %(cD) produce when given to for-each-ref
and you have a tag that points at non committish?

http://thread.gmane.org/gmane.comp.version-control.git/226343/focus=226460

I may be guessing incorrectly what Duy's comment is about, though.

I'll hopefully have something more concrete and useful after I have
a chance to read the series, but not now.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 00/15] Towards a more awesome git branch

2013-06-09 Thread Ramkumar Ramachandra
Hi,

This iteration contains some minor fixups (courtesy reviews by Eric
Sunshine and Junio), and some tests from Duy squashed in.  Also,
missing signoffs from Duy filled in.

Let's get this merged and work on stuff to do on top.

Thanks.

Nguyễn Thái Ngọc Duy (8):
  for-each-ref, quote: convert *_quote_print - *_quote_buf
  for-each-ref: don't print out elements directly
  pretty: extend pretty_print_context with callback
  pretty: allow passing NULL commit to format_commit_message()
  for-each-ref: get --pretty using format_commit_message()
  for-each-ref: teach verify_format() about pretty's syntax
  for-each-ref: introduce format specifier %(*) and %(*)
  for-each-ref: improve responsiveness of %(upstream:track)

Ramkumar Ramachandra (7):
  tar-tree: remove dependency on sq_quote_print()
  quote: remove sq_quote_print()
  pretty: limit recursion in format_commit_one()
  for-each-ref: introduce %(HEAD) marker
  for-each-ref: introduce %(upstream:track[short])
  pretty: introduce get_pretty_userformat
  for-each-ref: use get_pretty_userformat in --pretty

 Documentation/git-for-each-ref.txt |  43 +-
 builtin/for-each-ref.c | 279 ++---
 builtin/tar-tree.c |  11 +-
 commit.h   |   9 ++
 pretty.c   |  77 +-
 quote.c|  61 +++-
 quote.h|   8 +-
 t/t6300-for-each-ref.sh| 143 +++
 8 files changed, 521 insertions(+), 110 deletions(-)

-- 
1.8.3.247.g485169c

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 00/15] Towards a more awesome git branch

2013-06-09 Thread Duy Nguyen
On Mon, Jun 10, 2013 at 12:54 AM, Ramkumar Ramachandra
artag...@gmail.com wrote:
 Hi,

 This iteration contains some minor fixups (courtesy reviews by Eric
 Sunshine and Junio), and some tests from Duy squashed in.

I'm starting to think this is a half-baked solution. It hides
problems, for example commit placeholders should produce empty string,
not the literal placeholders. Doing that from a callback is really
ugly. There's also the problem with sorting and quoting (both only
work with for-each-ref atoms only). A better solution may be improving
pretty.c to the point where it can more or less replace f-e-r's
--format. Even more, I think pretty engine should be easily added to
cat-file (especially --batch), as a generic way to extract
information. But for the reason I will send shortly, I will not work
not work on this series or any others.
--
Duy
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html