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
Karthik Nayak <karthik.188@gmail.com>
Date
Jan 14, 2023, 08:26 UTC
Message-ID
<CAOLa=ZQdNy-gQ0-gUdQM8z+k0fpLjXcRY3fAC4v2PnEvSRS2PQ@mail.gmail.com>
In-Reply-To
<230112.86lem728ig.gmgdl@evledraar.gmail.com>

On Thu, Jan 12, 2023 at 2:21 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 24 quoted lines
>
>
> On Mon, Jan 02 2023, Karthik Nayak wrote:
>
> > +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.
Let me add this to v7! Thanks
Previous: Ævar Arnfjörð BjarmasonNext: Karthik Nayak
Message 9 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.