{"thread":{"id":"12508","subject":"git clone -l","startedAt":"2008-03-05T00:03:38Z","lastAt":"2008-03-05T00:53:37Z","messageCount":4,"participants":["Daniel Barkalow","Junio C Hamano","Brandon Casey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"71013","messageId":"alpine.LNX.1.00.0803041900080.19665@iabervon.org","threadId":"12508","inReplyTo":null,"subject":"git clone -l","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-03-05T00:03:38Z","receivedAt":"2008-03-05T00:03:38Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"What, exactly, is -l supposed to do for clone? As far as I can tell, we \nautomatically do the local magic if we can. Would it be okay to make \n\"local\" default to \"if possible\", have \"-l\" mean error if not possible, \nand have \"--no-local\" able to avoid using local magic even if we could use \nit?\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"71016","messageId":"7vd4qa3t9t.fsf@gitster.siamese.dyndns.org","threadId":"12508","inReplyTo":"alpine.LNX.1.00.0803041900080.19665@iabervon.org","subject":"Re: git clone -l","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-05T00:32:14Z","receivedAt":"2008-03-05T00:32:14Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Barkalow <barkalow@iabervon.org> writes:\n\n> What, exactly, is -l supposed to do for clone? As far as I can tell, we \n> automatically do the local magic if we can. Would it be okay to make \n> \"local\" default to \"if possible\", have \"-l\" mean error if not possible, \n> and have \"--no-local\" able to avoid using local magic even if we could use \n> it?\n\nIt used to be that \"-l\" meant \"When it is local, use hardlink if possible\notherwise copy without complaining, as either are cheaper than the pack\npiped to unpack.\"  Lack of -l meant no local magic.\n\nRecently lack of -l stopped to mean \"no local magic\".  We still do the\nlocal magic, but we do not do hardlinks and instead do copies.  An \"-l\"\nthat asks clone across filesystems still falls back to copying but now\ngets a warning.  \"--no-hardlinks\" does not have any significance anymore,\nas that is what you would get for a local clone without -l.\n\nThe way to refuse local magic is to use file://$path/ explicitly; we do\nnot have --no-local.\n"},{"id":"71017","messageId":"alpine.LNX.1.00.0803041937110.19665@iabervon.org","threadId":"12508","inReplyTo":"7vd4qa3t9t.fsf@gitster.siamese.dyndns.org","subject":"Re: git clone -l","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-03-05T00:45:39Z","receivedAt":"2008-03-05T00:45:39Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 4 Mar 2008, Junio C Hamano wrote:\n\n> Daniel Barkalow <barkalow@iabervon.org> writes:\n> \n> > What, exactly, is -l supposed to do for clone? As far as I can tell, we \n> > automatically do the local magic if we can. Would it be okay to make \n> > \"local\" default to \"if possible\", have \"-l\" mean error if not possible, \n> > and have \"--no-local\" able to avoid using local magic even if we could use \n> > it?\n> \n> It used to be that \"-l\" meant \"When it is local, use hardlink if possible\n> otherwise copy without complaining, as either are cheaper than the pack\n> piped to unpack.\"  Lack of -l meant no local magic.\n> \n> Recently lack of -l stopped to mean \"no local magic\".  We still do the\n> local magic, but we do not do hardlinks and instead do copies.  An \"-l\"\n> that asks clone across filesystems still falls back to copying but now\n> gets a warning.  \"--no-hardlinks\" does not have any significance anymore,\n> as that is what you would get for a local clone without -l.\n> \n> The way to refuse local magic is to use file://$path/ explicitly; we do\n> not have --no-local.\n\nAh, okay. I was having a hard time getting the not-using-local-magic case \nto be clearly not using local magic, but I think that was confusion on my \npart. Also, it looks like we need a test that not using -l is equivalent \nto --no-hardlinks.\n\nWould it be okay to additionally block local magic, even with a local \npath, if \"--no-local\" is used? Using our parse-options code means \n--no-local is accepted anyway, and it's a bit confusing that it doesn't \nblock default local magic. (Obviously, this won't break anything, since \nold code wouldn't have accepted it.)\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"71018","messageId":"47CDEF11.8000807@nrlssc.navy.mil","threadId":"12508","inReplyTo":"7vd4qa3t9t.fsf@gitster.siamese.dyndns.org","subject":"Re: git clone -l","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-03-05T00:53:37Z","receivedAt":"2008-03-05T00:53:37Z","isPatch":false,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Junio C Hamano wrote:\n> Daniel Barkalow <barkalow@iabervon.org> writes:\n> \n>> What, exactly, is -l supposed to do for clone? As far as I can tell, we \n>> automatically do the local magic if we can. Would it be okay to make \n>> \"local\" default to \"if possible\", have \"-l\" mean error if not possible, \n>> and have \"--no-local\" able to avoid using local magic even if we could use \n>> it?\n> \n> It used to be that \"-l\" meant \"When it is local, use hardlink if possible\n> otherwise copy without complaining, as either are cheaper than the pack\n> piped to unpack.\"  Lack of -l meant no local magic.\n> \n> Recently lack of -l stopped to mean \"no local magic\".  We still do the\n> local magic, but we do not do hardlinks and instead do copies.  An \"-l\"\n> that asks clone across filesystems still falls back to copying but now\n> gets a warning.  \"--no-hardlinks\" does not have any significance anymore,\n> as that is what you would get for a local clone without -l.\n\nAre you sure?\nI thought this was changed by 3d5c418f so that hardlinking is done by default.\n\n  Lack of -l means \"do local magic and use hard links\".\n  Using -l makes git-clone print a warning when hard linking fails.\n  --no-hardlinks disables hard linking and still does local magic.\n\n-brandon\n\n"}]}