git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Sverre Rabbelier <srabbelier@gmail.com>,
	git@vger.kernel.org, kusmabite@gmail.com, raa.lkml@gmail.com,
	jjuran@gmail.com, Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: Re: [PATCH] doc: technical details about the index file format
Date: Sat, 26 Feb 2011 02:23:38 -0800	[thread overview]
Message-ID: <7vsjvb6qmt.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20110226100310.GA21724@do> (Nguyen Thai Ngoc Duy's message of "Sat\, 26 Feb 2011 17\:03\:10 +0700")

Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:

> OK here come the missing bits on top of the previous patch. Looks good?

Thanks.

> diff --git a/Documentation/technical/index-format.txt b/Documentation/technical/index-format.txt
> index 5b1d70d..574eb3b 100644
> --- a/Documentation/technical/index-format.txt
> +++ b/Documentation/technical/index-format.txt
> @@ -118,7 +118,7 @@ GIT index format
>  === Tree cache
>  
>    Tree cache extension contains pre-computes hashes for all trees that
> -  can be derived from the index
> +  can be derived from the index.
>  
>    - Extension tag { 'T', 'R', 'E', 'E' }
>  
> @@ -137,8 +137,20 @@ GIT index format
>  
>  === Resolve undo
>  
> -  TODO
> +  Resolve undo extension records staged entries before they are
> +  resolved and removed from index. It can be used to recreate conflicts
> +  after the conflict is incorrectly resolved.

I lack energy to come up with a succinct description right now, so here is
an undistilled version of what I would want to see the reader of the above
paragraph understand:

    A set of entries for a path at higher stages (i.e. the ones that
    represent a merge conflict at the path) used to be removed from the
    index and replaced with the result of the resolution when the conflict
    is resolved (e.g. with "git add path").  This extension saves these
    higher stage entries away so that "checkout -m" and other operations
    can recreate the conflicted state, in case you botched a conflict
    resolution and want to redo it from scratch.

The description of the data contents looked fine, except that "A number of
entries" felt a bit unclear (it would make the reader wonder if we record
how many we have at that location as an integer, which is not the case).

>    - Extension tag { 'R', 'E', 'U', 'C' }
>  
>    - 32-bit size
> +
> +  - A number of entries
> +
> +    NUL-terminated entry name
> +
> +    Entry mode of the entry in three stages, in increasing order from
> +    1 to 3, in NUL-terminated ASCII octal number.
> +
> +    160 bit SHA-1 of the entry in three stages, in increasing
> +    order from 1 to 3. A stage with zero mode will be skipped.

  reply	other threads:[~2011-02-26 10:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01  9:53 [PATCH] doc: technical details about the index file format Nguyễn Thái Ngọc Duy
2010-09-01 10:36 ` Ramkumar Ramachandra
2010-09-01 15:20   ` Sverre Rabbelier
2010-09-01 18:54 ` Robin Rosenberg
2010-09-01 14:39   ` Nguyễn Thái Ngọc Duy
2010-09-02  8:56     ` Alex Riesen
2010-09-02  9:08       ` Joshua Juran
2010-09-02 14:50       ` Junio C Hamano
2010-09-02 15:11         ` Erik Faye-Lund
2010-09-06 10:37           ` Nguyễn Thái Ngọc Duy
2011-02-19 22:16             ` Sverre Rabbelier
2011-02-20  9:30               ` Nguyen Thai Ngoc Duy
2011-02-26 10:03                 ` Nguyen Thai Ngoc Duy
2011-02-26 10:23                   ` Junio C Hamano [this message]
2011-02-26 13:36                     ` Nguyen Thai Ngoc Duy
2011-03-02  1:51                       ` Junio C Hamano
2011-03-02  3:34                         ` Nguyen Thai Ngoc Duy
2011-03-02  6:02                           ` Junio C Hamano
2011-03-02 11:43                             ` Nguyen Thai Ngoc Duy
2011-03-02 12:53                             ` Drew Northup
2010-09-01 23:28   ` Nguyen Thai Ngoc Duy
2010-09-02  5:59   ` Robin Rosenberg

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vsjvb6qmt.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jjuran@gmail.com \
    --cc=kusmabite@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=raa.lkml@gmail.com \
    --cc=robin.rosenberg@dewire.com \
    --cc=srabbelier@gmail.com \
    /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.
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 NNTP newsgroup(s).