git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Duy Nguyen <pclouds@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH] attr: add counted string version of git_attr()
Date: Wed, 18 May 2016 14:36:46 -0700	[thread overview]
Message-ID: <CAGZ79kbMsitKNeb-D3gmTFwrRS-6ZiCZcmu1MP42UCd5AHcHbA@mail.gmail.com> (raw)
In-Reply-To: <xmqqmvnnqdtd.fsf_-_@gitster.mtv.corp.google.com>

On Wed, May 18, 2016 at 2:03 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Often a potential caller has <name, namelen> pair that
> represents the name it wants to create an attribute out of.
>
> When name[namelen] is not NUL, the caller has to xmemdupz()
> only to call git_attr().
>
> Add git_attr_counted() that takes such a counted string instead of
> "const char *name".

s/ "const char *name"/a standard C string that is null terminated/ maybe?

"const char *name" is not a strong hint that it is not counted?

  reply	other threads:[~2016-05-18 21:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 19:02 [PATCHv7 0/5] pathspec magic extension to search for attributes Stefan Beller
2016-05-18 19:02 ` [PATCHv7 1/5] string list: improve comment Stefan Beller
2016-05-18 19:02 ` [PATCHv7 2/5] Documentation: fix a typo Stefan Beller
2016-05-18 19:02 ` [PATCHv7 3/5] pathspec: move long magic parsing out of prefix_pathspec Stefan Beller
2016-05-18 19:02 ` [PATCHv7 4/5] pathspec: move prefix check out of the inner loop Stefan Beller
2016-05-18 19:02 ` [PATCHv7 5/5] pathspec: allow querying for attributes Stefan Beller
2016-05-18 19:42   ` Stefan Beller
2016-05-18 19:47   ` Junio C Hamano
2016-05-18 20:00     ` Junio C Hamano
2016-05-18 20:21     ` Junio C Hamano
2016-05-18 21:01       ` [PATCH] attr: add counted string version of git_check_attr() Junio C Hamano
2016-05-18 21:03       ` [PATCH] attr: add counted string version of git_attr() Junio C Hamano
2016-05-18 21:36         ` Stefan Beller [this message]
2016-05-18 21:05       ` [PATCH] attr: expose validity check for attribute names Junio C Hamano
2016-05-18 21:42         ` Stefan Beller
2016-05-18 22:31     ` [PATCHv7 5/5] pathspec: allow querying for attributes Stefan Beller
2016-05-18 22:59       ` Junio C Hamano

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=CAGZ79kbMsitKNeb-D3gmTFwrRS-6ZiCZcmu1MP42UCd5AHcHbA@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.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).