{"thread":{"id":"34007","subject":"git fetch documentation","startedAt":"2013-06-01T11:04:40Z","lastAt":"2013-06-01T11:25:42Z","messageCount":2,"participants":["Nicolas Richard","Ramkumar Ramachandra"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"219131","messageId":"87sj12rt13.fsf@yahoo.fr","threadId":"34007","inReplyTo":null,"subject":"git fetch documentation","fromName":"Nicolas Richard","fromEmail":"theonewiththeevillook@yahoo.fr","sentAt":"2013-06-01T11:04:40Z","receivedAt":"2013-06-01T11:04:40Z","isPatch":false,"sender":{"key":"theonewiththeevillook@yahoo.fr","avatar":null},"body":"Hello,\n\nRegarding the git-fetch man page (IIUC, in pull-fetch-param.txt), in\nparticular the <refspec> explanation, I feel that two facts are missing:\n\n- A '*' can be used both in src and dest, and it matches any name,\n  including subdirectories, but not partial names (i.e. refs/heads/foo*\n  is invalid).\n- multiple fetch lines can be given in .git/config, each of them will be\n  obeyed\n\nThese are probably obvious for most users, but I think documenting them\nwould be good for newcomers. (I tried to come up with a patch but I\ncan't find a precise yet concise way to explain the role of '*' in\nenglish.)\n\n-- \nNico.\n"},{"id":"219133","messageId":"CALkWK0mqkOZ__Gk-5VUpzLCaUHx1kA1JTrFunF3tUSeX6tDkgA@mail.gmail.com","threadId":"34007","inReplyTo":"87sj12rt13.fsf@yahoo.fr","subject":"Re: git fetch documentation","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2013-06-01T11:25:42Z","receivedAt":"2013-06-01T11:25:42Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Nicolas Richard wrote:\n> - A '*' can be used both in src and dest, and it matches any name,\n>   including subdirectories, but not partial names (i.e. refs/heads/foo*\n>   is invalid).\n> - multiple fetch lines can be given in .git/config, each of them will be\n>   obeyed\n>\n> These are probably obvious for most users, but I think documenting them\n> would be good for newcomers. (I tried to come up with a patch but I\n> can't find a precise yet concise way to explain the role of '*' in\n> english.)\n\nGood.  Yes, we don't even have examples showing that a rewrite like\nrefs/heads/nr/*:refs/heads/* can be done.  The documentation is\ndefinitely lacking.  However, I'd urge you to get started by\nsubmitting an initial draft: we will review it and help you learn and\ncontribute.  Some pointers:\n\n- What you are attempting to document is called a refspec.  Look at\n'struct refspec' in remote.h, and attempt to understand what its\nfields mean by looking at how it is used in remote.c.\n\n- Notice that there is a push refspec corresponding to the fetch\nrefspec.  This feature is even more obscure and undocumented.\n\n- See remote.c:get_ref_match(); specifically,\nmatch_name_with_pattern() is doing the pattern matching.  As you can\nsee, match_name_with_pattern() hard-codes a '*' and tries to match\njust that: there is no support for anything else.  Try to skim through\nthe code once.\n\n- Read Documentation/SubmittingPatches and submit a first version\nquickly.  It doesn't have to be perfect at all.\n"}]}