[PATCH v5 09/11] technical/shallow: stop referring to grafts

2018-04-25 Thread Johannes Schindelin
Now that grafts are deprecated, we should start to assume that readers
have no idea what grafts are. So it makes more sense to make the
description of the "shallow" feature stand on its own.

Suggested-by: Eric Sunshine 
Helped-by: Junio Hamano 
Signed-off-by: Johannes Schindelin 
---
 Documentation/technical/shallow.txt | 13 -
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/Documentation/technical/shallow.txt 
b/Documentation/technical/shallow.txt
index 5183b154229..4ec721335d2 100644
--- a/Documentation/technical/shallow.txt
+++ b/Documentation/technical/shallow.txt
@@ -8,15 +8,10 @@ repo, and therefore grafts are introduced pretending that
 these commits have no parents.
 *
 
-The basic idea is to write the SHA-1s of shallow commits into
-$GIT_DIR/shallow, and handle its contents like the contents
-of $GIT_DIR/info/grafts (with the difference that shallow
-cannot contain parent information).
-
-This information is stored in a new file instead of grafts, or
-even the config, since the user should not touch that file
-at all (even throughout development of the shallow clone, it
-was never manually edited!).
+$GIT_DIR/shallow lists commit object names and tells Git to
+pretend as if they are root commits (e.g. "git log" traversal
+stops after showing them; "git fsck" does not complain saying
+the commits listed on their "parent" lines do not exist).
 
 Each line contains exactly one SHA-1. When read, a commit_graft
 will be constructed, which has nr_parent < 0 to make it easier
-- 
2.17.0.windows.1.33.gfcbb1fa0445




Re: [PATCH v5 09/11] technical/shallow: stop referring to grafts

2018-04-25 Thread Jakub Narębski
On 25 April 2018 at 11:54, Johannes Schindelin
 wrote:
> Now that grafts are deprecated, we should start to assume that readers
> have no idea what grafts are. So it makes more sense to make the
> description of the "shallow" feature stand on its own.
>
> Suggested-by: Eric Sunshine 
> Helped-by: Junio Hamano 
> Signed-off-by: Johannes Schindelin 
> ---
>  Documentation/technical/shallow.txt | 13 -
>  1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/technical/shallow.txt 
> b/Documentation/technical/shallow.txt
> index 5183b154229..4ec721335d2 100644
> --- a/Documentation/technical/shallow.txt
> +++ b/Documentation/technical/shallow.txt
> @@ -8,15 +8,10 @@ repo, and therefore grafts are introduced pretending that
>  these commits have no parents.
>  *
>
> -The basic idea is to write the SHA-1s of shallow commits into
> -$GIT_DIR/shallow, and handle its contents like the contents
> -of $GIT_DIR/info/grafts (with the difference that shallow
> -cannot contain parent information).
> -
> -This information is stored in a new file instead of grafts, or
> -even the config, since the user should not touch that file
> -at all (even throughout development of the shallow clone, it
> -was never manually edited!).
> +$GIT_DIR/shallow lists commit object names and tells Git to
> +pretend as if they are root commits (e.g. "git log" traversal
> +stops after showing them; "git fsck" does not complain saying
> +the commits listed on their "parent" lines do not exist).
>
>  Each line contains exactly one SHA-1. When read, a commit_graft
>  will be constructed, which has nr_parent < 0 to make it easier

Is the removed information (repeated below) important or not?

  the user should not touch that file
  at all (even throughout development of the shallow clone, it
  was never manually edited!).

-- 
Jakub Narębski


Re: [PATCH v5 09/11] technical/shallow: stop referring to grafts

2018-04-26 Thread Johannes Schindelin
Hi Kuba,

On Wed, 25 Apr 2018, Jakub Narębski wrote:

> On 25 April 2018 at 11:54, Johannes Schindelin
>  wrote:
> > diff --git a/Documentation/technical/shallow.txt 
> > b/Documentation/technical/shallow.txt
> > index 5183b154229..4ec721335d2 100644
> > --- a/Documentation/technical/shallow.txt
> > +++ b/Documentation/technical/shallow.txt
> > @@ -8,15 +8,10 @@ repo, and therefore grafts are introduced pretending that
> >  these commits have no parents.
> >  *
> >
> > -The basic idea is to write the SHA-1s of shallow commits into
> > -$GIT_DIR/shallow, and handle its contents like the contents
> > -of $GIT_DIR/info/grafts (with the difference that shallow
> > -cannot contain parent information).
> > -
> > -This information is stored in a new file instead of grafts, or
> > -even the config, since the user should not touch that file
> > -at all (even throughout development of the shallow clone, it
> > -was never manually edited!).
> > +$GIT_DIR/shallow lists commit object names and tells Git to
> > +pretend as if they are root commits (e.g. "git log" traversal
> > +stops after showing them; "git fsck" does not complain saying
> > +the commits listed on their "parent" lines do not exist).
> >
> >  Each line contains exactly one SHA-1. When read, a commit_graft
> >  will be constructed, which has nr_parent < 0 to make it easier
> 
> Is the removed information (repeated below) important or not?
> 
>   the user should not touch that file
>   at all (even throughout development of the shallow clone, it
>   was never manually edited!).

Back in the days, it might have been necessary to tell people not to
meddle with Git's internals. Nowadays I don't think that'd be necessary
anymore, hence I removed it.

Ciao,
Dscho