git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 2/2] attr: add flag `--source` to work with tree-ish

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jan 12, 2023, 13:20 UTC
Message-ID
<230112.86lem728ig.gmgdl@evledraar.gmail.com>
In-Reply-To
<23813496fc73b7e5cb9f09b166e05c9a02bac43c.1671793109.git.karthik.188@gmail.com>
On Mon, Jan 02 2023, Karthik Nayak wrote:
Show 17 quoted lines
> +static struct attr_stack *read_attr_from_blob(struct index_state *istate,
> +					      const struct object_id *tree_oid,
> +					      const char *path, unsigned flags)
> +{
> +	struct object_id oid;
> +	unsigned long sz;
> +	enum object_type type;
> +	void *buf;
> +	unsigned short mode;
> +
> +	if (!tree_oid)
> +		return NULL;
> +
> +	if (get_tree_entry(istate->repo, tree_oid, path, &oid, &mode))
> +		return NULL;
> +
> +	buf = read_object_file(&oid, &type, &sz);

Here you flip-flop between istate->repo and "the_repository". I think you want to use repo_read_object_file(istate->repo, ...) instead.

Previous: Karthik NayakNext: Karthik Nayak
Message 8 of 10 in “check-attr: add support to work with tree-ish”
  1. 0/2 check-attr: add support to work with tree-ishKarthik Nayak, Jan 2, 2023
  2. 1/2 t0003: move setup for `--all` into new blockKarthik Nayak, Jan 2, 2023
  3. 2/2 attr: add flag `--source` to work with tree-ishKarthik Nayak, Jan 2, 2023
  4. Junio C HamanoJan 2, 2023
  5. Karthik NayakJan 4, 2023
  6. Phillip WoodJan 11, 2023
  7. Karthik NayakJan 12, 2023
  8. Ævar Arnfjörð BjarmasonJan 12, 2023
  9. Karthik NayakJan 14, 2023
  10. Karthik NayakJan 9, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.