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

Re: [PATCH 2/3] hash-object doc: elaborate on -w and --literally promises

From
Junio C Hamano <gitster@pobox.com>
Date
May 28, 2019, 16:56 UTC
Message-ID
<xmqq8suq4ix8.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<86woigp3ro.fsf@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
> I thik that this implemetation detail of `--literally` is here to stay;
> how would you otherwise fix the issue if garbage object makes Git crash?
By repacking, presumably ;-).

More importantly, there needs a way to extend "enum object_type" to allow unbounded number of arbitrary (garbage) types before we can allow --literally to record such a garbage type in a pack stream.

So I'd expect the implementation detail would stay for a long time. But there is nothing that says `--literally` inherently must write loose. It is plausible that a new implementation writes objects of known/valid types to a pack stream, while unknown/garbage types to loose objects.

> However, I would prefer to have options state _intent_; if there is
> legitimate need for a tool that creates loose objects, it would be
> better to have separate `--loose` option to `git hash-object` (which
> would imply `-w`, otherwise it doesn't have sense).
Yes, I very much agree with that.
Previous: Jeff KingNext: Junio C Hamano
Message 9 of 12 in “hash-object doc: small fixes”
  1. 0/3 hash-object doc: small fixesÆvar Arnfjörð Bjarmason, May 20, 2019
  2. 1/3 hash-object doc: stop mentioning git-cvsimportÆvar Arnfjörð Bjarmason, May 20, 2019
  3. Jeff KingMay 22, 2019
  4. 2/3 hash-object doc: elaborate on -w and --literally promisesÆvar Arnfjörð Bjarmason, May 20, 2019
  5. Jeff KingMay 22, 2019
  6. Jakub NarebskiMay 24, 2019
  7. Ævar Arnfjörð BjarmasonMay 24, 2019
  8. Jeff KingMay 28, 2019
  9. Junio C HamanoMay 28, 2019
  10. Junio C HamanoMay 28, 2019
  11. 3/3 hash-object doc: point to ls-files and rev-parseÆvar Arnfjörð Bjarmason, May 20, 2019
  12. Jeff KingMay 22, 2019

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.