{"thread":{"id":"2954","subject":"cogito: cannot add dangling symlinks whereas git can","startedAt":"2006-01-02T12:15:17Z","lastAt":"2006-02-07T00:58:17Z","messageCount":2,"participants":["Gerrit Pape","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14128","messageId":"20060102120912.13409.qmail@c3aed7b85ae352.315fe32.mid.smarden.org","threadId":"2954","inReplyTo":null,"subject":"cogito: cannot add dangling symlinks whereas git can","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2006-01-02T12:15:17Z","receivedAt":"2006-01-02T12:15:17Z","isPatch":false,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"forwarded 313596 upstream\nquit\n\nHi, cg-add refuses to add special files such as dangling symlinks while\ngit can handle them just fine.  Please see http://bugs.debian.org/313596\n\nI'm not sure why cg-add checks files to commit with test -f.\n\nRegards, Gerrit.\n\n---\ndiff --git a/cg-add b/cg-add\nindex 33cdc7f..382f8d5 100755\n--- a/cg-add\n+++ b/cg-add\n@@ -61,9 +61,6 @@ for file in \"${ARGS[@]}\"; do\n \t\t\techo \"$file is a directory (use cg-add -r?)\" >&2\n \t\t\terror=1\n \t\tfi\n-\telif [ ! -f \"$absfile\" ]; then\n-\t\techo \"$file does not exist or is not a regular file\" >&2\n-\t\terror=1\n \telse\n \t\techo \"$file\" >>\"$TMPFILE\"\n \tfi\n"},{"id":"15652","messageId":"20060207005817.GL31278@pasky.or.cz","threadId":"2954","inReplyTo":"20060102120912.13409.qmail@c3aed7b85ae352.315fe32.mid.smarden.org","subject":"Re: cogito: cannot add dangling symlinks whereas git can","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-02-07T00:58:17Z","receivedAt":"2006-02-07T00:58:17Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Jan 02, 2006 at 01:15:17PM CET, I got a letter\nwhere Gerrit Pape <pape@smarden.org> said that...\n> forwarded 313596 upstream\n> quit\n> \n> Hi, cg-add refuses to add special files such as dangling symlinks while\n> git can handle them just fine.  Please see http://bugs.debian.org/313596\n> \n> I'm not sure why cg-add checks files to commit with test -f.\n\nBecause you really do not want to add character specials or named pipes.\n;-) I have changed the test to also check for symlinks.\n\nThanks,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nOf the 3 great composers Mozart tells us what it's like to be human,\nBeethoven tells us what it's like to be Beethoven and Bach tells us\nwhat it's like to be the universe.  -- Douglas Adams\n"}]}