{"thread":{"id":"2612","subject":"[PATCH] Cogito documentation updates","startedAt":"2005-11-20T10:11:12Z","lastAt":"2005-11-27T15:28:27Z","messageCount":9,"participants":["Jonas Fonseca","Randal L. Schwartz","Andreas Ericsson","Linus Torvalds","Junio C Hamano","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"12367","messageId":"20051120101112.GA2302@diku.dk","threadId":"2612","inReplyTo":null,"subject":"[PATCH] Cogito documentation updates","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2005-11-20T10:11:12Z","receivedAt":"2005-11-20T10:11:12Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":" - local cg-fetch now works without the cp option -u\n - note the difference between short and long help in cg-help(1)\n - mention the alien repo importers provided by the git core\n - fix typo in cg-update(1)\n\nSigned-off-by: Jonas Fonseca <fonseca@diku.dk>\n\n---\ndiff --git a/README.osx b/README.osx\nindex e82ef79..d8df872 100644\n--- a/README.osx\n+++ b/README.osx\n@@ -9,18 +9,6 @@ You may have to deal with md5 mismatches\n your new Portfile or place the new tarball in\n /opt/local/var/db/dports/distfiles/cogito.\n \n-Caveats:\n-\n-cg-fetch on a local repository requires cp -u, a non-portable gnu\n-extension.  This means that cg-fetch, cg-clone and cg-update from a\n-local repository are broken.\n-\n-Workaround #1: Use rsync for local clones.  I.e.  \"cg-clone\n-rsync://localhost/dir\" instead of \"cg-clone dir\".  This loses the disk\n-space savings of normally gained by cg-clone.\n-\n-Workaround #2: Use gnu cp.  \"cd /opt/local/bin; sudo ln -s gcp cp\".\n-\n Recommendations:\n \n The gnu versions of \"stat\" and \"date\" are preferred over their BSD\ndiff --git a/cg-help b/cg-help\nindex 6ba7657..5fa65ef 100755\n--- a/cg-help\n+++ b/cg-help\n@@ -8,8 +8,9 @@\n # If the argument is left out an overview of all the Cogito commands will\n # be shown.\n #\n-# Note help for a command is also available by passing `--help` or `-h`\n-# to the command.\n+# Note, short help for a command is also available by passing `--help` or\n+# `-h` to the command. The complete command manual is shown when passing\n+# `--long-help` (and is the same as doing \"`cg-help command`\").\n #\n # OPTIONS\n # -------\ndiff --git a/cg-init b/cg-init\nindex a0a7372..31c2e10 100755\n--- a/cg-init\n+++ b/cg-init\n@@ -9,7 +9,9 @@\n # This command is intended for creating repositories for work on new projects.\n # If you want to clone an existing project, see `cg-clone`. If you want to\n # set up a public repository not for direct work but only for pushing/pulling,\n-# see `cg-admin-setuprepo`.\n+# see `cg-admin-setuprepo`. It is also possible to import repositories from\n+# other SCMs to GIT, see `git-cvsimport(1)`, `git-svnimport(1)` and\n+# `git-archimport(1)`.\n #\n # OPTIONS\n # -------\ndiff --git a/cg-update b/cg-update\nindex ed93c01..9d82fcb 100755\n--- a/cg-update\n+++ b/cg-update\n@@ -8,7 +8,7 @@\n # This is similar to running cg-fetch and cg-merge commands successively.\n # Please refer to the documentation of those commands for more details\n # about the operation. Note that if you are not doing own development\n-# but only following some project, you it is recommended to use this command\n+# but only following some project, it is recommended to use this command\n # instead of `cg-fetch` + `cg-merge` since `cg-update` can handle some\n # additional corner cases (in particular, if the remote branch rebases,\n # `cg-update` will fast-forward instead of doing a tree merge and diverging).\n\n-- \nJonas Fonseca\n"},{"id":"12374","messageId":"86veyn49gc.fsf@blue.stonehenge.com","threadId":"2612","inReplyTo":"20051120101112.GA2302@diku.dk","subject":"Re: [PATCH] Cogito documentation updates","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-20T15:37:07Z","receivedAt":"2005-11-20T15:37:07Z","isPatch":true,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Jonas\" == Jonas Fonseca <fonseca@diku.dk> writes:\n\nJonas>  - local cg-fetch now works without the cp option -u\n\nBut it still requires cp -d, unless some other patch fixed that recently.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12609","messageId":"20051123121651.GB19302@diku.dk","threadId":"2612","inReplyTo":"86veyn49gc.fsf@blue.stonehenge.com","subject":"Re: [PATCH] Cogito documentation updates","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2005-11-23T12:16:51Z","receivedAt":"2005-11-23T12:16:51Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Randal L. Schwartz <merlyn@stonehenge.com> wrote Sun, Nov 20, 2005:\n> >>>>> \"Jonas\" == Jonas Fonseca <fonseca@diku.dk> writes:\n> \n> Jonas>  - local cg-fetch now works without the cp option -u\n> \n> But it still requires cp -d, unless some other patch fixed that recently.\n\nAh, yes. I just recently tried local cloning on a FreeBSD box and it\nworked fine (apart from it spitting out a few errors, see the log below)\nand since the caveat section only mentioned the -u option I thought\neverything was fine. However, cloning a specific branch hits the error.\nSo maybe the caveat section should just be updated to say that the -d\noption is required. \n\n---\n\n$ cg clone cogito cogito-now\ndefaulting to local storage area\nHard links don't work - using copy\nFetching head...\n/home/jonas/src/cogito/.git/HEAD -> .git/refs/heads/.origin-fetching\nFetching objects...\nprogress: 10289 objects, 16992385 bytes\nFetching tags...\nerror: missing object referenced by 'refs/tags/junio-gpg-pub'\nfatal: protocol error: bad line length character\nFailed to find remote refs\nunable to get tags list (non-fatal)\nNew branch: 73874dddeec2d0a8e5cd343eec762d98314def63\nCloned to cogito-now/ (origin /home/jonas/src/cogito available as branch \"origin\")\n\n$ cg clone cogito#cogito-0.10 cogito-0.10\ncp: illegal option -- d\nusage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src target\n       cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src1 ... srcN\n       directory\n       cg-fetch: unable to get the head pointer of branch cogito-0.10\n       cg-clone: fetch failed\n\n-- \nJonas Fonseca\n"},{"id":"12617","messageId":"8664qjph7d.fsf@blue.stonehenge.com","threadId":"2612","inReplyTo":"20051123121651.GB19302@diku.dk","subject":"Re: [PATCH] Cogito documentation updates","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2005-11-23T14:33:10Z","receivedAt":"2005-11-23T14:33:10Z","isPatch":true,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Jonas\" == Jonas Fonseca <fonseca@diku.dk> writes:\n\nJonas> Ah, yes. I just recently tried local cloning on a FreeBSD box and it\nJonas> worked fine (apart from it spitting out a few errors, see the log below)\nJonas> and since the caveat section only mentioned the -u option I thought\nJonas> everything was fine. However, cloning a specific branch hits the error.\nJonas> So maybe the caveat section should just be updated to say that the -d\nJonas> option is required. \n\nBut instead of targeting GNU tools, why not target POSIX tools where\npossible?\n\nI realize I'm being a rebel here.  I want to use git on non-Linux platforms.\nI believe git is useful for far more than Linux Kernel development, and\nyou're this --> <-- close to making it work.\n\nDelete the -d switch, or explain to me why it is there, and let's work\nout a POSIX workaround.\n\nI'm not asking for everyone to be cautious when contributing code.\nI'll be happy to be \"mr portability\" and figure out how to make it\nstill work on OpenBSD and Darwin (my two platforms of choice).\n\nHowever, as I said in another posting, maybe I just need to understand\nthe target market first.  (I realize that goal #1 is Linux Kernel\ndevelopment.)\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"12622","messageId":"438483A4.6040802@op5.se","threadId":"2612","inReplyTo":"8664qjph7d.fsf@blue.stonehenge.com","subject":"Re: [PATCH] Cogito documentation updates","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2005-11-23T14:58:44Z","receivedAt":"2005-11-23T14:58:44Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Randal L. Schwartz wrote:\n>>>>>>\"Jonas\" == Jonas Fonseca <fonseca@diku.dk> writes:\n> \n> \n> Jonas> Ah, yes. I just recently tried local cloning on a FreeBSD box and it\n> Jonas> worked fine (apart from it spitting out a few errors, see the log below)\n> Jonas> and since the caveat section only mentioned the -u option I thought\n> Jonas> everything was fine. However, cloning a specific branch hits the error.\n> Jonas> So maybe the caveat section should just be updated to say that the -d\n> Jonas> option is required. \n> \n> But instead of targeting GNU tools, why not target POSIX tools where\n> possible?\n> \n> Delete the -d switch, or explain to me why it is there, and let's work\n> out a POSIX workaround.\n> \n\n        -d     same as --no-dereference --preserve=link\n\n        --no-dereference\n               never follow symbolic links\n\n        --preserve[=ATTR_LIST]\n               preserve   the   specified   attributes  (default:\n               mode,ownership,timestamps) and security contexts,\n               if possible\n               additional attributes: links, all\n\nI don't know how to get those options with POSIX only cp.\n\n> I'm not asking for everyone to be cautious when contributing code.\n> I'll be happy to be \"mr portability\" and figure out how to make it\n> still work on OpenBSD and Darwin (my two platforms of choice).\n> \n> However, as I said in another posting, maybe I just need to understand\n> the target market first.  (I realize that goal #1 is Linux Kernel\n> development.)\n> \n\nI'm not Junio, but I think the priorities right now are ordererd like \nthis; good performance, fast development, portability.\n\nGood performance because it's designed to handle one of the largest open \nprojects there is.\n\nFast development because it's still a young project but has more \nmomentum than most projects, open or closed, ever get. If it slows down \nnow it will stay slow until the kernel team needs new features and \nthere's no way of recycling inertia.\n\nPortability because that's nice but not vital for the project as a whole \n(it's a linuxish tool, so most users run it on linux so far). I think \nportability usually ends up a bit behind in the race because it often \nhinders #1 and #2.\n\nAgain, I'm not Junio. I might be dead wrong.\n\nHowever, most of the plumbing works on just about anything with a CPU, \nso unless you really need cg-clone you should be able to do it with \ngit-clone, which AFAIU uses 'tar' and 'cpio' instead of cp to transfer \nfiles (for portability reasons, I imagine).\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"12630","messageId":"Pine.LNX.4.64.0511230923131.13959@g5.osdl.org","threadId":"2612","inReplyTo":"8664qjph7d.fsf@blue.stonehenge.com","subject":"Re: [PATCH] Cogito documentation updates","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-11-23T17:29:34Z","receivedAt":"2005-11-23T17:29:34Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 23 Nov 2005, Randal L. Schwartz wrote:\n> \n> Delete the -d switch, or explain to me why it is there, and let's work\n> out a POSIX workaround.\n\nIt's\n\n       -d:     same as --no-dereference --preserve=link\n\n       --no-dereference\n              never follow symbolic links\n\n       --preserve[=ATTR_LIST]\n              preserve   the   specified   attributes   (default:  mode,owner-\n              ship,timestamps) and security contexts, if  possible  additional\n              attributes: links, all\n\nso it's basically making sure that the copy copies the _link_, not the \nfile it points to.\n\nI think you may have to use \"cpio -p\" instead of \"cp\" to be portable. \nSomething like\n\n\tcpio -plmu $src $dst\n\nmight do it.\n\n\t\tLinus\n"},{"id":"12637","messageId":"7voe4b3zwc.fsf@assigned-by-dhcp.cox.net","threadId":"2612","inReplyTo":"438483A4.6040802@op5.se","subject":"Re: [PATCH] Cogito documentation updates","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-23T19:52:35Z","receivedAt":"2005-11-23T19:52:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Ericsson <ae@op5.se> writes:\n\n> I'm not Junio, but I think the priorities right now are ordererd like \n> this; good performance, fast development, portability.\n\nI am, but I am not Pasky, so I cannot talk about priority of\nCogito.\n\n> However, most of the plumbing works on just about anything with a CPU, \n> so unless you really need cg-clone you should be able to do it with \n> git-clone, which AFAIU uses 'tar' and 'cpio' instead of cp to transfer \n> files (for portability reasons, I imagine).\n\nExactly, because people with portability problems tend to feed\ngood patches directly to me and to the list.\n"},{"id":"12775","messageId":"20051126191201.GA29008@diku.dk","threadId":"2612","inReplyTo":"20051120101112.GA2302@diku.dk","subject":"[PATCH] Cogito documentation updates","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2005-11-26T19:12:02Z","receivedAt":"2005-11-26T19:12:02Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":" - note the difference between short and long help in cg-help(1)\n - mention the alien repo importers provided by the git core\n - fix typo in cg-update(1)\n - fix help options for the cg(1) manpage\n\nSigned-off-by: Jonas Fonseca <fonseca@diku.dk>\n\n---\ndiff --git a/Documentation/make-cg-asciidoc b/Documentation/make-cg-asciidoc\nindex 00e4ce7..51db9e3 100755\n--- a/Documentation/make-cg-asciidoc\n+++ b/Documentation/make-cg-asciidoc\n@@ -79,6 +79,21 @@ else\n \tfi\n fi\n \n+# cg(1) does not answer to the help options in the same way as the\n+# rest of the commands\n+if [ \"$COMMAND\" = \"cg\" ]; then\n+\tHELP_OPTIONS=\"\n+-h, --help::\n+\tPrint overview of Cogito commands. Same as gitlink:cg-help[1].\"\n+else\n+\tHELP_OPTIONS=\"\n+-h, --help::\n+\tPrint usage summary.\n+\n+--long-help::\n+\tPrint user manual. The same as found in $TITLE.\"\n+fi\n+\n cat <<__END__\n $TITLE\n $TITLELINE\n@@ -98,12 +113,7 @@ $DESCRIPTION\n OPTIONS\n -------\n $OPTIONS\n-\n--h, --help::\n-\tPrint usage summary.\n-\n---long-help::\n-\tPrint user manual. The same as found in $TITLE.\n+$HELP_OPTIONS\n \n $MISC\n \n@@ -113,6 +123,6 @@ $COPYRIGHT\n \n SEE ALSO\n --------\n-$COMMAND command is part of gitlink:${PACKAGE}[7],\n+$COMMAND is part of gitlink:${PACKAGE}[7],\n a toolkit for managing gitlink:git[7] trees.\n __END__\ndiff --git a/cg-add b/cg-add\nindex a50c0ac..4611930 100755\n--- a/cg-add\n+++ b/cg-add\n@@ -25,9 +25,8 @@\n # -r::\tAdd files recursively\n #\tIf you pass cg-add this flag and any directory names, it will try\n #\tto add files in those directories recursively (with regard to your\n-#\tignore rules - see cg-status documentation for more detailed\n-#\tdescription of those). See also above for more notes about cg-add\n-#\tvs. directories.\n+#\tignore rules - see `cg-status` for a more detailed description of\n+#\tthose). See also above for more notes about cg-add vs. directories.\n \n USAGE=\"cg-add [-N] [-r] FILE...\"\n \ndiff --git a/cg-help b/cg-help\nindex 6ba7657..5fa65ef 100755\n--- a/cg-help\n+++ b/cg-help\n@@ -8,8 +8,9 @@\n # If the argument is left out an overview of all the Cogito commands will\n # be shown.\n #\n-# Note help for a command is also available by passing `--help` or `-h`\n-# to the command.\n+# Note, short help for a command is also available by passing `--help` or\n+# `-h` to the command. The complete command manual is shown when passing\n+# `--long-help` (and is the same as doing \"`cg-help command`\").\n #\n # OPTIONS\n # -------\ndiff --git a/cg-init b/cg-init\nindex a0a7372..31c2e10 100755\n--- a/cg-init\n+++ b/cg-init\n@@ -9,7 +9,9 @@\n # This command is intended for creating repositories for work on new projects.\n # If you want to clone an existing project, see `cg-clone`. If you want to\n # set up a public repository not for direct work but only for pushing/pulling,\n-# see `cg-admin-setuprepo`.\n+# see `cg-admin-setuprepo`. It is also possible to import repositories from\n+# other SCMs into GIT, see `git-cvsimport(1)`, `git-svnimport(1)` and\n+# `git-archimport(1)`.\n #\n # OPTIONS\n # -------\ndiff --git a/cg-update b/cg-update\nindex ed93c01..9d82fcb 100755\n--- a/cg-update\n+++ b/cg-update\n@@ -8,7 +8,7 @@\n # This is similar to running cg-fetch and cg-merge commands successively.\n # Please refer to the documentation of those commands for more details\n # about the operation. Note that if you are not doing own development\n-# but only following some project, you it is recommended to use this command\n+# but only following some project, it is recommended to use this command\n # instead of `cg-fetch` + `cg-merge` since `cg-update` can handle some\n # additional corner cases (in particular, if the remote branch rebases,\n # `cg-update` will fast-forward instead of doing a tree merge and diverging).\n\n-- \nJonas Fonseca\n"},{"id":"12802","messageId":"20051127152827.GJ22159@pasky.or.cz","threadId":"2612","inReplyTo":"Pine.LNX.4.64.0511230923131.13959@g5.osdl.org","subject":"Re: [PATCH] Cogito documentation updates","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-27T15:28:27Z","receivedAt":"2005-11-27T15:28:27Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Wed, Nov 23, 2005 at 06:29:34PM CET, I got a letter\nwhere Linus Torvalds <torvalds@osdl.org> said that...\n> \n> \n> On Wed, 23 Nov 2005, Randal L. Schwartz wrote:\n> > \n> > Delete the -d switch, or explain to me why it is there, and let's work\n> > out a POSIX workaround.\n> \n> It's\n> \n>        -d:     same as --no-dereference --preserve=link\n> \n>        --no-dereference\n>               never follow symbolic links\n> \n>        --preserve[=ATTR_LIST]\n>               preserve   the   specified   attributes   (default:  mode,owner-\n>               ship,timestamps) and security contexts, if  possible  additional\n>               attributes: links, all\n> \n> so it's basically making sure that the copy copies the _link_, not the \n> file it points to.\n> \n> I think you may have to use \"cpio -p\" instead of \"cp\" to be portable. \n> Something like\n> \n> \tcpio -plmu $src $dst\n> \n> might do it.\n\nWell, but -l links the files instead of copying them, right? That's\ncertainly not what I want, I want to really _copy_ the files. Also, does\ncpio preserve the hardlinks between the copied files? If not, then what\nyou wrote is equivalent to\n\n\tcp -pRP\n\nwhich should be even POSIX, hopefully. That's what I changed the -dpR to\nnow.\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"}]}