{"thread":{"id":"1625","subject":"[PATCH] Improve can_hardlink diagnostics, remove suggest_hardlink","startedAt":"2005-08-23T16:23:58Z","lastAt":"2005-09-12T00:14:50Z","messageCount":2,"participants":["Pavel Roskin","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"7652","messageId":"1124814238.11038.6.camel@dv","threadId":"1625","inReplyTo":null,"subject":"[PATCH] Improve can_hardlink diagnostics, remove suggest_hardlink","fromName":"Pavel Roskin","fromEmail":"proski@gnu.org","sentAt":"2005-08-23T16:23:58Z","receivedAt":"2005-08-23T16:23:58Z","isPatch":true,"sender":{"key":"proski@gnu.org","avatar":null},"body":"Hello!\n\nsuggest_hardlink is write-only in cg-pull - remove it.  can_hardlink\nshould not be shown to the user as is (it's either \"l\" or empty) - we\nshould output something meaningful instead.\n\nSigned-off-by: Pavel Roskin <proski@gnu.org>\n\ndiff --git a/cg-pull b/cg-pull\n--- a/cg-pull\n+++ b/cg-pull\n@@ -207,7 +207,6 @@ fetch_local()\n \tcp_flags_l=\"-vdpR\"\n \tif [ \"$1\" = \"-u\" ]; then\n \t\tcp_flags_l=\"$cp_flags_l -fu$can_hardlink\"\n-\t\tsuggest_hardlink=\n \t\tshift\n \tfi\n \n@@ -293,12 +292,16 @@ else\n \tsymlinked=\n \tis_same_repo \"$_git_objects\" \"$uri/objects\" && symlinked=1\n \n-\t# See if we can hardlink and drop \"l\" if not.\n+\t# See if we can hardlink and add \"-l\" to cp flags.\n \tcan_hardlink=\n \tsample_file=$(find $uri -type f -print | head -n 1)\n \trm -f $_git/.,,lntest\n-\tln \"$sample_file\" \"$_git/.,,lntest\" 2>/dev/null && can_hardlink=l\n-\techo $can_hardlink\n+\tif cp -fl \"$sample_file\" \"$_git/.,,lntest\" 2>/dev/null; then\n+\t\tcan_hardlink=l\n+\t\techo \"Using hard links\"\n+\telse\n+\t\techo \"Hard links don't work - using copy\"\n+\tfi\n \trm -f $_git/.,,lntest\n fi\n \n\n\n-- \nRegards,\nPavel Roskin\n"},{"id":"8343","messageId":"20050912001450.GD15630@pasky.or.cz","threadId":"1625","inReplyTo":"1124814238.11038.6.camel@dv","subject":"Re: [PATCH] Improve can_hardlink diagnostics, remove suggest_hardlink","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-09-12T00:14:50Z","receivedAt":"2005-09-12T00:14:50Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, Aug 23, 2005 at 06:23:58PM CEST, I got a letter\nwhere Pavel Roskin <proski@gnu.org> told me that...\n> Hello!\n\nHello,\n\n> suggest_hardlink is write-only in cg-pull - remove it.  can_hardlink\n> should not be shown to the user as is (it's either \"l\" or empty) - we\n> should output something meaningful instead.\n\nactually, the infamous \"l\" output was just a leftover debugging print I\nforgot to remove. ;-) Well, I guess it doesn't hurt if the user is\nnotified whether hardlinking is done or not.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nIf you want the holes in your knowledge showing up try teaching\nsomeone.  -- Alan Cox\n"}]}