{"thread":{"id":"34256","subject":"[RFC] [submodule] Add depth to submodule update","startedAt":"2013-06-23T08:04:58Z","lastAt":"2013-06-30T19:17:48Z","messageCount":14,"participants":["Fredrik Gustafsson","Junio C Hamano","Heiko Voigt","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"221710","messageId":"1371974698-28685-1-git-send-email-iveqy@iveqy.com","threadId":"34256","inReplyTo":null,"subject":"[RFC] [submodule] Add depth to submodule update","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2013-06-23T08:04:58Z","receivedAt":"2013-06-23T08:04:58Z","isPatch":false,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"Used only when a clone is initialized. This is useful when the submodule(s)\nare huge and you're not really interested in anything but the latest commit.\n\nSigned-off-by: Fredrik Gustafsson <iveqy@iveqy.com>\n---\n git-submodule.sh | 13 +++++++++++--\n 1 file changed, 11 insertions(+), 2 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 79bfaac..b102fa8 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -211,12 +211,18 @@ module_clone()\n \tname=$2\n \turl=$3\n \treference=\"$4\"\n+\tdepth=$5\n \tquiet=\n \tif test -n \"$GIT_QUIET\"\n \tthen\n \t\tquiet=-q\n \tfi\n \n+\tif test -n \"$depth\"\n+\tthen\n+\t\tdepth=\"--depth=$depth\"\n+\tfi\n+\n \tgitdir=\n \tgitdir_base=\n \tbase_name=$(dirname \"$name\")\n@@ -233,7 +239,7 @@ module_clone()\n \t\tmkdir -p \"$gitdir_base\"\n \t\t(\n \t\t\tclear_local_git_env\n-\t\t\tgit clone $quiet -n ${reference:+\"$reference\"} \\\n+\t\t\tgit clone $quiet $depth -n ${reference:+\"$reference\"} \\\n \t\t\t\t--separate-git-dir \"$gitdir\" \"$url\" \"$sm_path\"\n \t\t) ||\n \t\tdie \"$(eval_gettext \"Clone of '\\$url' into submodule path '\\$sm_path' failed\")\"\n@@ -676,6 +682,9 @@ cmd_update()\n \t\t--checkout)\n \t\t\tupdate=\"checkout\"\n \t\t\t;;\n+\t\t--depth)\n+\t\t\tdepth=$2\n+\t\t\t;;\n \t\t--)\n \t\t\tshift\n \t\t\tbreak\n@@ -735,7 +744,7 @@ Maybe you want to use 'update --init'?\")\"\n \n \t\tif ! test -d \"$sm_path\"/.git -o -f \"$sm_path\"/.git\n \t\tthen\n-\t\t\tmodule_clone \"$sm_path\" \"$name\" \"$url\" \"$reference\" || exit\n+\t\t\tmodule_clone \"$sm_path\" \"$name\" \"$url\" \"$reference\" \"$depth\" || exit\n \t\t\tcloned_modules=\"$cloned_modules;$name\"\n \t\t\tsubsha1=\n \t\telse\n-- \n1.8.0\n"},{"id":"221897","messageId":"20130624224925.GC32270@paksenarrion.iveqy.com","threadId":"34256","inReplyTo":"1371974698-28685-1-git-send-email-iveqy@iveqy.com","subject":"[PATCH] [submodule] Add depth to submodule update","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2013-06-24T22:49:25Z","receivedAt":"2013-06-24T22:49:25Z","isPatch":true,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"Used only when a clone is initialized. This is useful when the submodule(s)\nare huge and you're not really interested in anything but the latest commit.\n\nSigned-off-by: Fredrik Gustafsson <iveqy@iveqy.com>\n---\n git-submodule.sh | 13 +++++++++++--\n 1 file changed, 11 insertions(+), 2 deletions(-)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 79bfaac..b102fa8 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -211,12 +211,18 @@ module_clone()\n \tname=$2\n \turl=$3\n \treference=\"$4\"\n+\tdepth=$5\n \tquiet=\n \tif test -n \"$GIT_QUIET\"\n \tthen\n \t\tquiet=-q\n \tfi\n\n+\tif test -n \"$depth\"\n+\tthen\n+\t\tdepth=\"--depth=$depth\"\n+\tfi\n+\n \tgitdir=\n \tgitdir_base=\n \tbase_name=$(dirname \"$name\")\n@@ -233,7 +239,7 @@ module_clone()\n \t\tmkdir -p \"$gitdir_base\"\n \t\t(\n \t\t\tclear_local_git_env\n-\t\t\tgit clone $quiet -n ${reference:+\"$reference\"} \\\n+\t\t\tgit clone $quiet $depth -n ${reference:+\"$reference\"} \\\n \t\t\t\t--separate-git-dir \"$gitdir\" \"$url\" \"$sm_path\"\n \t\t) ||\n \t\tdie \"$(eval_gettext \"Clone of '\\$url' into submodule path '\\$sm_path' failed\")\"\n@@ -676,6 +682,9 @@ cmd_update()\n \t\t--checkout)\n \t\t\tupdate=\"checkout\"\n \t\t\t;;\n+\t\t--depth)\n+\t\t\tdepth=$2\n+\t\t\t;;\n \t\t--)\n \t\t\tshift\n \t\t\tbreak\n@@ -735,7 +744,7 @@ Maybe you want to use 'update --init'?\")\"\n\n \t\tif ! test -d \"$sm_path\"/.git -o -f \"$sm_path\"/.git\n \t\tthen\n-\t\t\tmodule_clone \"$sm_path\" \"$name\" \"$url\" \"$reference\" || exit\n+\t\t\tmodule_clone \"$sm_path\" \"$name\" \"$url\" \"$reference\" \"$depth\" || exit\n \t\t\tcloned_modules=\"$cloned_modules;$name\"\n \t\t\tsubsha1=\n \t\telse\n--\n1.8.0\n\n\n-- \nMed vänliga hälsningar\nFredrik Gustafsson\n\ntel: 0733-608274\ne-post: iveqy@iveqy.com\n"},{"id":"221922","messageId":"7vtxkm4w2c.fsf@alter.siamese.dyndns.org","threadId":"34256","inReplyTo":"20130624224925.GC32270@paksenarrion.iveqy.com","subject":"Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-25T05:07:55Z","receivedAt":"2013-06-25T05:07:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Summoning area experts ;-)\n\nThanks.\n\nFredrik Gustafsson <iveqy@iveqy.com> writes:\n\n> Used only when a clone is initialized. This is useful when the submodule(s)\n> are huge and you're not really interested in anything but the latest commit.\n>\n> Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>\n> ---\n>  git-submodule.sh | 13 +++++++++++--\n>  1 file changed, 11 insertions(+), 2 deletions(-)\n>\n> diff --git a/git-submodule.sh b/git-submodule.sh\n> index 79bfaac..b102fa8 100755\n> --- a/git-submodule.sh\n> +++ b/git-submodule.sh\n> @@ -211,12 +211,18 @@ module_clone()\n>  \tname=$2\n>  \turl=$3\n>  \treference=\"$4\"\n> +\tdepth=$5\n>  \tquiet=\n>  \tif test -n \"$GIT_QUIET\"\n>  \tthen\n>  \t\tquiet=-q\n>  \tfi\n>\n> +\tif test -n \"$depth\"\n> +\tthen\n> +\t\tdepth=\"--depth=$depth\"\n> +\tfi\n> +\n>  \tgitdir=\n>  \tgitdir_base=\n>  \tbase_name=$(dirname \"$name\")\n> @@ -233,7 +239,7 @@ module_clone()\n>  \t\tmkdir -p \"$gitdir_base\"\n>  \t\t(\n>  \t\t\tclear_local_git_env\n> -\t\t\tgit clone $quiet -n ${reference:+\"$reference\"} \\\n> +\t\t\tgit clone $quiet $depth -n ${reference:+\"$reference\"} \\\n>  \t\t\t\t--separate-git-dir \"$gitdir\" \"$url\" \"$sm_path\"\n>  \t\t) ||\n>  \t\tdie \"$(eval_gettext \"Clone of '\\$url' into submodule path '\\$sm_path' failed\")\"\n> @@ -676,6 +682,9 @@ cmd_update()\n>  \t\t--checkout)\n>  \t\t\tupdate=\"checkout\"\n>  \t\t\t;;\n> +\t\t--depth)\n> +\t\t\tdepth=$2\n> +\t\t\t;;\n>  \t\t--)\n>  \t\t\tshift\n>  \t\t\tbreak\n> @@ -735,7 +744,7 @@ Maybe you want to use 'update --init'?\")\"\n>\n>  \t\tif ! test -d \"$sm_path\"/.git -o -f \"$sm_path\"/.git\n>  \t\tthen\n> -\t\t\tmodule_clone \"$sm_path\" \"$name\" \"$url\" \"$reference\" || exit\n> +\t\t\tmodule_clone \"$sm_path\" \"$name\" \"$url\" \"$reference\" \"$depth\" || exit\n>  \t\t\tcloned_modules=\"$cloned_modules;$name\"\n>  \t\t\tsubsha1=\n>  \t\telse\n> --\n> 1.8.0\n"},{"id":"221985","messageId":"20130625221132.GB4161@sandbox-ub","threadId":"34256","inReplyTo":"20130624224925.GC32270@paksenarrion.iveqy.com","subject":"Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2013-06-25T22:11:32Z","receivedAt":"2013-06-25T22:11:32Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"On Tue, Jun 25, 2013 at 12:49:25AM +0200, Fredrik Gustafsson wrote:\n> Used only when a clone is initialized. This is useful when the submodule(s)\n> are huge and you're not really interested in anything but the latest commit.\n> \n> Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>\n\nI this is a valid use case. But this option only makes sense when a\nsubmodule is newly cloned so I am not sure whether submodule update is\nthe correct place. Let me think about this a little more. Since we do\nnot have any extra command that initiates the clone this is probably the\nonly place we can put this option. But at the moment it does not feel\ncompletely right.\n\nApart from that the code looks good. If the user does a checkout of a\nrevision that was not fetched submodule update will error out the same\nway as if someone forgot to push his submodule changes. So that should\nnot be a problem.\n\nCheers Heiko\n"},{"id":"222022","messageId":"20130626160219.GC9141@paksenarrion.iveqy.com","threadId":"34256","inReplyTo":"20130625221132.GB4161@sandbox-ub","subject":"Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2013-06-26T16:02:19Z","receivedAt":"2013-06-26T16:02:19Z","isPatch":true,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"On Wed, Jun 26, 2013 at 12:11:32AM +0200, Heiko Voigt wrote:\n> On Tue, Jun 25, 2013 at 12:49:25AM +0200, Fredrik Gustafsson wrote:\n> > Used only when a clone is initialized. This is useful when the submodule(s)\n> > are huge and you're not really interested in anything but the latest commit.\n> > \n> > Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>\n> \n> I this is a valid use case. But this option only makes sense when a\n> submodule is newly cloned so I am not sure whether submodule update is\n> the correct place. Let me think about this a little more. Since we do\n> not have any extra command that initiates the clone this is probably the\n> only place we can put this option. But at the moment it does not feel\n> completely right.\n> \n> Apart from that the code looks good. If the user does a checkout of a\n> revision that was not fetched submodule update will error out the same\n> way as if someone forgot to push his submodule changes. So that should\n> not be a problem.\n> \n\nI agree and would love to say that I've a more beautiful solution, but\nI haven't.\n\nThe only other solution I can think about is to add a git submodule\nclone that will do only clones of non-cloned submodules.\n\nI'm no UI expert so I don't know what's best. Maybe that's more\nintuitive.\n\n-- \nMed vänliga hälsningar\nFredrik Gustafsson\n\ntel: 0733-608274\ne-post: iveqy@iveqy.com\n"},{"id":"222023","messageId":"7vli5wyhi7.fsf@alter.siamese.dyndns.org","threadId":"34256","inReplyTo":"20130625221132.GB4161@sandbox-ub","subject":"Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-26T16:16:32Z","receivedAt":"2013-06-26T16:16:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Heiko Voigt <hvoigt@hvoigt.net> writes:\n\n> On Tue, Jun 25, 2013 at 12:49:25AM +0200, Fredrik Gustafsson wrote:\n>> Used only when a clone is initialized. This is useful when the submodule(s)\n>> are huge and you're not really interested in anything but the latest commit.\n>> \n>> Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>\n>\n> I this is a valid use case. But this option only makes sense when a\n> submodule is newly cloned so I am not sure whether submodule update is\n> the correct place. Let me think about this a little more. Since we do\n> not have any extra command that initiates the clone this is probably the\n> only place we can put this option. But at the moment it does not feel\n> completely right.\n\nI could imagine why people would not want to truncate the history\nwhen they \"submodule update\" a submodule that has been already\ninitialized and cloned long time ago, but the new option is ignored\nin the patch for an already cloned module, so that is not a problem.\n\nThe only possible confusion factor I can see is that the option is\nignored silently, but I do not think it is a grave enough offence to\nerror out when the user says \"git submodule update --depth=N $path\"\nfor a submodule at $path that has already been cloned.  It may not\neven deserve a wraning, so in that sense the patch may be fine as-is.\n\n> Apart from that the code looks good. If the user does a checkout of a\n> revision that was not fetched submodule update will error out the same\n> way as if someone forgot to push his submodule changes. So that should\n> not be a problem.\n\nTrue.\n\nThanks.\n"},{"id":"222038","messageId":"7vli5wvb3n.fsf@alter.siamese.dyndns.org","threadId":"34256","inReplyTo":"20130626160219.GC9141@paksenarrion.iveqy.com","subject":"Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-26T21:03:08Z","receivedAt":"2013-06-26T21:03:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Fredrik Gustafsson <iveqy@iveqy.com> writes:\n\n> On Wed, Jun 26, 2013 at 12:11:32AM +0200, Heiko Voigt wrote:\n>> On Tue, Jun 25, 2013 at 12:49:25AM +0200, Fredrik Gustafsson wrote:\n>> > Used only when a clone is initialized. This is useful when the submodule(s)\n>> > are huge and you're not really interested in anything but the latest commit.\n>> > \n>> > Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>\n>> \n>> I this is a valid use case. But this option only makes sense when a\n>> submodule is newly cloned so I am not sure whether submodule update is\n>> the correct place. Let me think about this a little more. Since we do\n>> not have any extra command that initiates the clone this is probably the\n>> only place we can put this option. But at the moment it does not feel\n>> completely right.\n>> \n>> Apart from that the code looks good. If the user does a checkout of a\n>> revision that was not fetched submodule update will error out the same\n>> way as if someone forgot to push his submodule changes. So that should\n>> not be a problem.\n>\n> I agree and would love to say that I've a more beautiful solution, but\n> I haven't.\n>\n> The only other solution I can think about is to add a git\n> submodule clone that will do only clones of non-cloned submodules.\n\nThe \"update\" subcommand already has \"--init\" to do \"init && update\",\nand it would not complain if a given submodule is what you already\nhave shown interest in, so in that sense, I do not think what the\nposted patch does is too bad---if it is already cloned, it just\nignores the depth altogether and makes sure the repository is there.\nA separate \"submodule clone\" would only make it more cumbersome to\nuse, I suspect.\n\nSo let's queue the patch posted as-is for now; we can replace it\nwhen/if somebody smarter than those who have spoken so far comes up\na more elegant approach.\n\nThe patch seems to lack any test on its own, by the way.\n"},{"id":"222086","messageId":"51CC5235.6030908@web.de","threadId":"34256","inReplyTo":"7vli5wvb3n.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2013-06-27T14:54:45Z","receivedAt":"2013-06-27T14:54:45Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 26.06.2013 23:03, schrieb Junio C Hamano:\n> Fredrik Gustafsson <iveqy@iveqy.com> writes:\n> \n>> On Wed, Jun 26, 2013 at 12:11:32AM +0200, Heiko Voigt wrote:\n>>> On Tue, Jun 25, 2013 at 12:49:25AM +0200, Fredrik Gustafsson wrote:\n>>>> Used only when a clone is initialized. This is useful when the submodule(s)\n>>>> are huge and you're not really interested in anything but the latest commit.\n>>>>\n>>>> Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>\n>>>\n>>> I this is a valid use case. But this option only makes sense when a\n>>> submodule is newly cloned so I am not sure whether submodule update is\n>>> the correct place. Let me think about this a little more. Since we do\n>>> not have any extra command that initiates the clone this is probably the\n>>> only place we can put this option. But at the moment it does not feel\n>>> completely right.\n>>>\n>>> Apart from that the code looks good. If the user does a checkout of a\n>>> revision that was not fetched submodule update will error out the same\n>>> way as if someone forgot to push his submodule changes. So that should\n>>> not be a problem.\n>>\n>> I agree and would love to say that I've a more beautiful solution, but\n>> I haven't.\n>>\n>> The only other solution I can think about is to add a git\n>> submodule clone that will do only clones of non-cloned submodules.\n> \n> The \"update\" subcommand already has \"--init\" to do \"init && update\",\n> and it would not complain if a given submodule is what you already\n> have shown interest in, so in that sense, I do not think what the\n> posted patch does is too bad---if it is already cloned, it just\n> ignores the depth altogether and makes sure the repository is there.\n> A separate \"submodule clone\" would only make it more cumbersome to\n> use, I suspect.\n\nYup, I see no need for a new command either.\n\nMe too thinks adding \"--depth\" to \"update\" makes sense (and I don't\nthink that this pretty generic name will become a problem later in\ncase someone wants to add a maximum recursion depth, as grep already\nuses \"--max-depth\" for the same purpose).\n\nBut \"--depth\" should also be added to the \"submodule add\" command.\nAs an example we already have the \"--reference\" option, which is\npassed to clone on add and update. Additionally that one supports\nthe form with and without '=', so I'd prefer the new update option\nto basically re-use the same code the reference option uses. And\nat least two tests, of course ;-)\n"},{"id":"222153","messageId":"20130628065001.GA2783@sandbox-ub","threadId":"34256","inReplyTo":"51CC5235.6030908@web.de","subject":"Re: Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2013-06-28T06:50:01Z","receivedAt":"2013-06-28T06:50:01Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"On Thu, Jun 27, 2013 at 04:54:45PM +0200, Jens Lehmann wrote:\n> Am 26.06.2013 23:03, schrieb Junio C Hamano:\n> > Fredrik Gustafsson <iveqy@iveqy.com> writes:\n> > \n> >> On Wed, Jun 26, 2013 at 12:11:32AM +0200, Heiko Voigt wrote:\n> >>> On Tue, Jun 25, 2013 at 12:49:25AM +0200, Fredrik Gustafsson wrote:\n> >>>> Used only when a clone is initialized. This is useful when the submodule(s)\n> >>>> are huge and you're not really interested in anything but the latest commit.\n> >>>>\n> >>>> Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>\n> >>>\n> >>> I this is a valid use case. But this option only makes sense when a\n> >>> submodule is newly cloned so I am not sure whether submodule update is\n> >>> the correct place. Let me think about this a little more. Since we do\n> >>> not have any extra command that initiates the clone this is probably the\n> >>> only place we can put this option. But at the moment it does not feel\n> >>> completely right.\n> >>>\n> >>> Apart from that the code looks good. If the user does a checkout of a\n> >>> revision that was not fetched submodule update will error out the same\n> >>> way as if someone forgot to push his submodule changes. So that should\n> >>> not be a problem.\n> >>\n> >> I agree and would love to say that I've a more beautiful solution, but\n> >> I haven't.\n> >>\n> >> The only other solution I can think about is to add a git\n> >> submodule clone that will do only clones of non-cloned submodules.\n> > \n> > The \"update\" subcommand already has \"--init\" to do \"init && update\",\n> > and it would not complain if a given submodule is what you already\n> > have shown interest in, so in that sense, I do not think what the\n> > posted patch does is too bad---if it is already cloned, it just\n> > ignores the depth altogether and makes sure the repository is there.\n> > A separate \"submodule clone\" would only make it more cumbersome to\n> > use, I suspect.\n> \n> Yup, I see no need for a new command either.\n\nI agree there is no reason for that.\n\n> Me too thinks adding \"--depth\" to \"update\" makes sense (and I don't\n> think that this pretty generic name will become a problem later in\n> case someone wants to add a maximum recursion depth, as grep already\n> uses \"--max-depth\" for the same purpose).\n\nHmm, but does it have a --depth option for revisions? Maybe we should\ncall it --clone-depth or --rev-depth to make it clear? --depth and\n--max-depth would be completely orthogonal but the name does not allow\nto distinguish them properly.\n\n> But \"--depth\" should also be added to the \"submodule add\" command.\n> As an example we already have the \"--reference\" option, which is\n> passed to clone on add and update. Additionally that one supports\n> the form with and without '=', so I'd prefer the new update option\n> to basically re-use the same code the reference option uses. And\n> at least two tests, of course ;-)\n\nAnd add documentation, please :-)\n\nCheers Heiko\n"},{"id":"222201","messageId":"7vk3lenkhh.fsf@alter.siamese.dyndns.org","threadId":"34256","inReplyTo":"20130628065001.GA2783@sandbox-ub","subject":"Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-28T18:44:26Z","receivedAt":"2013-06-28T18:44:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Heiko Voigt <hvoigt@hvoigt.net> writes:\n\n> On Thu, Jun 27, 2013 at 04:54:45PM +0200, Jens Lehmann wrote:\n> ...\n>> Me too thinks adding \"--depth\" to \"update\" makes sense (and I don't\n>> think that this pretty generic name will become a problem later in\n>> case someone wants to add a maximum recursion depth, as grep already\n>> uses \"--max-depth\" for the same purpose).\n>\n> Hmm, but does it have a --depth option for revisions? Maybe we should\n> call it --clone-depth or --rev-depth to make it clear? --depth and\n> --max-depth would be completely orthogonal but the name does not allow\n> to distinguish them properly.\n\nI do not have a strong opinion either way, but as you suggest, it\nmight be a good idea to call this new option --clone-depth to be\nmore specific.\n"},{"id":"222215","messageId":"51CDF819.9030308@web.de","threadId":"34256","inReplyTo":"7vk3lenkhh.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2013-06-28T20:54:49Z","receivedAt":"2013-06-28T20:54:49Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 28.06.2013 20:44, schrieb Junio C Hamano:\n> Heiko Voigt <hvoigt@hvoigt.net> writes:\n> \n>> On Thu, Jun 27, 2013 at 04:54:45PM +0200, Jens Lehmann wrote:\n>> ...\n>>> Me too thinks adding \"--depth\" to \"update\" makes sense (and I don't\n>>> think that this pretty generic name will become a problem later in\n>>> case someone wants to add a maximum recursion depth, as grep already\n>>> uses \"--max-depth\" for the same purpose).\n>>\n>> Hmm, but does it have a --depth option for revisions? Maybe we should\n>> call it --clone-depth or --rev-depth to make it clear? --depth and\n>> --max-depth would be completely orthogonal but the name does not allow\n>> to distinguish them properly.\n> \n> I do not have a strong opinion either way, but as you suggest, it\n> might be a good idea to call this new option --clone-depth to be\n> more specific.\n\nNo strong opinion here either, but I'm leaning towards \"--depth\"\nbecause on one hand we already have the \"--reference\" option which\nis passed on to the clone command (and not \"--clone-reference\") and\non the other hand I cannot see the need for yet another depth option\n(even my \"--max-depth\" example doesn't seem to be terribly useful).\nBut I might be wrong on the last one ;-)\n"},{"id":"222223","messageId":"7vr4fllugy.fsf@alter.siamese.dyndns.org","threadId":"34256","inReplyTo":"51CDF819.9030308@web.de","subject":"Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-28T22:51:41Z","receivedAt":"2013-06-28T22:51:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jens Lehmann <Jens.Lehmann@web.de> writes:\n\n> Am 28.06.2013 20:44, schrieb Junio C Hamano:\n>> Heiko Voigt <hvoigt@hvoigt.net> writes:\n>> ... \n>>> Hmm, but does it have a --depth option for revisions? Maybe we should\n>>> call it --clone-depth or --rev-depth to make it clear? --depth and\n>>> --max-depth would be completely orthogonal but the name does not allow\n>>> to distinguish them properly.\n>> \n>> I do not have a strong opinion either way, but as you suggest, it\n>> might be a good idea to call this new option --clone-depth to be\n>> more specific.\n>\n> No strong opinion here either, but I'm leaning towards \"--depth\"\n> because on one hand we already have the \"--reference\" option which\n> is passed on to the clone command (and not \"--clone-reference\")...\n\nOK, then \"--depth\" it is.\n\nThe points in your review on the last version with \"--depth\" (which\nI picked up and parked on 'pu') still need to be addressed, I think?\n"},{"id":"222224","messageId":"20130628230714.GA22143@paksenarrion.iveqy.com","threadId":"34256","inReplyTo":"7vr4fllugy.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Fredrik Gustafsson","fromEmail":"iveqy@iveqy.com","sentAt":"2013-06-28T23:07:14Z","receivedAt":"2013-06-28T23:07:14Z","isPatch":true,"sender":{"key":"iveqy@iveqy.com","avatar":"https://avatars.githubusercontent.com/u/761743?v=4"},"body":"On Fri, Jun 28, 2013 at 03:51:41PM -0700, Junio C Hamano wrote:\n> Jens Lehmann <Jens.Lehmann@web.de> writes:\n> \n> > Am 28.06.2013 20:44, schrieb Junio C Hamano:\n> >> Heiko Voigt <hvoigt@hvoigt.net> writes:\n> >> ... \n> >>> Hmm, but does it have a --depth option for revisions? Maybe we should\n> >>> call it --clone-depth or --rev-depth to make it clear? --depth and\n> >>> --max-depth would be completely orthogonal but the name does not allow\n> >>> to distinguish them properly.\n> >> \n> >> I do not have a strong opinion either way, but as you suggest, it\n> >> might be a good idea to call this new option --clone-depth to be\n> >> more specific.\n> >\n> > No strong opinion here either, but I'm leaning towards \"--depth\"\n> > because on one hand we already have the \"--reference\" option which\n> > is passed on to the clone command (and not \"--clone-reference\")...\n> \n> OK, then \"--depth\" it is.\n> \n> The points in your review on the last version with \"--depth\" (which\n> I picked up and parked on 'pu') still need to be addressed, I think?\n\nI agree, I'm on it\n\n-- \nMed vänliga hälsningar\nFredrik Gustafsson\n\ntel: 0733-608274\ne-post: iveqy@iveqy.com\n"},{"id":"222258","messageId":"7vli5rjtlv.fsf@alter.siamese.dyndns.org","threadId":"34256","inReplyTo":"20130628230714.GA22143@paksenarrion.iveqy.com","subject":"Re: [PATCH] [submodule] Add depth to submodule update","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-06-30T19:17:48Z","receivedAt":"2013-06-30T19:17:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Fredrik Gustafsson <iveqy@iveqy.com> writes:\n\n>> OK, then \"--depth\" it is.\n>> \n>> The points in your review on the last version with \"--depth\" (which\n>> I picked up and parked on 'pu') still need to be addressed, I think?\n>\n> I agree, I'm on it\n\nThanks.\n"}]}