{"thread":{"id":"2290","subject":"git-pull - strange (copy/rename) messages ?!","startedAt":"2005-11-01T15:40:35Z","lastAt":"2005-11-02T00:35:31Z","messageCount":9,"participants":["Duncan Mac Leod","Linus Torvalds","Junio C Hamano","Daniel Barkalow","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"10928","messageId":"43678C73.1080601@excelsior-online.org","threadId":"2290","inReplyTo":null,"subject":"git-pull - strange (copy/rename) messages ?!","fromName":"Duncan Mac Leod","fromEmail":"duncan@excelsior-online.org","sentAt":"2005-11-01T15:40:35Z","receivedAt":"2005-11-01T15:40:35Z","isPatch":false,"sender":{"key":"duncan@excelsior-online.org","avatar":null},"body":"One Team-Member of our dev.-team has deleted one file called \nGraphics/PaletteGroups.cs in our shared git repository.\n\nAs I updated my working dir with git-pull I noticed some strange messages...\n\nWhat do these many copy and rename messages below the summary '14 files \nchanged, 933 insertions(+), 263 deletions(-)' mean ????\n\nUpdating from f0df62e7b60c468852d4617505876515f9b305d7 to \n8c18245869a9447329dedb4a4cd59d103ee6dbfe.\nFast forward\n  AssemblyInfo.cs                             |    2\n  BaseObjects/Modules.cs                      |  235 ++++++++\n  Graphics/PaletteCategories.cs               |   12\n  Plot/Dialogs/Dialog.cs                      |   12\n  Plot/Dialogs/DialogEntry.cs                 |   12\n  Plot/Dialogs/DialogSection.cs               |   14\n  Plot/Journals/Journal.cs                    |   12\n  Plot/Journals/JournalEntry.cs               |   12\n  Plot/Journals/JournalSection.cs             |   14\n  Runtime/CompilerServices/eScriptCompiler.cs |   12\n  Runtime/Scripting/Script.cs                 |   12\n  Runtime/Scripting/ScriptLibrary.cs          |   14\n  doc/excelsior_corelib.xml                   |  784 \n++++++++++++++++++++-------\n  excelsior_corelib.csproj                    |   49 ++\n  14 files changed, 933 insertions(+), 263 deletions(-)\n  copy Graphics/{PaletteGroups.cs => PaletteCategories.cs} (80%)\n  copy Graphics/PaletteGroups.cs => Plot/Dialogs/Dialog.cs (75%)\n  copy Graphics/PaletteGroups.cs => Plot/Dialogs/DialogEntry.cs (74%)\n  copy Graphics/PaletteGroups.cs => Plot/Dialogs/DialogSection.cs (64%)\n  copy Graphics/PaletteGroups.cs => Plot/Journals/Journal.cs (75%)\n  copy Graphics/PaletteGroups.cs => Plot/Journals/JournalEntry.cs (73%)\n  copy Graphics/PaletteGroups.cs => Plot/Journals/JournalSection.cs (64%)\n  copy Graphics/PaletteGroups.cs => \nRuntime/CompilerServices/eScriptCompiler.cs (74%)\n  copy Graphics/PaletteGroups.cs => Runtime/Scripting/Script.cs (75%)\n  rename Graphics/PaletteGroups.cs => Runtime/Scripting/ScriptLibrary.cs \n(64%)\n\nthx in advance,\nduncan\n"},{"id":"10930","messageId":"Pine.LNX.4.64.0511010801370.27915@g5.osdl.org","threadId":"2290","inReplyTo":"43678C73.1080601@excelsior-online.org","subject":"Re: git-pull - strange (copy/rename) messages ?!","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-11-01T16:10:53Z","receivedAt":"2005-11-01T16:10:53Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 1 Nov 2005, Duncan Mac Leod wrote:\n>\n> One Team-Member of our dev.-team has deleted one file called\n> Graphics/PaletteGroups.cs in our shared git repository.\n> \n> As I updated my working dir with git-pull I noticed some strange messages...\n> \n> What do these many copy and rename messages below the summary '14 files\n> changed, 933 insertions(+), 263 deletions(-)' mean ????\n\nFirst off, you should realize that whenever git says \"copy\" or \"rename\", \nit never actually tracked the data at that level. git itself never did a \ncopy or rename operation at all, it just tracked your data contents.\n\nHowever, the normal \"git pull\" will show purely for your edification what \ngit thinks the other end did to get to that data content. And it does so \nwith copy and rename detection enabled, so in this case it says:\n\n>  copy Graphics/{PaletteGroups.cs => PaletteCategories.cs} (80%)\n>  copy Graphics/PaletteGroups.cs => Plot/Dialogs/Dialog.cs (75%)\n>  copy Graphics/PaletteGroups.cs => Plot/Dialogs/DialogEntry.cs (74%)\n>  copy Graphics/PaletteGroups.cs => Plot/Dialogs/DialogSection.cs (64%)\n>  copy Graphics/PaletteGroups.cs => Plot/Journals/Journal.cs (75%)\n>  copy Graphics/PaletteGroups.cs => Plot/Journals/JournalEntry.cs (73%)\n>  copy Graphics/PaletteGroups.cs => Plot/Journals/JournalSection.cs (64%)\n>  copy Graphics/PaletteGroups.cs => Runtime/CompilerServices/eScriptCompiler.cs (74%)\n>  copy Graphics/PaletteGroups.cs => Runtime/Scripting/Script.cs (75%)\n>  rename Graphics/PaletteGroups.cs => Runtime/Scripting/ScriptLibrary.cs (64%)\n\nWhich means that git notices that there are a number of new files, and the \nnew files all bear a striking resemblance to one file that was deleted.\n\nSo it tells you that the new files are probably copies of the old one \n(with one final \"rename\", since the old file doesn't actually exist any \nmore).\n\nWhich may or may not be true, of course. But even if it's not \"true\", it's \nstill interesting information - it is a totally objective \"those new files \nlook like the old file\" thing. In other words, it tells you something \ntrue about the file contents.\n\nTo some degree it would be much more interesting to have \n\"--find-copies-harder\" enabled (which it isn't), which gives better copy \ninformation for new files (it also looks at _unchanged_ old files). \nHowever, that's prohibitively expensive for big projects, so it's not on \nby default.\n\nBtw, Junio, I thought \"git pull\" was only supposed to do rename \ndetection, not copy detection.\n\n\t\t\tLinus\n"},{"id":"10937","messageId":"7vbr149sbs.fsf@assigned-by-dhcp.cox.net","threadId":"2290","inReplyTo":"Pine.LNX.4.64.0511010801370.27915@g5.osdl.org","subject":"Re: git-pull - strange (copy/rename) messages ?!","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-01T17:43:51Z","receivedAt":"2005-11-01T17:43:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> Btw, Junio, I thought \"git pull\" was only supposed to do rename \n> detection, not copy detection.\n\nSorry, but what do you mean by \"only rename detection but not\ncopy detection\" in this case?\n\nWhen you have \"ce A B; ce A C; ce A D;... ; mv A Z\", (ce is like\ncp but \"copy+edit\") where B-Z are all new files and A disappears\nfrom the result, trying to detect renames would end up detecting\ncopies without extra processing; B through Z are rename\ndestination candidates, and A is a rename source candidate\n(there may be others), and it turns out that B-Z all look like\nA.\n\nWould it be easier to read if we say A was renamed to B, and A\nwas renamed to C, and A was renamed to D, ...?  I think the\ncurrent output is easier to understand than that.  B-Y gets\nlabelled as copy of A and Z gets labelled as rename.\n"},{"id":"10950","messageId":"Pine.LNX.4.64.0511011646070.25300@iabervon.org","threadId":"2290","inReplyTo":"7vbr149sbs.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-pull - strange (copy/rename) messages ?!","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2005-11-01T22:03:26Z","receivedAt":"2005-11-01T22:03:26Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 1 Nov 2005, Junio C Hamano wrote:\n\n> Linus Torvalds <torvalds@osdl.org> writes:\n> \n> > Btw, Junio, I thought \"git pull\" was only supposed to do rename \n> > detection, not copy detection.\n> \n> Sorry, but what do you mean by \"only rename detection but not\n> copy detection\" in this case?\n> \n> When you have \"ce A B; ce A C; ce A D;... ; mv A Z\", (ce is like\n> cp but \"copy+edit\") where B-Z are all new files and A disappears\n> from the result, trying to detect renames would end up detecting\n> copies without extra processing; B through Z are rename\n> destination candidates, and A is a rename source candidate\n> (there may be others), and it turns out that B-Z all look like\n> A.\n> \n> Would it be easier to read if we say A was renamed to B, and A\n> was renamed to C, and A was renamed to D, ...?  I think the\n> current output is easier to understand than that.  B-Y gets\n> labelled as copy of A and Z gets labelled as rename.\n\nI think it's more confusing for the system to report Z differently from \nother things, because there's nothing special about what it found, except \nthat Z happens to be last. I think it would be easiest to read as:\n\nRename A =>\n  B (80%)\n  C (85%)\n  D (75%)\n  ...\n  Z (90%)\n\n(Although I don't know if the results come out of the system sorted that \nway; obviously, if there are different removed things, mixing them \ntogether would be ambiguous in this format)\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"10958","messageId":"20051101230635.GA1431@pasky.or.cz","threadId":"2290","inReplyTo":"Pine.LNX.4.64.0511011646070.25300@iabervon.org","subject":"Re: git-pull - strange (copy/rename) messages ?!","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-01T23:06:35Z","receivedAt":"2005-11-01T23:06:35Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, Nov 01, 2005 at 11:03:26PM CET, I got a letter\nwhere Daniel Barkalow <barkalow@iabervon.org> told me that...\n> On Tue, 1 Nov 2005, Junio C Hamano wrote:\n> > Would it be easier to read if we say A was renamed to B, and A\n> > was renamed to C, and A was renamed to D, ...?  I think the\n> > current output is easier to understand than that.  B-Y gets\n> > labelled as copy of A and Z gets labelled as rename.\n> \n> I think it's more confusing for the system to report Z differently from \n> other things, because there's nothing special about what it found, except \n> that Z happens to be last.\n\nI agree, but I'd prefer it to be labelled as a copy+remove instead of a\nrename in case it is ambiguous. Just a simple rule - if the file was\nremoved and you get multiple rename candidates, mark all of them as\n'copy'.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"10960","messageId":"7vu0ew6jf3.fsf@assigned-by-dhcp.cox.net","threadId":"2290","inReplyTo":"Pine.LNX.4.64.0511011646070.25300@iabervon.org","subject":"Re: git-pull - strange (copy/rename) messages ?!","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-01T23:24:32Z","receivedAt":"2005-11-01T23:24:32Z","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> I think it's more confusing for the system to report Z differently from \n> other things, because there's nothing special about what it found, except \n> that Z happens to be last.\n\nWhat would we get for a simple \"mv A B and nothing else\" case if\nwe follow your proposal and Pasky's?  What about \"cp A B and\nnothing else\" case?\n"},{"id":"10964","messageId":"20051101233647.GC1431@pasky.or.cz","threadId":"2290","inReplyTo":"7vu0ew6jf3.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-pull - strange (copy/rename) messages ?!","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-01T23:36:47Z","receivedAt":"2005-11-01T23:36:47Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Wed, Nov 02, 2005 at 12:24:32AM CET, I got a letter\nwhere Junio C Hamano <junkio@cox.net> told me that...\n> Daniel Barkalow <barkalow@iabervon.org> writes:\n> \n> > I think it's more confusing for the system to report Z differently from \n> > other things, because there's nothing special about what it found, except \n> > that Z happens to be last.\n> \n> What would we get for a simple \"mv A B and nothing else\" case if\n> we follow your proposal and Pasky's?  What about \"cp A B and\n> nothing else\" case?\n\nIn case of my proposal, you get the mv and cp as usual, since there are\nno multiple rename candidates for A.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"10965","messageId":"Pine.LNX.4.64.0511011834050.25300@iabervon.org","threadId":"2290","inReplyTo":"7vu0ew6jf3.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-pull - strange (copy/rename) messages ?!","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2005-11-01T23:39:39Z","receivedAt":"2005-11-01T23:39:39Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 1 Nov 2005, Junio C Hamano wrote:\n\n> Daniel Barkalow <barkalow@iabervon.org> writes:\n> \n> > I think it's more confusing for the system to report Z differently from \n> > other things, because there's nothing special about what it found, except \n> > that Z happens to be last.\n> \n> What would we get for a simple \"mv A B and nothing else\" case if\n> we follow your proposal and Pasky's?  What about \"cp A B and\n> nothing else\" case?\n\nMy suggestion for \"mv A B\" would be:\n\nRename A\n  => B (n%)\n\nSame as the current thing, except with a line break and indentation before \nthe arrow.\n\nFor \"cp A B\":\n\nCopy A\n  => B (n%)\n\nI think the only difference should be the line with \"A\" on it, and the \ndifference should only depend on whether A still exists.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"10973","messageId":"7v8xw751kc.fsf@assigned-by-dhcp.cox.net","threadId":"2290","inReplyTo":"20051101233647.GC1431@pasky.or.cz","subject":"Re: git-pull - strange (copy/rename) messages ?!","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-02T00:35:31Z","receivedAt":"2005-11-02T00:35:31Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> In case of my proposal, you get the mv and cp as usual, since there are\n> no multiple rename candidates for A.\n\nI think showing things the Pasky way may be the easiest to\nunderstand for this particular case and for the simplest case.\nThe original one would become something like this:\n\ncopy Graphics/{PaletteGroups.cs => PaletteCategories.cs} (80%)\ncopy Graphics/PaletteGroups.cs => Plot/Dialogs/Dialog.cs (75%)\n...\ncopy Graphics/PaletteGroups.cs => Runtime/Scripting/Script.cs (75%)\ncopy Graphics/PaletteGroups.cs => Runtime/Scripting/ScriptLibrary.cs (64%)\ndelete Graphics/PaletteGroups.cs\n\nThat is, if you are interested in Plot/Dialogs/Dialog.cs, you\nknow where it came from.  If you are interested in\nGraphics/PaletteGroups.cs, you can tell it disappeared.\n\nThat is, you need to look at only one line to know what funny\nthings happened to one path.\n\nHowever, I suspect that this requires moderate amount of surgery\non the diff output routine (the last stage).  I have a feeling\nthat git-apply may also need to be told about it when applying\nsuch a patch.\n\nThe biggest drawback doing things the Pasky way would be that\nthe textual diff would need to contain the whole file removal of\nGraphics/PaletteGroups.cs.  Do we want to bloat the output for\nthis?  I personally do not think it is worth it.\n\nWe could cheat by only changing the git-apply --summary side, to\nimplement either Pasky or Daniel proposal, but that would make\noutput from 'git-diff -p | git-apply --summary' and 'git-diff -r\n--name-status -r' inconsistent, which I'd rather avoid.\n\nI think all three (i.e. current, Pasky, Daniel) logically make\nsense, and it is to a certain degree just a matter of personal\ntaste.  Let's try doing nothing for now and see if people get\nused to it ;-).\n"}]}