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

Re: grafts not appearing in manual pages

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 27, 2007, 07:25 UTC
Message-ID
<7vmyv8wowc.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<46FB4C23.8010400@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 7 quoted lines
> J. Bruce Fields schrieb:
> ...
>> It could go in Documentation/user-manual.txt, but I don't know where.
>
> IMHO grafts should not be made known to a wide audience until
> send-pack, pack-objects, and prune are fixed so that you cannot
> corrupt your repository when there are grafts.
I mildly have to disagree.

Documenting the current semantics (in short, "grafts are strictly local matter") and the implications is important.

Here are some of the points you would want to mention:
 - if you graft, prune and fsck will honor that fake ancestry,
 - if you _add_ parent by grafting you will not lose the history
   that is otherwise disconnected, but on the other hand, once
   having pruned that way and you remove that graft, prune will
   discard that discontiguous history away.
 - if you _hide_ parent by grafting, you will be able to lose
   the hidden subbranch away, but you will get complaints from
   fsck if you remove that graft after pruning your history.
 - if you try to fetch/push across repositories with different
   notion of ancestry (because of different grafts), things can
   break in expected ways (and you can keep both halves ;-).
   For example, if the sending side has extra parents to a
   commit compared to the receiving side, and if the receiving
   side claims to have that commit, objects reachable from the
   extra parents might be missing from the reciving end but the
   sender will not be able to notice.
> See http://thread.gmane.org/gmane.comp.version-control.git/37744
> in particular http://article.gmane.org/gmane.comp.version-control.git/37866
> on a sketch how to fix the issues.

IIRC, there discussions were more about what the issues are and what the potential semantics could be. First the desired semantics need to be defined.

Previous: Johannes Sixt
Message 4 of 4 in “grafts not appearing in manual pages”
  1. Mike HommeySep 26, 2007
  2. J. Bruce FieldsSep 26, 2007
  3. Johannes SixtSep 27, 2007
  4. Junio C HamanoSep 27, 2007

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.