From: Johannes Sixt <j6t@kdbg.org>
To: "René Scharfe" <l.s.r@web.de>
Cc: Git List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>,
"brian m. carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH] tree-walk: convert fill_tree_descriptor() to object_id
Date: Sat, 12 Aug 2017 10:04:24 +0200 [thread overview]
Message-ID: <fb99b685-327a-1c01-52d6-f0a1d106544c@kdbg.org> (raw)
In-Reply-To: <d1e4b270-4f8b-85e4-b6fd-09657720bed2@web.de>
Am 12.08.2017 um 09:14 schrieb René Scharfe:
> - Initialize a `tree_desc` and decode its first entry given the sha1 of
> - a tree. Returns the `buffer` member if the sha1 is a valid tree
> - identifier and NULL otherwise.
> + Initialize a `tree_desc` and decode its first entry given the
> + object ID of a tree. Returns the `buffer` member if the sha1 is
> + a valid tree identifier and NULL otherwise.
There is another mention of "sha1" in the rewritten text. Intended or an
oversight?
> -#define ENTRY_SHA1(e) (((e)->mode && S_ISDIR((e)->mode)) ? (e)->oid->hash : NULL)
> - buf0 = fill_tree_descriptor(t+0, ENTRY_SHA1(n + 0));
> - buf1 = fill_tree_descriptor(t+1, ENTRY_SHA1(n + 1));
> - buf2 = fill_tree_descriptor(t+2, ENTRY_SHA1(n + 2));
> +#define ENTRY_OID(e) (((e)->mode && S_ISDIR((e)->mode)) ? (e)->oid : NULL)
> + buf0 = fill_tree_descriptor(t + 0, ENTRY_OID(n + 0));
> + buf1 = fill_tree_descriptor(t + 1, ENTRY_OID(n + 1));
> + buf2 = fill_tree_descriptor(t + 2, ENTRY_OID(n + 2));
> #undef ENTRY_SHA1
This whould be #undef ENTRY_OID.
-- Hannes
next prev parent reply other threads:[~2017-08-12 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-12 7:14 [PATCH] tree-walk: convert fill_tree_descriptor() to object_id René Scharfe
2017-08-12 8:04 ` Johannes Sixt [this message]
2017-08-12 8:32 ` [PATCH v2] " René Scharfe
2017-08-12 14:59 ` brian m. carlson
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb99b685-327a-1c01-52d6-f0a1d106544c@kdbg.org \
--to=j6t@kdbg.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
--cc=sandals@crustytoothpaste.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).