{"thread":{"id":"44282","subject":"[PATCH] convert: mark a file-local symbol static","startedAt":"2016-10-11T23:46:26Z","lastAt":"2016-10-17T21:48:17Z","messageCount":14,"participants":["Ramsay Jones","Lars Schneider","Jeff King","Johannes Schindelin","Junio C Hamano","René Scharfe","Stefan Beller"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"303950","messageId":"b21c8a92-4dd5-56d6-ec6a-5709028eaf5f@ramsayjones.plus.com","threadId":"44282","inReplyTo":null,"subject":"[PATCH] convert: mark a file-local symbol static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-10-11T23:46:11Z","receivedAt":"2016-10-11T23:46:26Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Lars,\n\nIf you need to re-roll your 'ls/filter-process' branch, could you\nplease squash this into commit 85290197\n(\"convert: add filter.<driver>.process option\", 08-10-2016).\n\nThanks.\n\nATB,\nRamsay Jones\n\n convert.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/convert.c b/convert.c\nindex fe68316..cf30380 100644\n--- a/convert.c\n+++ b/convert.c\n@@ -568,7 +568,7 @@ static void kill_multi_file_filter(struct hashmap *hashmap, struct cmd2process *\n \tfree(entry);\n }\n \n-void stop_multi_file_filter(struct child_process *process)\n+static void stop_multi_file_filter(struct child_process *process)\n {\n \tsigchain_push(SIGPIPE, SIG_IGN);\n \t/* Closing the pipe signals the filter to initiate a shutdown. */\n-- \n2.10.0\n"},{"id":"304188","messageId":"B7662EA0-3181-413E-A40B-69C88FC46F96@gmail.com","threadId":"44282","inReplyTo":"de24ed05-2857-9c17-920f-66770f898f80@ramsayjones.plus.com","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-10-16T00:15:31Z","receivedAt":"2016-10-16T00:33:30Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 15 Oct 2016, at 14:01, Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:\n> \n> \n> \n> On 15/10/16 16:05, Lars Schneider wrote:\n>>> On 11 Oct 2016, at 16:46, Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:\n> [snip]\n>>> -void stop_multi_file_filter(struct child_process *process)\n>>> +static void stop_multi_file_filter(struct child_process *process)\n>> \n>> Done! Do you have some kind of script to detect these things\n>> automatically or do you read the code that carefully?\n> \n> Heh, I'm _far_ too lazy to read the code that carefully. :-D\n> \n> A combination of 'make sparse' and a perl script (originally\n> posted to the list by Junio) find all of these for me.\n\nInteresting. Do you have a link to this script?\nDoes it generate false positives? \nMaybe I can add `make sparse` to the TravisCI build?\n\nCheers,\nLars"},{"id":"304201","messageId":"de24ed05-2857-9c17-920f-66770f898f80@ramsayjones.plus.com","threadId":"44282","inReplyTo":"A430A9E0-B2A2-4857-8DEA-EBD7AA2C9E29@gmail.com","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-10-15T21:01:56Z","receivedAt":"2016-10-16T00:33:58Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 15/10/16 16:05, Lars Schneider wrote:\n>> On 11 Oct 2016, at 16:46, Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:\n[snip]\n>> -void stop_multi_file_filter(struct child_process *process)\n>> +static void stop_multi_file_filter(struct child_process *process)\n> \n> Done! Do you have some kind of script to detect these things\n> automatically or do you read the code that carefully?\n\nHeh, I'm _far_ too lazy to read the code that carefully. :-D\n\nA combination of 'make sparse' and a perl script (originally\nposted to the list by Junio) find all of these for me.\n\nATB,\nRamsay Jones\n\n\n"},{"id":"304206","messageId":"A430A9E0-B2A2-4857-8DEA-EBD7AA2C9E29@gmail.com","threadId":"44282","inReplyTo":"b21c8a92-4dd5-56d6-ec6a-5709028eaf5f@ramsayjones.plus.com","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-10-15T15:05:47Z","receivedAt":"2016-10-16T00:34:07Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 11 Oct 2016, at 16:46, Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:\n> \n> If you need to re-roll your 'ls/filter-process' branch, could you\n> please squash this into commit 85290197\n> (\"convert: add filter.<driver>.process option\", 08-10-2016).\n> \n> \n> -void stop_multi_file_filter(struct child_process *process)\n> +static void stop_multi_file_filter(struct child_process *process)\n\nDone! Do you have some kind of script to detect these things\nautomatically or do you read the code that carefully?\n\nThanks,\nLars\n"},{"id":"304255","messageId":"5a9a1c44-8a3f-1894-c4c5-8f1fa96b63b9@ramsayjones.plus.com","threadId":"44282","inReplyTo":"B7662EA0-3181-413E-A40B-69C88FC46F96@gmail.com","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-10-17T01:37:58Z","receivedAt":"2016-10-17T01:38:10Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 16/10/16 01:15, Lars Schneider wrote:\n>> On 15 Oct 2016, at 14:01, Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:\n>> On 15/10/16 16:05, Lars Schneider wrote:\n>>>> On 11 Oct 2016, at 16:46, Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:\n>> [snip]\n>>>> -void stop_multi_file_filter(struct child_process *process)\n>>>> +static void stop_multi_file_filter(struct child_process *process)\n>>>\n>>> Done! Do you have some kind of script to detect these things\n>>> automatically or do you read the code that carefully?\n>>\n>> Heh, I'm _far_ too lazy to read the code that carefully. :-D\n>>\n>> A combination of 'make sparse' and a perl script (originally\n>> posted to the list by Junio) find all of these for me.\n> \n> Interesting. Do you have a link to this script?\n\nI'm attaching _a_ version of the script (you would think that\nI would have it under version control; but no, I copy versions\naround the several machines/git.git repos I have ... :-P ).\n\n> Does it generate false positives? \n\nHmm, well, you have to remember that 'make clean' sometimes\ndoesn't make clean. Ever since the Makefile was changed to only\nremove $(OBJECTS), rather than *.o xdiff/*.o etc., you have to\nremember to 'make clean' _before_ you switch branches. Otherwise,\nyou risk leaving some objects laying around. Since the script\nruns 'nm' on all objects it finds, any stale ones can cause problems.\n(Of course, I almost always forget, so I frequently have to manually\ncheck for and remove stale objects!)\n\nAlso, you have to interpret the results of the script. Just because\nit shows you an unused external, that doesn't make it an error.\nThe way I use it, BTW, is to run it on a freshly built branch (saving\nto a file) and then compare the files from master->next->pu.\nI don't bother looking at the output on master (the 'stop list' in\nthe script is _way_ out of date), just the diffs master->next and\nnext->pu.\n\nThe current next->pu diff looks like:\n\n    $ diff nsc psc\n    0a1,2\n    > attr.o\t- attr_name_valid\n    > attr.o\t- invalid_attr_name_message\n    17a20\n    > convert.o\t- stop_multi_file_filter\n    34d36\n    < quote.o\t- sq_quotef\n    43a46\n    > sequencer.o\t- append_new_todo\n    50a54\n    > trailer.o\t- conf_head\n    55a60,61\n    > wt-status.o\t- has_uncommitted_changes\n    > wt-status.o\t- has_unstaged_changes\n    $ \n\nI have already sent mails about 'stop_multi_file_filter',\n'append_new_todo' and 'conf_head'. The symbols in attr.o are\npart of the revamp of the attribute system that Junio and Stefan\nare working on, which is very much in flux. If they are still\nthere when it looks to have firmed up, then I will take a look.\nThe 'sq_quotef' symbol is an example of a useful function that was\nwritten without having an immediate user (actually, if memory serves\ncorrectly, it was originally used in the series which introduced it,\nbut later modifications removed the caller). It now has a user. The wt-status.o symbols have been introduced by Johannes in his 'rebase -i'\nseries (of series) and I am assuming that these symbols will find\nadditional external callers in up-coming series.\n\n> Maybe I can add `make sparse` to the TravisCI build?\n\nI don't know how feasible that would be. Apparently, the version of\nsparse in most distribution repositories is so old that it spews so\nmany spurious errors as to make it unusable. See, for example:\n\nhttps://public-inbox.org/git/56CA5753.9030308@ramsayjones.plus.com/\n\nSo, you would need to build from source to get a usable version (I am\ncurrently running a version built with some local patches). If you were\nto build from the sparse repo's master branch, then it would work great\non Linux, at least. I have no idea if it would work on mac OS X.\n\nHowever, even then, a single sparse warning is issued on Linux (for\nthe master branch, several others on pu):\n\n        SP pack-revindex.c\n    pack-revindex.c:65:23: warning: memset with byte count of 262144\n\nThis is a problem with sparse (the byte count limit used is hardcoded\ninto sparse), but I haven't sent a patch upstream to fix it yet.\n(I've been looking at that warning for _many_ years, so don't hold\nyour breath!)\n\nATB,\nRamsay Jones\n\n\n"},{"id":"304256","messageId":"20161017021825.jgpsew7qqfjrirhw@sigill.intra.peff.net","threadId":"44282","inReplyTo":"5a9a1c44-8a3f-1894-c4c5-8f1fa96b63b9@ramsayjones.plus.com","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-10-17T02:18:25Z","receivedAt":"2016-10-17T02:18:47Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Oct 17, 2016 at 02:37:58AM +0100, Ramsay Jones wrote:\n\n> Hmm, well, you have to remember that 'make clean' sometimes\n> doesn't make clean. Ever since the Makefile was changed to only\n> remove $(OBJECTS), rather than *.o xdiff/*.o etc., you have to\n> remember to 'make clean' _before_ you switch branches. Otherwise,\n> you risk leaving some objects laying around. Since the script\n> runs 'nm' on all objects it finds, any stale ones can cause problems.\n> (Of course, I almost always forget, so I frequently have to manually\n> check for and remove stale objects!)\n\nGross. I would not be opposed to a Makefile rule that outputs the\ncorrect set of OBJECTS so this (or other) scripts could build on it.\n\nIIRC, BSD make has an option to do this \"make -V OBJECTS\" or something,\nbut I don't thnk there's an easy way to do so.\n\nOr, since it seems to find useful results quite frequently, maybe it\nwould be worth including the script inside git (and triggering it with\nan optional Makefile rule). It sounds like we'd need a way to annotate\nknown false positives, but if it were in common use, it would be easier\nto get people to keep that list up to date.\n\n-Peff\n"},{"id":"304263","messageId":"alpine.DEB.2.20.1610171058580.197091@virtualbox","threadId":"44282","inReplyTo":"20161017021825.jgpsew7qqfjrirhw@sigill.intra.peff.net","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-10-17T09:04:19Z","receivedAt":"2016-10-17T09:05:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ramsay & Peff,\n\nOn Sun, 16 Oct 2016, Jeff King wrote:\n\n> On Mon, Oct 17, 2016 at 02:37:58AM +0100, Ramsay Jones wrote:\n> \n> > Hmm, well, you have to remember that 'make clean' sometimes doesn't\n> > make clean. Ever since the Makefile was changed to only remove\n> > $(OBJECTS), rather than *.o xdiff/*.o etc., you have to remember to\n> > 'make clean' _before_ you switch branches. Otherwise, you risk leaving\n> > some objects laying around. Since the script runs 'nm' on all objects\n> > it finds, any stale ones can cause problems.  (Of course, I almost\n> > always forget, so I frequently have to manually check for and remove\n> > stale objects!)\n> \n> Gross. I would not be opposed to a Makefile rule that outputs the\n> correct set of OBJECTS so this (or other) scripts could build on it.\n\nYou could also use the method I use in Git for Windows to \"extend\" the\nMakefile:\n\n-- snipsnap --\ncat >dummy.mak <<EOF\ninclude Makefile\n\nblub: $(OBJECTS)\n\tdo-something-with $^\nEOF\n\nmake -f dummy.mak blub\n"},{"id":"304267","messageId":"20161017093754.wah5d6cg4qgtw7ln@sigill.intra.peff.net","threadId":"44282","inReplyTo":"alpine.DEB.2.20.1610171058580.197091@virtualbox","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-10-17T09:37:54Z","receivedAt":"2016-10-17T09:44:41Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Oct 17, 2016 at 11:04:19AM +0200, Johannes Schindelin wrote:\n\n> > Gross. I would not be opposed to a Makefile rule that outputs the\n> > correct set of OBJECTS so this (or other) scripts could build on it.\n> \n> You could also use the method I use in Git for Windows to \"extend\" the\n> Makefile:\n> \n> -- snipsnap --\n> cat >dummy.mak <<EOF\n> include Makefile\n> \n> blub: $(OBJECTS)\n> \tdo-something-with $^\n> EOF\n> \n> make -f dummy.mak blub\n\nHacky but clever. I like it.\n\nIn the particular case of git, I think I've cheated similarly before by\nputting things in config.mak, though of course an arbitrary script can't\nassume it can overwrite that file.\n\n-Peff\n"},{"id":"304283","messageId":"c2d5d79d-bb00-6833-28ae-bb707ffd2fa1@ramsayjones.plus.com","threadId":"44282","inReplyTo":"20161017021825.jgpsew7qqfjrirhw@sigill.intra.peff.net","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-10-17T17:15:57Z","receivedAt":"2016-10-17T17:16:10Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 17/10/16 03:18, Jeff King wrote:\n> On Mon, Oct 17, 2016 at 02:37:58AM +0100, Ramsay Jones wrote:\n> \n>> Hmm, well, you have to remember that 'make clean' sometimes\n>> doesn't make clean. Ever since the Makefile was changed to only\n>> remove $(OBJECTS), rather than *.o xdiff/*.o etc., you have to\n>> remember to 'make clean' _before_ you switch branches. Otherwise,\n>> you risk leaving some objects laying around. Since the script\n>> runs 'nm' on all objects it finds, any stale ones can cause problems.\n>> (Of course, I almost always forget, so I frequently have to manually\n>> check for and remove stale objects!)\n> \n> Gross. I would not be opposed to a Makefile rule that outputs the\n> correct set of OBJECTS so this (or other) scripts could build on it.\n> \n> IIRC, BSD make has an option to do this \"make -V OBJECTS\" or something,\n> but I don't thnk there's an easy way to do so.\n\nHmm, I would go in the opposite direction and take a leaf out of\nÆvar's book (see commit bc548efe) and this one-liner:\n\ndiff --git a/Makefile b/Makefile\nindex ee89c06..c08c25e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2506,7 +2506,7 @@ profile-clean:\n \n clean: profile-clean coverage-clean\n        $(RM) *.res\n-       $(RM) $(OBJECTS)\n+       $(RM) $(addsuffix *.o,$(object_dirs))\n        $(RM) $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB)\n        $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X\n        $(RM) $(TEST_PROGRAMS) $(NO_INSTALL)\n\nThis would actually solve my problem, but it actually isn't a\n_complete_ solution. (Hint: think about what isn't in $(OBJECTS),\ndepending on the configuration). ;-)\n\n> Or, since it seems to find useful results quite frequently, maybe it\n> would be worth including the script inside git (and triggering it with\n> an optional Makefile rule). It sounds like we'd need a way to annotate\n> known false positives, but if it were in common use, it would be easier\n> to get people to keep that list up to date.\n\nHmm, I suspect that wouldn't happen, which would reduce it usefulness\nand ultimately lead to it not being used. (Updating the 'stop list' would\nfast become a burden.)\n\nI find it useful to flag these issues automatically, but I still need\nto look at each symbol and decide what to do (you may not agree with\nsome of my choices either - take a look at the output on the master\nbranch!).\n\nThe way I use it, I effectively ignore the 'stop list' maintenance issues.\n\nATB,\nRamsay Jones\n\n\n"},{"id":"304286","messageId":"16298e68-c0f9-b7ff-d4b5-0d4b79306377@ramsayjones.plus.com","threadId":"44282","inReplyTo":"20161017093754.wah5d6cg4qgtw7ln@sigill.intra.peff.net","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-10-17T17:21:56Z","receivedAt":"2016-10-17T17:22:06Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 17/10/16 10:37, Jeff King wrote:\n> On Mon, Oct 17, 2016 at 11:04:19AM +0200, Johannes Schindelin wrote:\n> \n>>> Gross. I would not be opposed to a Makefile rule that outputs the\n>>> correct set of OBJECTS so this (or other) scripts could build on it.\n>>\n>> You could also use the method I use in Git for Windows to \"extend\" the\n>> Makefile:\n>>\n>> -- snipsnap --\n>> cat >dummy.mak <<EOF\n>> include Makefile\n>>\n>> blub: $(OBJECTS)\n>> \tdo-something-with $^\n>> EOF\n>>\n>> make -f dummy.mak blub\n> \n> Hacky but clever. I like it.\n> \n> In the particular case of git, I think I've cheated similarly before by\n> putting things in config.mak, though of course an arbitrary script can't\n> assume it can overwrite that file.\n\nHeh, I actually have the following in my config.mak already:\n\nextra-clean: clean\n\tfind . -iname '*.o' -exec rm {} \\;\n\nBut for some reason I _always_ type 'make clean' and then, to top\nit off, I _always_ type the 'find' command by hand (I have no idea\nwhy) :-D\n\nATB,\nRamsay Jones\n\n"},{"id":"304305","messageId":"xmqqmvi2u4c0.fsf@gitster.mtv.corp.google.com","threadId":"44282","inReplyTo":"16298e68-c0f9-b7ff-d4b5-0d4b79306377@ramsayjones.plus.com","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-10-17T20:07:43Z","receivedAt":"2016-10-17T20:07:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n\n> Heh, I actually have the following in my config.mak already:\n>\n> extra-clean: clean\n> \tfind . -iname '*.o' -exec rm {} \\;\n>\n> But for some reason I _always_ type 'make clean' and then, to top\n> it off, I _always_ type the 'find' command by hand (I have no idea\n> why) :-D\n\n\"git clean -x\" anybody?\n"},{"id":"304307","messageId":"d23ead12-1f63-d598-fe97-80c121de1c29@web.de","threadId":"44282","inReplyTo":"xmqqmvi2u4c0.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2016-10-17T20:48:08Z","receivedAt":"2016-10-17T20:48:36Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 17.10.2016 um 22:07 schrieb Junio C Hamano:\n> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n>\n>> Heh, I actually have the following in my config.mak already:\n>>\n>> extra-clean: clean\n>> \tfind . -iname '*.o' -exec rm {} \\;\n>>\n>> But for some reason I _always_ type 'make clean' and then, to top\n>> it off, I _always_ type the 'find' command by hand (I have no idea\n>> why) :-D\n>\n> \"git clean -x\" anybody?\n\nThis removes config.mak as well.\n\nRené\n\n\n"},{"id":"304308","messageId":"CAGZ79kZ7oo7NpMY_xFc5Of9BBgeA+7BBaqth37Eifh4nfVY9xQ@mail.gmail.com","threadId":"44282","inReplyTo":"xmqqmvi2u4c0.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2016-10-17T20:48:59Z","receivedAt":"2016-10-17T20:49:05Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Mon, Oct 17, 2016 at 1:07 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n>\n>> Heh, I actually have the following in my config.mak already:\n>>\n>> extra-clean: clean\n>>       find . -iname '*.o' -exec rm {} \\;\n>>\n>> But for some reason I _always_ type 'make clean' and then, to top\n>> it off, I _always_ type the 'find' command by hand (I have no idea\n>> why) :-D\n>\n> \"git clean -x\" anybody?\n\nI only want to cleanup compiled stuff and such, not the precious\nunversioned text files I have laying around here. So I guess\n\n  git clean -x -e:(attr:!binary)\n\nwould suffice, though. ;)\n"},{"id":"304311","messageId":"8bb9272b-d74e-c2e8-42ce-49d155f1884b@ramsayjones.plus.com","threadId":"44282","inReplyTo":"xmqqmvi2u4c0.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] convert: mark a file-local symbol static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-10-17T21:48:06Z","receivedAt":"2016-10-17T21:48:17Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 17/10/16 21:07, Junio C Hamano wrote:\n> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n> \n>> Heh, I actually have the following in my config.mak already:\n>>\n>> extra-clean: clean\n>> \tfind . -iname '*.o' -exec rm {} \\;\n>>\n>> But for some reason I _always_ type 'make clean' and then, to top\n>> it off, I _always_ type the 'find' command by hand (I have no idea\n>> why) :-D\n> \n> \"git clean -x\" anybody?\n\nI don't use 'git clean' because, on the very few occasions that I have\ntried to use it, it always deletes _far_ more than I thought it would\nor should. (particularly config.mak). Hmm, \"git clean -X -- '*.o'\"\n_might_ do what I want, but 'find' is so much easier ... :-D\n\nATB,\nRamsay Jones\n\n"}]}