what *precisely* means "--depth" WRT a shallow clone?

2019-10-18 Thread Robert P. J. Day
i can see the standard use of "--depth" when set to precisely one, for CI/CD systems that don't need any history. but what does it mean to say, eg, "--depth 10"? the man page explains that as "a history truncated to the specified number of commits", but what does mean in the sense of branchi

Re: Cannot shallow clone using GitHub tag refs after commit 34066f06

2019-10-12 Thread Jeff King
On Sat, Oct 12, 2019 at 06:31:02PM -0400, Teddy Reed wrote: > Hello, I am trying to debug an issue where a shallow clone (--depth=1) > fails when the reference is the tip of a tag on a GitHub repository. > > The git client works on versions below 2.22.0-rc0 up until commit > 34066

Cannot shallow clone using GitHub tag refs after commit 34066f06

2019-10-12 Thread Teddy Reed
Hello, I am trying to debug an issue where a shallow clone (--depth=1) fails when the reference is the tip of a tag on a GitHub repository. The git client works on versions below 2.22.0-rc0 up until commit 34066f06, "fetch: do not consider peeled tags as advertised tips". That commit

Re: Retrieve version-string on shallow clone

2019-09-03 Thread Reino Wijnsma
Hello Giuseppe, Philip and Jeff, On 2019-09-02T16:08:54+0200, Giuseppe Crinò wrote: > To my understanding both questions are solved by > * https://stackoverflow.com/a/47720414/2219670 > * https://stackoverflow.com/a/12704727/2219670 On 2019-09-02T17:52:19+0200, Philip Oakley wrote: > Start by ge

Re: Retrieve version-string on shallow clone

2019-09-02 Thread Jeff King
fatal: No names found, cannot describe anything. > > The tags get lost while doing a shallow clone. Right. As noted elsewhere in the thread, this is the expected behavior of Git. But what you want is perfectly reasonable; there's just not a good way to do it yet. > I'd figure one o

Re: Retrieve version-string on shallow clone

2019-09-02 Thread Philip Oakley
Hi Reino On 01/09/2019 12:07, Reino Wijnsma wrote: Hello git@vger.kernel.org, Two days ago I started https://github.com/mstorsjo/fdk-aac/issues/107, asking how to retrieve the fdk-aac version-string on a shallow clone. My question was of course not fdk-aac related, so Martin Storsjö suggested

Re: Retrieve version-string on shallow clone

2019-09-02 Thread Giuseppe Crinò
> I'd figure one of these options would be to clone everything from tag > v2.0.0 onward, but if so how would I do that? > As another option I was thinking; maybe it's possible to do git describe > --tags on the remote repo? To my understanding both questions are solved by * https://stackoverflow

Retrieve version-string on shallow clone

2019-09-01 Thread Reino Wijnsma
Hello git@vger.kernel.org, Two days ago I started https://github.com/mstorsjo/fdk-aac/issues/107, asking how to retrieve the fdk-aac version-string on a shallow clone. My question was of course not fdk-aac related, so Martin Storsjö suggested I'd try here. It basicly comes down to this:

Re: [PATCH] gitmodules: clarify what history depth a shallow clone has

2017-04-19 Thread Stefan Beller
ion/gitmodules.txt > index 8f7c50f..6f39f24 100644 > --- a/Documentation/gitmodules.txt > +++ b/Documentation/gitmodules.txt > @@ -84,8 +84,8 @@ submodule..ignore:: > > submodule..shallow:: > When set to true, a clone of this submodule will be performed as a > - sha

[PATCH] gitmodules: clarify what history depth a shallow clone has

2017-04-19 Thread Sebastian Schuberth
/gitmodules.txt @@ -84,8 +84,8 @@ submodule..ignore:: submodule..shallow:: When set to true, a clone of this submodule will be performed as a - shallow clone unless the user explicitly asks for a non-shallow - clone. + shallow clone (with a history depth of 1) unless the user

Re: [PATCH] clone,fetch: explain the shallow-clone option a little more clearly

2016-12-07 Thread Duy Nguyen
his patch: > >> OPT_STRING_LIST(0, "shallow-exclude", &option_not, N_("revision"), >> - N_("deepen history of shallow clone by excluding >> rev")), >> + N_("deepen history of shallow clon

Re: [PATCH] clone,fetch: explain the shallow-clone option a little more clearly

2016-12-06 Thread Junio C Hamano
possible I botched it and reached a wrong conclusion above. If we can use the command to make it shallower, then the phrase "deepen" would probably be what we need to be fixing in this patch: > OPT_STRING_LIST(0, "shallow-exclude", &option_not, N_("revision"),

Re: [PATCH] clone,fetch: explain the shallow-clone option a little more clearly

2016-12-06 Thread Duy Nguyen
On Tue, Dec 6, 2016 at 1:28 AM, Junio C Hamano wrote: > I however offhand do not think the feature can be used to make the > repository shallower I'm pretty sure it can, though it's a waste because you should be able to shorten your history without talking to a remote server. But that no-remote s

Re: [PATCH] clone,fetch: explain the shallow-clone option a little more clearly

2016-12-05 Thread Junio C Hamano
6c76a6e..e3cb808 100644 > --- a/builtin/clone.c > +++ b/builtin/clone.c > @@ -99,7 +99,7 @@ static struct option builtin_clone_options[] = { > OPT_STRING(0, "shallow-since", &option_since, N_("time"), > N_("create a shallow clone since a specific

[PATCH] clone,fetch: explain the shallow-clone option a little more clearly

2016-12-04 Thread Alex Henrie
a/builtin/clone.c b/builtin/clone.c index 6c76a6e..e3cb808 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -99,7 +99,7 @@ static struct option builtin_clone_options[] = { OPT_STRING(0, "shallow-since", &option_since, N_("time"), N_("creat

Re: Git shallow clone branch doesn't work with recursive submodules cloning

2016-08-15 Thread Jeff King
On Mon, Aug 15, 2016 at 03:53:48PM +0300, Arkady Shapkin wrote: > So it will work only if github update their server configuration > (boringssl submodule on github)? Correct. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel

Re: Git shallow clone branch doesn't work with recursive submodules cloning

2016-08-15 Thread Arkady Shapkin
So it will work only if github update their server configuration (boringssl submodule on github)? 2016-08-15 15:47 GMT+03:00 Jeff King : > On Mon, Aug 15, 2016 at 03:29:14PM +0300, Arkady Shapkin wrote: > >> Thank you, after updating to "2.9.3.windows.1" options "--recursive >> --depth 1" now work

Re: Git shallow clone branch doesn't work with recursive submodules cloning

2016-08-15 Thread Jeff King
On Mon, Aug 15, 2016 at 03:29:14PM +0300, Arkady Shapkin wrote: > Thank you, after updating to "2.9.3.windows.1" options "--recursive > --depth 1" now works. > > But "--recursive --shallow-submodules" and "--recursive > --shallow-submodules --depth 1" still doesn't work. It does "work", but the

Re: Git shallow clone branch doesn't work with recursive submodules cloning

2016-08-15 Thread Arkady Shapkin
Thank you, after updating to "2.9.3.windows.1" options "--recursive --depth 1" now works. But "--recursive --shallow-submodules" and "--recursive --shallow-submodules --depth 1" still doesn't work. 2016-08-15 15:04 GMT+03:00 Jeff King : > On Mon, Aug 15, 2016 at 02:20:27PM +0300, Arkady Shapkin w

Re: Git shallow clone branch doesn't work with recursive submodules cloning

2016-08-15 Thread Jeff King
On Mon, Aug 15, 2016 at 02:20:27PM +0300, Arkady Shapkin wrote: > I am trying clone repository by tag with recursive submodules init, > but for one submodule it doesn't work. > What I'm doing wrong? Nothing. See 18a74a0 (clone: do not let --depth imply --shallow-submodules, 2016-06-19). > >git -

Git shallow clone branch doesn't work with recursive submodules cloning

2016-08-15 Thread Arkady Shapkin
Hi, I am trying clone repository by tag with recursive submodules init, but for one submodule it doesn't work. What I'm doing wrong? >git clone https://github.com/grpc/grpc.git --recursive --depth 1 dsad5 Cloning into 'dsad5'... remote: Counting objects: 7475, done. remote: Compressing objects:

Re: http-backend fatal error message on shallow clone

2016-06-21 Thread Duy Nguyen
> fetch-pack wants to see the shallow list before proceeding. But > since it has no actual commits to negotiate, the negotiation is a > noop. So probably this case could actually happen in a single > request. I seem to recall our discussion a few months(?) ago about

Re: http-backend fatal error message on shallow clone

2016-06-21 Thread Jeff King
On Tue, Jun 21, 2016 at 11:23:03AM +, Eric Wong wrote: > I noticed "fatal: The remote end hung up unexpectedly" in server > logs from shallow clones. Totally reproducible in the test > cases, too. The following change shows it: > [...] > [Tue Jun 21 11:07:41.391269 2016] [cgi:error] [pid 215

http-backend fatal error message on shallow clone

2016-06-21 Thread Eric Wong
d.sh +++ b/t/t5561-http-backend.sh @@ -132,5 +132,11 @@ test_expect_success 'server request log matches test results' ' test_cmp exp act ' +test_expect_success 'shallow clone' ' + config http.uploadpack true && + git clone --depth=

Re: [PATCH] shallow clone to not imply shallow submodules

2016-06-20 Thread Jeff King
ression. Yep, it looks good to me. > +test_expect_success 'shallow clone does not imply shallow submodule' ' > + test_when_finished "rm -rf super_clone" && > + git clone --recurse-submodules --depth 2 "file://$pwd/." super_clone &

Re: [PATCH] shallow clone to not imply shallow submodules

2016-06-20 Thread Jeff King
On Mon, Jun 20, 2016 at 10:14:47AM -0700, Stefan Beller wrote: > > This follows the style of the other tests, so it's the right thing here. > > But as a style suggestion, I think: > > > > git -C super_clone/sub log --oneline >lines && > > test_line_count = 3 lines > > > > is nicer than the sub

Re: [PATCH] shallow clone to not imply shallow submodules

2016-06-20 Thread Stefan Beller
: do not let --depth imply --shallow-submodules" will actually test >> for the regression. > > Yep, it looks good to me. > >> +test_expect_success 'shallow clone does not imply shallow submodule' ' >> + test_when_finished "rm -rf super_clone" &

[PATCH] shallow clone to not imply shallow submodules

2016-06-20 Thread Stefan Beller
llow submodule' ' ) ' -test_expect_success 'shallow clone does not imply shallow submodule' ' +test_expect_success 'shallow clone with shallow submodule' ' test_when_finished "rm -rf super_clone" && git clone --recurse-submodules --depth 2

[PATCH v2 23/27] clone: define shallow clone boundary with --shallow-exclude

2016-06-12 Thread Nguyễn Thái Ngọc Duy
..5049663 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -196,6 +196,11 @@ objects from the source repository into a pack in the cloned repository. --shallow-since=:: Create a shallow clone with a history after the specified time. +--shallow-exclude

[PATCH v2 18/27] clone: define shallow clone boundary based on time with --shallow-since

2016-06-12 Thread Nguyễn Thái Ngọc Duy
=:: + Create a shallow clone with a history after the specified time. + --[no-]single-branch:: Clone only the history leading to the tip of a single branch, either specified by the `--branch` option or the primary diff --git a/builtin/clone.c b/builtin/clone.c index bcba080

[PATCH 23/27] clone: define shallow clone boundary with --shallow-exclude

2016-06-10 Thread Nguyễn Thái Ngọc Duy
/git-clone.txt +++ b/Documentation/git-clone.txt @@ -196,6 +196,11 @@ objects from the source repository into a pack in the cloned repository. --shallow-since=:: Create a shallow clone with a history after the specified time. +--shallow-exclude=:: + Create a shallow clone with a

[PATCH 18/27] clone: define shallow clone boundary based on time with --shallow-since

2016-06-10 Thread Nguyễn Thái Ngọc Duy
=:: + Create a shallow clone with a history after the specified time. + --[no-]single-branch:: Clone only the history leading to the tip of a single branch, either specified by the `--branch` option or the primary diff --git a/builtin/clone.c b/builtin/clone.c index bcba080

Re: [PATCH 22/26] clone: define shallow clone boundary with --shallow-exclude

2016-06-04 Thread Eric Sunshine
@@ static struct option builtin_clone_options[] = { > N_("create a shallow clone of that depth")), > OPT_STRING(0, "shallow-since", &option_since, N_("time"), > N_("create a shallow clone s

[PATCH 17/26] clone: define shallow clone boundary based on time with --shallow-since

2016-04-13 Thread Nguyễn Thái Ngọc Duy
/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -193,6 +193,9 @@ objects from the source repository into a pack in the cloned repository. `--no-single-branch` is given to fetch the histories near the tips of all branches. +--shallow-since=:: + Create a shallow clone

[PATCH 22/26] clone: define shallow clone boundary with --shallow-exclude

2016-04-13 Thread Nguyễn Thái Ngọc Duy
/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -196,6 +196,11 @@ objects from the source repository into a pack in the cloned repository. --shallow-since=:: Create a shallow clone with a history after the specified time. +--shallow-exclude=:: + Create a shallow clone

[PATCH v3 16/25] clone: define shallow clone boundary based on time with --shallow-since

2016-02-23 Thread Nguyễn Thái Ngọc Duy
/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -193,6 +193,9 @@ objects from the source repository into a pack in the cloned repository. `--no-single-branch` is given to fetch the histories near the tips of all branches. +--shallow-since=:: + Create a shallow clone

[PATCH v3 21/25] clone: define shallow clone boundary with --shallow-exclude

2016-02-23 Thread Nguyễn Thái Ngọc Duy
/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -196,6 +196,11 @@ objects from the source repository into a pack in the cloned repository. --shallow-since=:: Create a shallow clone with a history after the specified time. +--shallow-exclude=:: + Create a shallow clone

Re: [PATCH v2 17/25] clone: define shallow clone boundary based on time with --shallow-since

2016-02-08 Thread Junio C Hamano
194,9 @@ objects from the source repository into a pack in the > cloned repository. > `--no-single-branch` is given to fetch the histories near the > tips of all branches. > > +--shallow-since=:: > + Create a shallow clone with a history after the specified time. > + &

[PATCH v2 22/25] clone: define shallow clone boundary with --shallow-exclude

2016-02-04 Thread Nguyễn Thái Ngọc Duy
/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -197,6 +197,11 @@ objects from the source repository into a pack in the cloned repository. --shallow-since=:: Create a shallow clone with a history after the specified time. +--shallow-exclude=:: + Create a shallow clone

[PATCH v2 17/25] clone: define shallow clone boundary based on time with --shallow-since

2016-02-04 Thread Nguyễn Thái Ngọc Duy
/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -194,6 +194,9 @@ objects from the source repository into a pack in the cloned repository. `--no-single-branch` is given to fetch the histories near the tips of all branches. +--shallow-since=:: + Create a shallow clone

[PATCH V4 1/2] glossary: define the term shallow clone

2015-12-29 Thread Stephen P. Smith
There are several places in the documentation that the term shallow clone is used. Defining the term enables its use elsewhere with a known definition. Signed-off-by: Stephen P. Smith --- Notes: The review comments for the user guide update[1] suggested a change in the definition of a

[PATCH 18/20] clone: define shallow clone boundary with --not

2015-12-29 Thread Nguyễn Thái Ngọc Duy
/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -195,6 +195,11 @@ objects from the source repository into a pack in the cloned repository. --since=:: Create a 'shallow' clone with a history after the specified time. +--not=:: + Create a 'shallow'

[PATCH 13/20] clone: define shallow clone boundary based on time with --since

2015-12-29 Thread Nguyễn Thái Ngọc Duy
/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -192,6 +192,9 @@ objects from the source repository into a pack in the cloned repository. Create a 'shallow' clone with a history truncated to the specified number of revisions. +--since=:: + Create a '

[PATCH V3 1/2] glossary: define the term shallow clone

2015-12-22 Thread Stephen P. Smith
There are several places in the documentation that the term shallow clone is used. Defining the term enables its use elsewhere with a known definition. Signed-off-by: Stephen P. Smith --- Documentation/glossary-content.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation

[PATCH V2 1/2] glossary: define the term shallow clone

2015-12-22 Thread Stephen P. Smith
There are several places in the documentation that the term shallow clone is used. Defining the term enables its use elsewhere with a known definition. --- Documentation/glossary-content.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/glossary-content.txt b

Re: [PATCH 1/2] Define the term shallow clone.

2015-12-21 Thread Eric Sunshine
On Mon, Dec 21, 2015 at 9:09 PM, Stephen P. Smith wrote: > There are several places in the documentation that > the term shallow clone is used. Defining the term > enables its use elsewhere with a known definition. > > Signed-off-by: Stephen P. Smith > --- > diff --git a/D

[PATCH 1/2] Define the term shallow clone.

2015-12-21 Thread Stephen P. Smith
There are several places in the documentation that the term shallow clone is used. Defining the term enables its use elsewhere with a known definition. Signed-off-by: Stephen P. Smith --- Documentation/glossary-content.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation

Re: Multiple fetches when unshallowing a shallow clone

2015-12-07 Thread Jeff King
On Mon, Dec 07, 2015 at 01:27:51PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > I think one thing I was missing is that we need to just grab the > > _object_, but we need to realize that the ref needs updating[1]. So we > > cannot skip backfill of any tag that we do not already have, e

Re: Multiple fetches when unshallowing a shallow clone

2015-12-07 Thread Junio C Hamano
Jeff King writes: > I think one thing I was missing is that we need to just grab the > _object_, but we need to realize that the ref needs updating[1]. So we > cannot skip backfill of any tag that we do not already have, even if we > already have the tag object. > ... > [1] I'm still puzzled why

Re: Multiple fetches when unshallowing a shallow clone

2015-12-07 Thread Duy Nguyen
On Mon, Dec 7, 2015 at 8:57 PM, Jason Paller-Rzepka wrote: > Duy, you mentioned that depth=0 means "do not change depth". I assume that > means the server should use exactly the shallows that the client sent, and > it does not need to traverse the tree or modify the shallow or unshallow > sets at

Re: Multiple fetches when unshallowing a shallow clone

2015-12-07 Thread Jason Paller-Rzepka
I should point out that I never saw a "deepen 0" line. Rather, I saw git send "option depth 0" to the remote helper. Duy, you mentioned that depth=0 means "do not change depth". I assume that means the server should use exactly the shallows that the client sent, and it does not need to traverse t

Re: Multiple fetches when unshallowing a shallow clone

2015-12-06 Thread Duy Nguyen
On Sun, Dec 6, 2015 at 8:01 AM, Jeff King wrote: > On Sun, Dec 06, 2015 at 01:37:18AM -0500, Jeff King wrote: > >> And indeed, replacing the logic with what I wrote does make the backfill >> go away in my test case. But it's so far from what is there that I feel >> like I must be missing something

Re: Multiple fetches when unshallowing a shallow clone

2015-12-05 Thread Jeff King
On Sun, Dec 06, 2015 at 01:37:18AM -0500, Jeff King wrote: > And indeed, replacing the logic with what I wrote does make the backfill > go away in my test case. But it's so far from what is there that I feel > like I must be missing something. I think one thing I was missing is that we need to ju

Re: Multiple fetches when unshallowing a shallow clone

2015-12-05 Thread Jeff King
On Sat, Dec 05, 2015 at 08:00:28PM -0800, Junio C Hamano wrote: > > I suppose followtags feature has been around long enough that we can > > simply trust that and skip the second fetch? > > H, I wonder why the code needs the backfill fetch while talking > to a server that has the include-tag

Re: Multiple fetches when unshallowing a shallow clone

2015-12-05 Thread Junio C Hamano
Duy Nguyen writes: > On Fri, Dec 4, 2015 at 11:45 PM, Junio C Hamano wrote: > ... >> just like a regular fetch that auto-follows tags, where it has to >> make a second fetch if the primary fetch fails to include everything >> that is needed for propagating the tag for whatever reason. >> >> Havi

Re: Multiple fetches when unshallowing a shallow clone

2015-12-04 Thread Duy Nguyen
On Fri, Dec 4, 2015 at 11:45 PM, Junio C Hamano wrote: > Jeff King writes: > >>> But why would fetching a tag (or set of tags) merit a depth of zero? >>> Doesn't depth 1 mean "give me the the objects, and none of their >>> descendants"? Why use 0? >> >> That comes from this line: >> >> transpo

Re: Multiple fetches when unshallowing a shallow clone

2015-12-04 Thread Junio C Hamano
Jeff King writes: >> But why would fetching a tag (or set of tags) merit a depth of zero? >> Doesn't depth 1 mean "give me the the objects, and none of their >> descendants"? Why use 0? > > That comes from this line: > > transport_set_option(transport, TRANS_OPT_DEPTH, "0"); > > That line blam

Re: Multiple fetches when unshallowing a shallow clone

2015-12-04 Thread Jeff King
clone --bare git://github.com/git/git src.git # do this for each test run rm -rf repo git clone --no-local --depth=1 src.git repo cd repo echo "==> unshallow" && git fetch --progress --unshallow 2>&1 | grep remote And you can see that there are two separate secti

Re: Multiple fetches when unshallowing a shallow clone

2015-12-04 Thread Junio C Hamano
Jeff King writes: > This seems to reproduce consistently for me: > > $ git clone --depth=1 git://github.com/git/git > Cloning into 'git'... > remote: Counting objects: 2925, done. > remote: Compressing objects: 100% (2602/2602), done. > remote: Total 2925 (delta 230), reused 2329 (delta

Re: Multiple fetches when unshallowing a shallow clone

2015-12-04 Thread Jeff King
On Fri, Dec 04, 2015 at 04:38:16PM -0500, Jason Paller-Rzepka wrote: > It appears that it happens when the shallow history grows to include a > commit that's pointed to by a previously unseen tag. For example, > when I deepen a checkout of git to depth 8, I hit v2.5.2, and a second > fetch takes

Re: Multiple fetches when unshallowing a shallow clone

2015-12-04 Thread Stefan Beller
I can reproduce it now. Instead of using my $random version, I just needed origin/master to reproduce. The second fetch is invoked via (as outputted via GIT_TRACE=1 git -C git fetch --depth=8) 13:44:56.863841 run-command.c:343 trace: run_command: 'fetch-pack' '--stateless-rpc' '--stdin' '--

Re: Multiple fetches when unshallowing a shallow clone

2015-12-04 Thread Jason Paller-Rzepka
2015 at 11:35 AM, Jason Paller-Rzepka >> wrote: >> > Hi all, >> > >> > Would anyone be willing to help me understand some shallow-clone >> > behavior? (I found a bug in Dulwich, and I'm looking for some context >> > so I can determine how to fix i

Re: Multiple fetches when unshallowing a shallow clone

2015-12-04 Thread Stefan Beller
On Fri, Dec 4, 2015 at 1:27 PM, Jeff King wrote: >> >> and could not see a second fetch, but only a >> fetch-pack with --depth=2147483647 > > This seems to reproduce consistently for me: > > $ git clone --depth=1 git://github.com/git/git I used the http protocol, so I guess that's the differenc

Re: Multiple fetches when unshallowing a shallow clone

2015-12-04 Thread Jeff King
On Fri, Dec 04, 2015 at 12:46:59PM -0800, Stefan Beller wrote: > On Mon, Nov 30, 2015 at 11:35 AM, Jason Paller-Rzepka > wrote: > > Hi all, > > > > Would anyone be willing to help me understand some shallow-clone > > behavior? (I found a bug in Dulwich, and I'

Re: Multiple fetches when unshallowing a shallow clone

2015-12-04 Thread Stefan Beller
On Mon, Nov 30, 2015 at 11:35 AM, Jason Paller-Rzepka wrote: > Hi all, > > Would anyone be willing to help me understand some shallow-clone > behavior? (I found a bug in Dulwich, and I'm looking for some context > so I can determine how to fix it.) > > I learned that c

Multiple fetches when unshallowing a shallow clone

2015-11-30 Thread Jason Paller-Rzepka
Hi all, Would anyone be willing to help me understand some shallow-clone behavior? (I found a bug in Dulwich, and I'm looking for some context so I can determine how to fix it.) I learned that cgit sometimes performs two fetches for a `git fetch --unshallow`: one with depth 'infini

Re: git clone --depth: shallow clone problems

2015-05-29 Thread Junio C Hamano
ll existing refs have the same history as the ones from the > source repository. If the source repository is complete, this removes > all limitations imposed by shallow repositories. OK, I can understand that description a lot easier than the original one. >>> ++ >>&g

Re: git clone --depth: shallow clone problems

2015-05-29 Thread Duy Nguyen
the new paragraph above already covers this case too. >> ++ >> +Note that if the repository is created with --single-branch, which is >> +default for a shallow clone, only one ref is completed. `--unshallow` >> +does not fetch all remaining refs from source repository. >

Re: git clone --depth: shallow clone problems

2015-05-26 Thread Junio C Hamano
s of current repository have the same history as in > +the source repository. Makes sense, modulo "so that the all existing refs" sounds strange to my ears ("all the existing refs" perhaps). > ++ > +Note that if the repository is created with --single-branch, which

Re: git clone --depth: shallow clone problems

2015-05-26 Thread Duy Nguyen
> look into it. > We are a small branch of a bigger company and our connection to the > company's source servers is really slow, so just to quickly start it > up, I decided to take a shallow clone (that's what it is for, right?). > After a while we realized, the clone I have m

git clone --depth: shallow clone problems

2015-04-23 Thread Michal Pomorski
x27;s source servers is really slow, so just to quickly start it up, I decided to take a shallow clone (that's what it is for, right?). After a while we realized, the clone I have made was not sufficient and was missing some newest work done on the project. I did "git fetch --unshallow&

Re: How to repair a shallow clone (?)

2014-12-07 Thread Torsten Bögershausen
On 2014-12-07 12.44, Duy Nguyen wrote: >> Is this a known issue/problem ? > > No. > Thanks everybody for the support. The machine was equipped with git version 1.7.10.4 in /usr/bin. I installed 2.1 or so under /usr/local/bin, (and even /root/bin) thinking that this would help, but it didn't.

Re: How to repair a shallow clone (?)

2014-12-07 Thread Duy Nguyen
On Sat, Dec 6, 2014 at 7:23 PM, Torsten Bögershausen wrote: > I share a bare repo with Sparkleshare which does an auto-synch. > Now the synch had stopped, and trying to push to the central repo > by hand gives this: > > > > git push origin master > fatal: protocol error: expected old/new/ref, got

Re: How to repair a shallow clone (?)

2014-12-07 Thread Philip Oakley
Since v1.9.0 (14 Feb '14.) you can do various push/pull from a shallow clone (I'd asked this way back http://stackoverflow.com/questions/6900103/why-cant-i-push-from-a-shallow-clone and noted when it was corrected/improved) That's not to say that you don't have to take care ab

Re: How to repair a shallow clone (?)

2014-12-06 Thread Trần Ngọc Quân
On 06/12/2014 19:23, Torsten Bögershausen wrote: > I think I started to clone the repo in a shallow way > (SparkleShare asked if I want to clone the complete history, > and I probably answered "no" ) > > Is there a way to repair this situation ? > (Except doing a complete re-clone ?) > I think git

How to repair a shallow clone (?)

2014-12-06 Thread Torsten Bögershausen
I share a bare repo with Sparkleshare which does an auto-synch. Now the synch had stopped, and trying to push to the central repo by hand gives this: git push origin master fatal: protocol error: expected old/new/ref, got 'shallow 72fb4080921221293e28a97a0e8c78d6100c5186' fatal: The remote end

[PATCH/RFC v2 2/2] submodule: modify clone command to recursively shallow clone submodules

2014-09-15 Thread Cole Minnaar
pack in the cloned repository. --depth :: Create a 'shallow' clone with a history truncated to the - specified number of revisions. + specified number of revisions. If `--recursive` was also specified + the depth value will be passed to all submodules with

[PATCH/RFC 2/2] submodule: modify clone command to recursively shallow clone submodules

2014-09-14 Thread Cole Minnaar
pack in the cloned repository. --depth :: Create a 'shallow' clone with a history truncated to the - specified number of revisions. + specified number of revisions. If `--recursive` was also specified, + the depth value will be passed to all submodules with

Re: Shallow clone

2014-08-19 Thread Duy Nguyen
On Tue, Aug 19, 2014 at 6:11 PM, Steven Evergreen wrote: > Hi, everyone. I'm trying to perform a shallow clone with visibility of > all remote branches. > > git clone REPO --depth 1 --no-single-branch > > is consistently giving me > > Cloning into 'REPONAME

Fwd: Shallow clone

2014-08-19 Thread Steven Evergreen
Hi, everyone. I'm trying to perform a shallow clone with visibility of all remote branches. git clone REPO --depth 1 --no-single-branch is consistently giving me Cloning into 'REPONAME'... fatal: (null) is unknown object remote: Total 0 (delta 0), reused 0 (delta 0) fatal: recurs

Re: Bug in shallow clone?

2014-05-28 Thread Dennis Kaarsemaker
On wo, 2014-05-28 at 21:16 +0700, Duy Nguyen wrote: > On Wed, May 28, 2014 at 9:02 PM, Thomas Kieffer wrote: > > I then clone the bare repository with --depth 1. > > > > git clone file:///path/to/bare.git ./clone --depth 1 > > > > It always returns the last two commits. If I specify --depth 2 it r

Re: Bug in shallow clone?

2014-05-28 Thread Duy Nguyen
On Wed, May 28, 2014 at 9:02 PM, Thomas Kieffer wrote: > I then clone the bare repository with --depth 1. > > git clone file:///path/to/bare.git ./clone --depth 1 > > It always returns the last two commits. If I specify --depth 2 it returns > the last 3 commits. > > If I use --depth 1 on a Github

Bug in shallow clone?

2014-05-28 Thread Thomas Kieffer
Hi there Git developers, I'm not sure if I found a bug in the command git clone repo.git cloned_repo --depth 1 I follow these steps: git init echo "First commit" >> test.txt git add -A git commit -am "First commit" echo "Second commit" >> test.txt git commit -am "Second commit" echo "Third c

[PATCH v4 28/28] git-clone.txt: remove shallow clone limitations

2013-12-05 Thread Nguyễn Thái Ngọc Duy
Now that git supports data transfer from or to a shallow clone, these limitations are not true anymore. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-clone.txt | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Documentation/git-clone.txt b/Documentation/git

[PATCH v4 24/28] receive-pack: support pushing to a shallow clone via http

2013-12-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/receive-pack.c | 3 --- t/t5537-push-shallow.sh | 35 +++ 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 5c85bb4..78fe8ee 100644 --- a/builtin/r

[PATCH v4 25/28] send-pack: support pushing from a shallow clone via http

2013-12-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/send-pack.c | 3 --- send-pack.c | 19 +-- t/t5537-push-shallow.sh | 25 + 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/builtin/send-pack.c b/builtin/send-pack.c index 664dd

[PATCH v4 21/28] send-pack: support pushing to a shallow clone

2013-12-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/send-pack.c | 4 +++- t/t5537-push-shallow.sh | 38 ++ transport.c | 5 ++--- 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/builtin/send-pack.c b/builtin/send-pack.c index ea2ab

[PATCH v4 17/28] receive/send-pack: support pushing from a shallow clone

2013-12-05 Thread Nguyễn Thái Ngọc Duy
+ if (!args->dry_run) + advertise_shallow_grafts(out); + /* * Finally, tell the other end! */ diff --git a/t/t5537-push-shallow.sh b/t/t5537-push-shallow.sh new file mode 100755 index 000..650c31a --- /dev/null +++ b/t/t5537-push-shallow.sh @@ -

[PATCH v4 00/28] First class shallow clone

2013-12-05 Thread Nguyễn Thái Ngọc Duy
ry fetch: support fetching from a shallow repository upload-pack: make sure deepening preserves shallow roots fetch: add --update-shallow to accept refs that update .git/shallow receive-pack: reorder some code in unpack() receive/send-pack: support pushing from a shallow clone New var GIT_

Re: [PATCH v3 17/28] Support pushing from a shallow clone

2013-11-26 Thread Eric Sunshine
On Sun, Nov 24, 2013 at 10:55 PM, Nguyễn Thái Ngọc Duy wrote: > Pushing from a shallow clone using today's send-pack and receive-pack > may work, if the transferred pack does not end up at any graft > points. If it does, recent receive-pack that does connectivity check > will re

[PATCH v3 26/28] git-clone.txt: remove shallow clone limitations

2013-11-24 Thread Nguyễn Thái Ngọc Duy
Now that git supports push/pull from/to a shallow clone, these limitations are not true anymore. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-clone.txt | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Documentation/git-clone.txt b/Documentation/git

[PATCH v3 24/28] receive-pack: support pushing to a shallow clone via http

2013-11-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/receive-pack.c | 3 --- t/t5537-push-shallow.sh | 35 +++ 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 366ecde..ec681ba 100644 --- a/builtin/

[PATCH v3 21/28] send-pack: support pushing to a shallow clone

2013-11-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/send-pack.c | 5 - t/t5537-push-shallow.sh | 38 ++ transport.c | 5 ++--- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/builtin/send-pack.c b/builtin/send-pack.c index 5db

[PATCH v3 25/28] send-pack: support pushing from a shallow clone via http

2013-11-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/send-pack.c | 3 --- send-pack.c | 19 +-- t/t5537-push-shallow.sh | 25 + 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/builtin/send-pack.c b/builtin/send-pack.c index 0031

[PATCH v3 17/28] Support pushing from a shallow clone

2013-11-24 Thread Nguyễn Thái Ngọc Duy
Pushing from a shallow clone using today's send-pack and receive-pack may work, if the transferred pack does not end up at any graft points. If it does, recent receive-pack that does connectivity check will reject the push. If receive-pack is old and does not have the connectivity check

[PATCH v3 00/28] First class shallow clone

2013-11-24 Thread Nguyễn Thái Ngọc Duy
fetch: add --update-shallow to get refs that require updating .git/shallow Basic shallow fetch/clone support on git protocol receive-pack: reorder some code in unpack() Support pushing from a shallow clone New var GIT_SHALLOW_FILE to propagate --shallow-file to subprocesses connected.c:

Re: [Bug] git show crashes with deepened shallow clone

2013-09-25 Thread Jonathan Nieder
Stefan Näwe wrote: > Stefan Näwe atlas-elektronik.com> writes: >> 6035d6aad8ca11954c0d7821f6f3e7c047039c8f is the first bad commit > > And to answer myself once more: > > That's fixed in > >6da8bdc fetch-pack: do not remove .git/shallow file when --depth is not > specified" > > Sorry for all

Re: [Bug] git show crashes with deepened shallow clone

2013-09-25 Thread Stefan Näwe
Stefan Näwe atlas-elektronik.com> writes: > Am 25.09.2013 16:47, schrieb Stefan Näwe: > This is what it gives me if I use my script (slightly modified > to also run make) with 'git bisect run': > > 6035d6aad8ca11954c0d7821f6f3e7c047039c8f is the first bad commit And to answer myself once more:

Re: [Bug] git show crashes with deepened shallow clone

2013-09-25 Thread Stefan Näwe
Am 25.09.2013 16:47, schrieb Stefan Näwe: > Just a quick report since I don't have time to bisect now (will do later > if no other gitster is faster...) I'd marry 'git bisect' if I wasn't already... ;-) This is what it gives me if I use my script (slightly modified to also run make) with 'git bis

Re: [Bug] git show crashes with deepened shallow clone

2013-09-25 Thread Stefan Näwe
Am 25.09.2013 16:47, schrieb Stefan Näwe: > Just a quick report since I don't have time to bisect now (will do later > if no other gitster is faster...) Seems to be somewhere between v1.8.3.1 (OK) and v1.8.3.2 (not OK) !! > > When I execute the below script 'git show' crashes. 'git log --onelin

  1   2   >