{"thread":{"id":"26729","subject":"'typechange' in the git-status output","startedAt":"2011-03-14T18:29:57Z","lastAt":"2011-03-14T19:44:01Z","messageCount":7,"participants":["Alexei Sholik","Jeff King","Drew Northup","Jonathan Nieder","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"163324","messageId":"AANLkTimWR0avW6mBWGa0ArVB8oZUM7nuvc5AYf=wgU-W@mail.gmail.com","threadId":"26729","inReplyTo":null,"subject":"'typechange' in the git-status output","fromName":"Alexei Sholik","fromEmail":"alcosholik@gmail.com","sentAt":"2011-03-14T18:29:57Z","receivedAt":"2011-03-14T18:29:57Z","isPatch":false,"sender":{"key":"alcosholik@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207748?v=4"},"body":"Hi git,\n\nI cloned git mirror from github[1]. When I run git-status in it's\nworking directory, I see no output.\n\nBut then, after copying the whole directory with 'cp -r' and running\ngit-status in the newly created directory, I get the following:\n\n> # On branch master\n> # Changed but not updated:\n> #   (use \"git add <file>...\" to update what will be committed)\n> #   (use \"git checkout -- <file>...\" to discard changes in working directory)\n> #\n> #\ttypechange: RelNotes\n\ngit-diff shows\n\n> diff --git a/RelNotes b/RelNotes\n> new file mode 100644\n> index 0000000..56c3863\n> --- /dev/null\n> +++ b/RelNotes\n> ... // the whole contents of the file\n\nBoth copies of the repository are on the branch master with the latest\ncommit 07873dc. Simply diffing copies of the RelNotes file gives no\noutput.\n\nWhat happened with the copied repository? I've found a couple of\ninstances of the word 'typechange' in the source, but no mention in\nthe docs. What does it mean and what could be the cause of this\nchange?\n\n\n  [1]: git://github.com/git/git.git\n\n-- \nBest regards,\nAlexei Sholik\n"},{"id":"163326","messageId":"20110314183947.GA21070@sigill.intra.peff.net","threadId":"26729","inReplyTo":"AANLkTimWR0avW6mBWGa0ArVB8oZUM7nuvc5AYf=wgU-W@mail.gmail.com","subject":"Re: 'typechange' in the git-status output","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-03-14T18:39:48Z","receivedAt":"2011-03-14T18:39:48Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Mar 14, 2011 at 08:29:57PM +0200, Alexei Sholik wrote:\n\n> But then, after copying the whole directory with 'cp -r' and running\n> git-status in the newly created directory, I get the following:\n\n\"cp -r\" isn't an exact copy. You probably want \"cp -a\" or at least \"cp\n-rs\".\n\n> > # On branch master\n> > # Changed but not updated:\n> > #   (use \"git add <file>...\" to update what will be committed)\n> > #   (use \"git checkout -- <file>...\" to discard changes in working directory)\n> > #\n> > #\ttypechange: RelNotes\n\nRight. RelNotes is a symlink. But \"cp -r\" dereferences the symlink and\ncopies the file contents themselves.\n\n> What happened with the copied repository? I've found a couple of\n> instances of the word 'typechange' in the source, but no mention in\n> the docs. What does it mean and what could be the cause of this\n> change?\n\nIt's the same as the \"T\" flag in \"git diff --name-status\". Namely, the\ntype of the file changed (between a symlink and a regular file).\n\n-Peff\n"},{"id":"163325","messageId":"AANLkTikkHWFrjmrPMP_poxrkCwE34jqaFDbU1Roouw--@mail.gmail.com","threadId":"26729","inReplyTo":"AANLkTimWR0avW6mBWGa0ArVB8oZUM7nuvc5AYf=wgU-W@mail.gmail.com","subject":"Re: 'typechange' in the git-status output","fromName":"Alexei Sholik","fromEmail":"alcosholik@gmail.com","sentAt":"2011-03-14T18:39:49Z","receivedAt":"2011-03-14T18:39:49Z","isPatch":false,"sender":{"key":"alcosholik@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207748?v=4"},"body":"On 14 March 2011 20:29, Alexei Sholik <alcosholik@gmail.com> wrote:\n> Hi git,\n>\n> I cloned git mirror from github[1]. When I run git-status in it's\n> working directory, I see no output.\n>\n> But then, after copying the whole directory with 'cp -r' and running\n> git-status in the newly created directory, I get the following:\n>\n>> # On branch master\n>> # Changed but not updated:\n>> #   (use \"git add <file>...\" to update what will be committed)\n>> #   (use \"git checkout -- <file>...\" to discard changes in working directory)\n>> #\n>> #     typechange: RelNotes\n>\n> git-diff shows\n>\n>> diff --git a/RelNotes b/RelNotes\n>> new file mode 100644\n>> index 0000000..56c3863\n>> --- /dev/null\n>> +++ b/RelNotes\n>> ... // the whole contents of the file\n>\n> Both copies of the repository are on the branch master with the latest\n> commit 07873dc. Simply diffing copies of the RelNotes file gives no\n> output.\n>\n> What happened with the copied repository? I've found a couple of\n> instances of the word 'typechange' in the source, but no mention in\n> the docs. What does it mean and what could be the cause of this\n> change?\n>\n>\n>  [1]: git://github.com/git/git.git\n>\n> --\n> Best regards,\n> Alexei Sholik\n>\n\nRight, I've figured out the root of the change.\n\n'ls -l' on the original RelNotes outputs:\n  lrwxr-xr-x  1 alco  staff  32 Mar 14 20:35 RelNotes ->\nDocumentation/RelNotes/1.7.5.txt\n\n'ls -l' on the copied RelNotes outputs:\n  -rw-r--r--  1 alco  staff  1810 Mar 14 20:10 RelNotes\n\nSo the problem is with the cp, not git. But I wonder if it is\nmentioned anywhere in the docs? Probably, git-clone's or git-status'\nmanpage would be a proper place?\n\n-- \nBest regards,\nAlexei Sholik\n"},{"id":"163327","messageId":"1300129161.13980.4.camel@drew-northup.unet.maine.edu","threadId":"26729","inReplyTo":"AANLkTikkHWFrjmrPMP_poxrkCwE34jqaFDbU1Roouw--@mail.gmail.com","subject":"Re: 'typechange' in the git-status output","fromName":"Drew Northup","fromEmail":"drew.northup@maine.edu","sentAt":"2011-03-14T18:59:21Z","receivedAt":"2011-03-14T18:59:21Z","isPatch":false,"sender":{"key":"drew.northup@maine.edu","avatar":"https://avatars.githubusercontent.com/u/18331571?v=4"},"body":"\nOn Mon, 2011-03-14 at 20:39 +0200, Alexei Sholik wrote:\n> On 14 March 2011 20:29, Alexei Sholik <alcosholik@gmail.com> wrote:\n> > Hi git,\n> >\n> > I cloned git mirror from github[1]. When I run git-status in it's\n> > working directory, I see no output.\n> >\n> > But then, after copying the whole directory with 'cp -r' and running\n> > git-status in the newly created directory, I get the following:\n\n\n> Right, I've figured out the root of the change.\n> \n> 'ls -l' on the original RelNotes outputs:\n>   lrwxr-xr-x  1 alco  staff  32 Mar 14 20:35 RelNotes ->\n> Documentation/RelNotes/1.7.5.txt\n> \n> 'ls -l' on the copied RelNotes outputs:\n>   -rw-r--r--  1 alco  staff  1810 Mar 14 20:10 RelNotes\n> \n> So the problem is with the cp, not git. But I wonder if it is\n> mentioned anywhere in the docs? Probably, git-clone's or git-status'\n> manpage would be a proper place?\n\nQuoting Jeff King <peff@peff.net>:\n\n> \"cp -r\" isn't an exact copy. You probably want \"cp -a\" or at least \"cp\n> -rs\".\n.....\n> Right. RelNotes is a symlink. But \"cp -r\" dereferences the symlink and\n> copies the file contents themselves.\n\nAs has been said more than a few times (and is probably somewhere in the\ndocs), if you really want to duplicate a git repo you should probably be\nusing git to do it. No change to the manpages is required here.\n\n-- \n-Drew Northup\n________________________________________________\n\"As opposed to vegetable or mineral error?\"\n-John Pescatore, SANS NewsBites Vol. 12 Num. 59\n"},{"id":"163328","messageId":"20110314192238.GA30378@elie","threadId":"26729","inReplyTo":"1300129161.13980.4.camel@drew-northup.unet.maine.edu","subject":"Re: 'typechange' in the git-status output","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-03-14T19:22:38Z","receivedAt":"2011-03-14T19:22:38Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nDrew Northup wrote:\n\n> As has been said more than a few times (and is probably somewhere in the\n> docs), if you really want to duplicate a git repo you should probably be\n> using git to do it.\n\nFWIW I don't agree with this advice.  \"cp -a\" works perfectly well and\nI think that's a valuable thing.\n\nOn the other hand, if you want to _back up_ or sneakernet a git repo,\nI agree that \"git bundle create /path/to/backup.bundle --all\" is\nbetter.\n\nPerhaps the user manual could explain this somewhere.\n\nHope that helps,\nJonathan\n"},{"id":"163329","messageId":"20110314192723.GA22434@sigill.intra.peff.net","threadId":"26729","inReplyTo":"20110314192238.GA30378@elie","subject":"Re: 'typechange' in the git-status output","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-03-14T19:27:23Z","receivedAt":"2011-03-14T19:27:23Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Mar 14, 2011 at 02:22:38PM -0500, Jonathan Nieder wrote:\n\n> Hi,\n> \n> Drew Northup wrote:\n> \n> > As has been said more than a few times (and is probably somewhere in the\n> > docs), if you really want to duplicate a git repo you should probably be\n> > using git to do it.\n> \n> FWIW I don't agree with this advice.  \"cp -a\" works perfectly well and\n> I think that's a valuable thing.\n\nAgreed. Note that \"cp -a\" really _duplicates_ a repo: refs, config,\nunreferenced objects, current packed state, etc. Using git to copy makes\na clone, which is subtly different. So I don't think there is any reason\nto dissuade people from \"cp -a\" (cp without \"-a\", on the other hand, can\nbe problematic as shown here).\n\n-Peff\n"},{"id":"163336","messageId":"7vhbb5cwse.fsf@alter.siamese.dyndns.org","threadId":"26729","inReplyTo":"20110314192238.GA30378@elie","subject":"Re: 'typechange' in the git-status output","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-14T19:44:01Z","receivedAt":"2011-03-14T19:44:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> On the other hand, if you want to _back up_ or sneakernet a git repo,\n> I agree that \"git bundle create /path/to/backup.bundle --all\" is\n> better.\n>\n> Perhaps the user manual could explain this somewhere.\n\nI agree \"bundle\" documentation would be a good place to show that \"better\"\nway.\n"}]}