{"thread":{"id":"27510","subject":"[PATCH] config.c: Remove unused git_config_global() function","startedAt":"2011-05-31T17:23:42Z","lastAt":"2011-05-31T18:51:15Z","messageCount":5,"participants":["Ramsay Jones","Junio C Hamano","Stephen Bash"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"169062","messageId":"4DE5241E.9030000@ramsay1.demon.co.uk","threadId":"27510","inReplyTo":null,"subject":"[PATCH] config.c: Remove unused git_config_global() function","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2011-05-31T17:23:42Z","receivedAt":"2011-05-31T17:23:42Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nCommit 8f323c00 (drop support for GIT_CONFIG_NOGLOBAL, 15-03-2011)\nremoved the git_config_global() function, among other things, since\nit is no longer required. Unfortunately, this function has since\nbeen unintentionally restored; I suspect by merge commit 25b86e45\n(Merge branch 'jk/maint-config-alias-fix' into next, 25-05-2011).\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Junio,\n\nA few days ago, when the next branch was @ d10669c, I noticed that\n\"make sparse\" on next was complaining thus:\n\n    config.c:828:5: warning: symbol 'git_config_global' was not \\\n        declared. Should it be static?\n\nHowever, I remembered that this function had recently been removed, so\nI took a quick look ...\n\nATB,\nRamsay Jones\n\n config.c |    5 -----\n 1 files changed, 0 insertions(+), 5 deletions(-)\n\ndiff --git a/config.c b/config.c\nindex a8267e9..e0b3b80 100644\n--- a/config.c\n+++ b/config.c\n@@ -825,11 +825,6 @@ int git_config_system(void)\n \treturn !git_env_bool(\"GIT_CONFIG_NOSYSTEM\", 0);\n }\n \n-int git_config_global(void)\n-{\n-\treturn !git_env_bool(\"GIT_CONFIG_NOGLOBAL\", 0);\n-}\n-\n int git_config_early(config_fn_t fn, void *data, const char *repo_config)\n {\n \tint ret = 0, found = 0;\n-- \n1.7.5\n"},{"id":"169064","messageId":"7vy61miws5.fsf@alter.siamese.dyndns.org","threadId":"27510","inReplyTo":"4DE5241E.9030000@ramsay1.demon.co.uk","subject":"Re: [PATCH] config.c: Remove unused git_config_global() function","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-31T17:51:06Z","receivedAt":"2011-05-31T17:51:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n\n> Commit 8f323c00 (drop support for GIT_CONFIG_NOGLOBAL, 15-03-2011)\n> removed the git_config_global() function, among other things, since\n> it is no longer required. Unfortunately, this function has since\n> been unintentionally restored; I suspect by merge commit 25b86e45\n> (Merge branch 'jk/maint-config-alias-fix' into next, 25-05-2011).\n\nYeah, I think it was 1f9a980636 which was a merge between fb674d7 and\n73546c0.  I just compared the output between these two:\n\n   $ git diff fb674d7...73546c0 -- config.c ;# what the topic did\n   $ git diff fb674d7 1f9a980 -- config.c   ;# what was merged\n\nand indeed I can see these four lines snuck in by accidental faulty\nconflict resolution. My bad.\n\nThanks for spotting.\n"},{"id":"169065","messageId":"18203023.45200.1306866084905.JavaMail.root@mail.hq.genarts.com","threadId":"27510","inReplyTo":"7vy61miws5.fsf@alter.siamese.dyndns.org","subject":"Effectively navigating branch history (was: Re: [PATCH] config.c: Remove unused git_config_global() function)","fromName":"Stephen Bash","fromEmail":"bash@genarts.com","sentAt":"2011-05-31T18:21:24Z","receivedAt":"2011-05-31T18:21:24Z","isPatch":true,"sender":{"key":"bash@genarts.com","avatar":null},"body":"----- Original Message -----\n> From: \"Junio C Hamano\" <gitster@pobox.com>\n> Sent: Tuesday, May 31, 2011 1:51:06 PM\n> Subject: Re: [PATCH] config.c: Remove unused git_config_global() function\n> \n> > Commit 8f323c00 (drop support for GIT_CONFIG_NOGLOBAL, 15-03-2011)\n> > removed the git_config_global() function, among other things, since\n> > it is no longer required. Unfortunately, this function has since\n> > been unintentionally restored; I suspect by merge commit 25b86e45\n> > (Merge branch 'jk/maint-config-alias-fix' into next, 25-05-2011).\n> \n> Yeah, I think it was 1f9a980636 which was a merge between fb674d7 and\n> 73546c0. I just compared the output between these two:\n> \n> $ git diff fb674d7...73546c0 -- config.c ;# what the topic did\n> $ git diff fb674d7 1f9a980 -- config.c ;# what was merged\n\nJunio - I'd like to take a chance to learn from a master here if you don't mind.  I often find myself wanting to do the \"what the topic did\" operation but once the branch is merged and deleted, I have difficulty finding useful SHAs to diff.\n\nSo in an attempt to educate myself, I tried to track down fb674d7 and 1f9a980 (and failed miserably).  I can easily find 8f323c00 using 'git log -S git_config_global', but conceptually I want to trace children of 8f323c00 to see where it merged, and that seems ... complicated.  Do you mind walking through your thought process on this problem?\n\nThanks!\nStephen\n"},{"id":"169066","messageId":"7vtycaiuh9.fsf@alter.siamese.dyndns.org","threadId":"27510","inReplyTo":"18203023.45200.1306866084905.JavaMail.root@mail.hq.genarts.com","subject":"Re: Effectively navigating branch history","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-31T18:40:50Z","receivedAt":"2011-05-31T18:40:50Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stephen Bash <bash@genarts.com> writes:\n\n>> Yeah, I think it was 1f9a980636 which was a merge between fb674d7 and\n>> 73546c0. I just compared the output between these two:\n>> \n>> $ git diff fb674d7...73546c0 -- config.c ;# what the topic did\n>> $ git diff fb674d7 1f9a980 -- config.c ;# what was merged\n>\n> I often find myself wanting to do the \"what the topic did\" operation but\n> once the branch is merged and deleted, I have difficulty finding useful\n> SHAs to diff.\n>\n> So in an attempt to educate myself, I tried to track down fb674d7 and\n> 1f9a980 (and failed miserably).\n\nI just did\n\n    $ git log --first-parent master -- config.c\n\nwhich was sufficient for my workflow as most of the commits on master are\nmerges from topics and I can see what each topic did from the merge commit\nsummary message.  \n\n\nIf I were doing this on a codebase I am not very familiar with, I probably\nI would have first narrowed things down a bit by\n\n    $ git grep -n -e NOGLOBAL -- config.c ;# to learn the line number 830\n    $ git blame -L825,835 -- config.c\n\nto learn where the offending NOGLOBAL came from (it is from ab88c363) so\nthat I can say\n\n    $ git log -m -p -GNOGLOBAL ab88c363.. -- config.c\n\nto find that 1f9a980 reintroduced it by mistake.\n"},{"id":"169067","messageId":"21849336.45230.1306867875224.JavaMail.root@mail.hq.genarts.com","threadId":"27510","inReplyTo":"7vtycaiuh9.fsf@alter.siamese.dyndns.org","subject":"Re: Effectively navigating branch history","fromName":"Stephen Bash","fromEmail":"bash@genarts.com","sentAt":"2011-05-31T18:51:15Z","receivedAt":"2011-05-31T18:51:15Z","isPatch":false,"sender":{"key":"bash@genarts.com","avatar":null},"body":"----- Original Message -----\n> From: \"Junio C Hamano\" <gitster@pobox.com>\n> Sent: Tuesday, May 31, 2011 2:40:50 PM\n> Subject: Re: Effectively navigating branch history\n> \n> >> Yeah, I think it was 1f9a980636 which was a merge between fb674d7\n> >> and 73546c0. I just compared the output between these two:\n> >>\n> >> $ git diff fb674d7...73546c0 -- config.c ;# what the topic did\n> >> $ git diff fb674d7 1f9a980 -- config.c ;# what was merged\n> >\n> > I often find myself wanting to do the \"what the topic did\" operation\n> > but once the branch is merged and deleted, I have difficulty finding\n> > useful SHAs to diff.\n> >\n> > So in an attempt to educate myself, I tried to track down fb674d7\n> > and 1f9a980 (and failed miserably).\n> \n> I just did\n> \n> $ git log --first-parent master -- config.c\n> \n> which was sufficient for my workflow as most of the commits on master\n> are merges from topics and I can see what each topic did from the merge\n> commit summary message.\n\nAh, if only our workflow made it that easy... unfortunately it does not ;)\n\n> If I were doing this on a codebase I am not very familiar with, I\n> probably I would have first narrowed things down a bit by\n> \n> $ git grep -n -e NOGLOBAL -- config.c ;# to learn the line number 830\n> $ git blame -L825,835 -- config.c\n> \n> to learn where the offending NOGLOBAL came from (it is from ab88c363)\n> so that I can say\n> \n> $ git log -m -p -GNOGLOBAL ab88c363.. -- config.c\n> \n> to find that 1f9a980 reintroduced it by mistake.\n\nAh, I was missing the -m!  At one point I realized pickaxe was only showing me non-merge commits and skimmed the log manpage to see if there was an option that would enable it but apparently missed -m.\n\nThanks!\n\nStephen\n"}]}