{"thread":{"id":"13378","subject":"[PATCH] Pay attention to GIT_DIR when searching the git directory","startedAt":"2008-05-05T00:09:38Z","lastAt":"2008-05-05T16:48:31Z","messageCount":8,"participants":["Jörg Sommer","Johannes Schindelin","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"76055","messageId":"1209946178-29398-1-git-send-email-joerg@alea.gnuu.de","threadId":"13378","inReplyTo":null,"subject":"[PATCH] Pay attention to GIT_DIR when searching the git directory","fromName":"Jörg Sommer","fromEmail":"joerg@alea.gnuu.de","sentAt":"2008-05-05T00:09:38Z","receivedAt":"2008-05-05T00:09:38Z","isPatch":true,"sender":{"key":"joerg@alea.gnuu.de","avatar":null},"body":"\nSigned-off-by: Jörg Sommer <joerg@alea.gnuu.de>\n---\n contrib/hooks/setgitperms.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/hooks/setgitperms.perl b/contrib/hooks/setgitperms.perl\nindex dab7c8e..0b1bcf2 100644\n--- a/contrib/hooks/setgitperms.perl\n+++ b/contrib/hooks/setgitperms.perl\n@@ -51,7 +51,7 @@ if ((@ARGV < 0) || !GetOptions(\n die $usage unless ($read_mode xor $write_mode);\n \n my $topdir = `git-rev-parse --show-cdup` or die \"\\n\"; chomp $topdir;\n-my $gitdir = $topdir . '.git';\n+my $gitdir = $ENV{GIT_DIR} || $topdir . '.git';\n my $gitmeta = $topdir . '.gitmeta';\n \n if ($write_mode) {\n-- \n1.5.5.1\n"},{"id":"76111","messageId":"alpine.DEB.1.00.0805051234260.30431@racer","threadId":"13378","inReplyTo":"1209946178-29398-1-git-send-email-joerg@alea.gnuu.de","subject":"Re: [PATCH] Pay attention to GIT_DIR when searching the git directory","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-05T11:36:11Z","receivedAt":"2008-05-05T11:36:11Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 5 May 2008, Jörg Sommer wrote:\n\n> Signed-off-by: Jörg Sommer <joerg@alea.gnuu.de>\n\nAm I the only one wondering what the subject tries to tell me?\n\n>  contrib/hooks/setgitperms.perl |    2 +-\n\nThis tells me more...\n\nPlease keep in mind that the commit log is meant to demonstrate the \n_intention_ of the patches.  If you do not say _what_ is affected by the \nchange, you only confuse the readers.\n\nCiao,\nDscho"},{"id":"76121","messageId":"20080505125302.GA11523@alea.gnuu.de","threadId":"13378","inReplyTo":"alpine.DEB.1.00.0805051234260.30431@racer","subject":"Re: [PATCH] Pay attention to GIT_DIR when searching the git directory","fromName":"Jörg Sommer","fromEmail":"joerg@alea.gnuu.de","sentAt":"2008-05-05T12:53:02Z","receivedAt":"2008-05-05T12:53:02Z","isPatch":true,"sender":{"key":"joerg@alea.gnuu.de","avatar":null},"body":"Hi,\n\nJohannes Schindelin schrieb am Mon 05. May, 12:36 (+0100):\n> On Mon, 5 May 2008, Jörg Sommer wrote:\n> \n> >  contrib/hooks/setgitperms.perl |    2 +-\n> \n> This tells me more...\n> \n> Please keep in mind that the commit log is meant to demonstrate the \n> _intention_ of the patches.\n\nThe intention is that the variable GIT_DIR is respected when searching\nfor the git dir.\n\n> If you do not say _what_ is affected by the change, you only confuse\n> the readers.\n\nDo you want something like “initialization: Pay attention to GIT_DIR when\nsearching the git directory”?\n\nIs there a document with guidelines for commit messages, e.g. write the\nfirst letter upper or lower case?\n\nBye, Jörg.\n-- \nDie Katze steht im Mittelpunkt unserer Arbeit.\nAlles was wir tun, ist für sie.\n"},{"id":"76123","messageId":"alpine.DEB.1.00.0805051437040.30431@racer","threadId":"13378","inReplyTo":"20080505125302.GA11523@alea.gnuu.de","subject":"Re: [PATCH] Pay attention to GIT_DIR when searching the git directory","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-05T13:39:46Z","receivedAt":"2008-05-05T13:39:46Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 5 May 2008, Jörg Sommer wrote:\n\n> Johannes Schindelin schrieb am Mon 05. May, 12:36 (+0100):\n>\n> > Please keep in mind that the commit log is meant to demonstrate the \n> > _intention_ of the patches.\n> \n> The intention is that the variable GIT_DIR is respected when searching \n> for the git dir.\n\nAFAICT the core of git respects GIT_DIR very much.  Reading your oneline, \nindeed, the whole commit message, scared me a bit, because I thought that \nthere was a bug in core git.\n\nYour commit message completely misses out on the fact that it fixes a bug \nin a _hook_, and a _contributed_ at that.\n\nSo I would have known _exactly_ what you did if your oneline had read\n\n\tcontrib/hooks/setgitperms: respect GIT_DIR\n\nDon't you agree?\n\nCiao,\nDscho\n"},{"id":"76127","messageId":"m3r6cg6dur.fsf@localhost.localdomain","threadId":"13378","inReplyTo":"20080505125302.GA11523@alea.gnuu.de","subject":"Re: [PATCH] Pay attention to GIT_DIR when searching the git directory","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-05-05T14:10:53Z","receivedAt":"2008-05-05T14:10:53Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Jörg Sommer <joerg@alea.gnuu.de> writes:\n\n> Johannes Schindelin schrieb am Mon 05. May, 12:36 (+0100):\n\n> > If you do not say _what_ is affected by the change, you only confuse\n> > the readers.\n> \n> Do you want something like “initialization: Pay attention to GIT_DIR when\n> searching the git directory”?\n\nI think the idea was to use\n  \"contrib/hooks/setgitperms: Use GIT_DIR if set\"\nor something like that.\n \n> Is there a document with guidelines for commit messages, e.g. write the\n> first letter upper or lower case?\n\nThere are a few unwritten conventions.  You can always check existing\ncommit messages, via\n\n  $ git log --pretty=oneline --abbrev-commit --no-merges\n\nand see that commit title (first line of commit message) is either\nshort sentence starting with upper case, bt without fullstop, or\nsentence preceded by the subsystem affected, using \"<subsystem>:\"\nprefix.\n\nExamples:\n  Fix use after free() in builtin-fetch\n  git-svn: detect and fail gracefully when dcommitting to a void\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"76137","messageId":"20080505153029.GA12733@alea.gnuu.de","threadId":"13378","inReplyTo":"m3r6cg6dur.fsf@localhost.localdomain","subject":"Re: [PATCH] Pay attention to GIT_DIR when searching the git directory","fromName":"Jörg Sommer","fromEmail":"joerg@alea.gnuu.de","sentAt":"2008-05-05T15:30:29Z","receivedAt":"2008-05-05T15:30:29Z","isPatch":true,"sender":{"key":"joerg@alea.gnuu.de","avatar":null},"body":"Hi Jakub,\n\nJakub Narebski schrieb am Mon 05. May, 07:10 (-0700):\n> Jörg Sommer <joerg@alea.gnuu.de> writes:\n> > Johannes Schindelin schrieb am Mon 05. May, 12:36 (+0100):\n> \n> > > If you do not say _what_ is affected by the change, you only confuse\n> > > the readers.\n> > \n> > Do you want something like “initialization: Pay attention to GIT_DIR when\n> > searching the git directory”?\n> \n> I think the idea was to use\n>   \"contrib/hooks/setgitperms: Use GIT_DIR if set\"\n> or something like that.\n\nWell, if this is the prefered form, I'll use it. But I don't like it,\nbecause the affected file is a piece of information that's already in the\ncommit object. And it makes the :/ syntax useless, because in a series of\ncommits all commits start with the same string: the filename. Thirdly, in\ngitk I've the problem that the space is very limited (because of my\nscreen) and it is very annoying to see the same string at the begin of\nevery commit message, especially when I've filtered for one file.\n\n> > Is there a document with guidelines for commit messages, e.g. write the\n> > first letter upper or lower case?\n> \n> There are a few unwritten conventions.\n\nAre there any plans to write them down?\n\nShould I resend the patch or can Junio fix the commit message? I would\ntake your suggestion.\n\nBye, Jörg.\n-- \nGeld allein macht nicht glücklich, aber es ist besser in einem Taxi zu\nweinen, als in der Straßenbahn.\n\t       \t   \t       \t\t\t(Marcel Reich‐Ranicki)\n"},{"id":"76138","messageId":"alpine.DEB.1.00.0805051731350.30431@racer","threadId":"13378","inReplyTo":"20080505153029.GA12733@alea.gnuu.de","subject":"Re: [PATCH] Pay attention to GIT_DIR when searching the git directory","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-05T16:33:27Z","receivedAt":"2008-05-05T16:33:27Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 5 May 2008, Jörg Sommer wrote:\n\n> Hi Jakub,\n> \n> Jakub Narebski schrieb am Mon 05. May, 07:10 (-0700):\n> > Jörg Sommer <joerg@alea.gnuu.de> writes:\n> > > Johannes Schindelin schrieb am Mon 05. May, 12:36 (+0100):\n> > \n> > > > If you do not say _what_ is affected by the change, you only \n> > > > confuse the readers.\n> > > \n> > > Do you want something like “initialization: Pay attention to GIT_DIR \n> > > when searching the git directory”?\n> > \n> > I think the idea was to use\n> >   \"contrib/hooks/setgitperms: Use GIT_DIR if set\"\n> > or something like that.\n> \n> Well, if this is the prefered form, I'll use it. But I don't like it,\n> because the affected file is a piece of information that's already in the\n> commit object.\n\nWell, I don't like that you thereby waste the time of those who look at \nthe commit message.  By your reasoning, one might think that commit \nmessages are superfluous, because you can always read the patch, or go \nback to the mailing list thread.\n\nCiao,\nDscho\n> > There are a few unwritten conventions.\n> \n> Are there any plans to write them down?\n\nActually, they are written down implicitly.  You can look at them with the \ncommand \"git log\".\n\nCiao,\nDscho\n"},{"id":"76142","messageId":"200805051848.32216.jnareb@gmail.com","threadId":"13378","inReplyTo":"20080505153029.GA12733@alea.gnuu.de","subject":"Re: [PATCH] Pay attention to GIT_DIR when searching the git directory","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-05-05T16:48:31Z","receivedAt":"2008-05-05T16:48:31Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Mon, 5. May 2008, Jörg Sommer wrote:\n> Hi Jakub,\n> \n> Jakub Narebski schrieb am Mon 05. May, 07:10 (-0700):\n>> Jörg Sommer <joerg@alea.gnuu.de> writes:\n>>> Johannes Schindelin schrieb am Mon 05. May, 12:36 (+0100):\n>> \n>>>> If you do not say _what_ is affected by the change, you only confuse\n>>>> the readers.\n>>> \n>>> Do you want something like “initialization: Pay attention to GIT_DIR when\n>>> searching the git directory”?\n>> \n>> I think the idea was to use\n>>   \"contrib/hooks/setgitperms: Use GIT_DIR if set\"\n>> or something like that.\n> \n> Well, if this is the prefered form, I'll use it. But I don't like it,\n> because the affected file is a piece of information that's already in the\n> commit object. \n\nFirst, it is \"subsystem\", not the affected file. 'git-svn', 'gitweb',\n'bash', 'completion'; in this case perhaps 'contrib/hooks', i.e.\n  \"contrib/hooks: Use GIT_DIR in setgitperms hook, if set\"\nor something like that.  IMVHO if a patch affest specific subsystem\nonly, and not the core part of git, you should always use subsystem\nprefix, unless the name of subsystem can be put / is put in the commit\nsubject (first line of commit message).\n\nSecond, commit message should be written in such way that it is easy to\nunderstand what the commit does from the first line (the commit summary),\nand easy to understand the whats and whys of change from the full commit\nmessage.  In \"git log\" output you don't see files affected by a commit.\n\n> And it makes the :/ syntax useless, because in a series of \n> commits all commits start with the same string: the filename.\n\nCommits affecting core don't need to start with a filename, dirname,\nor subsystem name.  I gave an example _without_ prefix, didn't I?\n\n[...]\n>>> Is there a document with guidelines for commit messages, e.g. write the\n>>> first letter upper or lower case?\n>> \n>> There are a few unwritten conventions.\n> \n> Are there any plans to write them down?\n\nI think it is true for every project that to send good commit you have\nto lurk a little, and examine existing commit messages when writting\none.  Linus Torvalds usually writes good commit messages here.\n\n-- \nJakub Narebski\nPoland\n"}]}