{"thread":{"id":"17922","subject":"[PATCH] Add bare repository indicator for __git_ps1","startedAt":"2009-02-20T14:56:11Z","lastAt":"2009-02-20T22:04:47Z","messageCount":9,"participants":["Marius Storm-Olsen","Johannes Schindelin","Michael J Gruber","Thomas Rast","Ted Pavlic"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"105615","messageId":"499EC48B.9070004@trolltech.com","threadId":"17922","inReplyTo":null,"subject":"[PATCH] Add bare repository indicator for __git_ps1","fromName":"Marius Storm-Olsen","fromEmail":"marius@trolltech.com","sentAt":"2009-02-20T14:56:11Z","receivedAt":"2009-02-20T14:56:11Z","isPatch":true,"sender":{"key":"marius@trolltech.com","avatar":"https://gravatar.com/avatar/a40071d8f651862c6ab10bd7996f0ad84d94f06c0399de9e3fa4f06beb390a71?d=mp&s=160"},"body":"Prefixes the branch name with \"BARE:\" if you're in a\nbare repository.\n\nSigned-off-by: Marius Storm-Olsen <marius@trolltech.com>\n---\n Patch tried sent via ThunderGit extension. Sorry if it's mangled :-)\n\n contrib/completion/git-completion.bash |   10 ++++++++--\n 1 files changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 0a3092f..c741203 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -138,10 +138,16 @@ __git_ps1 ()\n \t\t\tfi\n \t\tfi\n \n+\t\tlocal c\n+\t\t\n+\t\tif test \"$(git config --bool core.bare)\" == \"true\"; then\n+\t\t\tc=\"BARE:\"\n+\t\tfi\n+\n \t\tif [ -n \"${1-}\" ]; then\n-\t\t\tprintf \"$1\" \"${b##refs/heads/}$w$i$r\"\n+\t\t\tprintf \"$1\" \"$c${b##refs/heads/}$w$i$r\"\n \t\telse\n-\t\t\tprintf \" (%s)\" \"${b##refs/heads/}$w$i$r\"\n+\t\t\tprintf \" (%s)\" \"$c${b##refs/heads/}$w$i$r\"\n \t\tfi\n \tfi\n }\n-- \n1.6.2.rc1.20.g8c5b\n"},{"id":"105624","messageId":"alpine.DEB.1.00.0902201734450.6302@intel-tinevez-2-302","threadId":"17922","inReplyTo":"499EC48B.9070004@trolltech.com","subject":"Re: [PATCH] Add bare repository indicator for __git_ps1","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-02-20T16:35:25Z","receivedAt":"2009-02-20T16:35:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 20 Feb 2009, Marius Storm-Olsen wrote:\n\n> +\t\tlocal c\n> +\t\t+\t\tif test \"$(git config --bool core.bare)\" ==\n> \"true\"; then\n\nIndeed, it seems that this got mangled, unfortunately.\n\nCiao,\nDscho\n"},{"id":"105626","messageId":"499EDCCC.3030700@drmicha.warpmail.net","threadId":"17922","inReplyTo":"499EC48B.9070004@trolltech.com","subject":"Re: [PATCH] Add bare repository indicator for __git_ps1","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-02-20T16:39:40Z","receivedAt":"2009-02-20T16:39:40Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;\n> rv:1.8.1.19) Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19\n> ThunderGit/0.1a Mnenhy/0.7.6.666\n\nMarius Storm-Olsen venit, vidit, dixit 20.02.2009 15:56:\n> Prefixes the branch name with \"BARE:\" if you're in a bare\n> repository.\n> \n> Signed-off-by: Marius Storm-Olsen <marius@trolltech.com> --- Patch\n> tried sent via ThunderGit extension. Sorry if it's mangled :-)\n\nNow what's that ThunderGit thingy? ;)\n\nSeriously, I see you and Dscho have been carrying this on, and soon\nexternal commands may be lauched. Is this going in a git specific\ndirection rather than attaching patch files unmangled (UnflowedTB)?\n\nMichael\n"},{"id":"105627","messageId":"200902201746.15242.trast@student.ethz.ch","threadId":"17922","inReplyTo":"alpine.DEB.1.00.0902201734450.6302@intel-tinevez-2-302","subject":"Re: [PATCH] Add bare repository indicator for __git_ps1","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-02-20T16:46:10Z","receivedAt":"2009-02-20T16:46:10Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Fri, 20 Feb 2009, Marius Storm-Olsen wrote:\n> \n> > +\t\tlocal c\n> > +\t\t+\t\tif test \"$(git config --bool core.bare)\" ==\n> > \"true\"; then\n> \n> Indeed, it seems that this got mangled, unfortunately.\n\nActually it seems the patch itself is fine, but the mail is still\nflagged format=flowed, so f=f-aware readers will mangle it on display.\n\nIt conflicts with e5dd864 (completion: Better __git_ps1 support when\nnot in working directory, 2009-02-11) however, which is on next.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"105630","messageId":"499EE324.4050305@tedpavlic.com","threadId":"17922","inReplyTo":"499EC48B.9070004@trolltech.com","subject":"Re: [PATCH] Add bare repository indicator for __git_ps1","fromName":"Ted Pavlic","fromEmail":"ted@tedpavlic.com","sentAt":"2009-02-20T17:06:44Z","receivedAt":"2009-02-20T17:06:44Z","isPatch":true,"sender":{"key":"ted@tedpavlic.com","avatar":"https://gravatar.com/avatar/d085392370ff4c028cf17a0e81e0647744c9682fbcb36b499f31d08ef80ef569?d=mp&s=160"},"body":"> +\t\tif test \"$(git config --bool core.bare)\" == \"true\"; then\n\nAs discussed in another thread, to be consistent with local coding \nconvention, \"test\" should be replaced with \"[ ... ]\".\n\nAdditionally, double equality (==) should be replaced with single \nequality (=).\n\n--Ted\n\n-- \nTed Pavlic <ted@tedpavlic.com>\n\n   Please visit my ALS association page:\n         http://web.alsa.org/goto/tedpavlic\n   My family appreciates your support in the fight to defeat ALS.\n"},{"id":"105632","messageId":"499EE49C.1070707@drmicha.warpmail.net","threadId":"17922","inReplyTo":"200902201746.15242.trast@student.ethz.ch","subject":"Re: [PATCH] Add bare repository indicator for __git_ps1","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-02-20T17:13:00Z","receivedAt":"2009-02-20T17:13:00Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Thomas Rast venit, vidit, dixit 20.02.2009 17:46:\n> Johannes Schindelin wrote:\n>> Hi,\n>>\n>> On Fri, 20 Feb 2009, Marius Storm-Olsen wrote:\n>>\n>>> +\t\tlocal c\n>>> +\t\t+\t\tif test \"$(git config --bool core.bare)\" ==\n>>> \"true\"; then\n>> Indeed, it seems that this got mangled, unfortunately.\n> \n> Actually it seems the patch itself is fine, but the mail is still\n> flagged format=flowed, so f=f-aware readers will mangle it on display.\n\nUnmangled here also, viewing with TB, f-f disabled or not, unless I make\nthe window very small of course.\n\nMichael\n"},{"id":"105657","messageId":"499F26E8.5090105@trolltech.com","threadId":"17922","inReplyTo":"499EDCCC.3030700@drmicha.warpmail.net","subject":"Re: [PATCH] Add bare repository indicator for __git_ps1","fromName":"Marius Storm-Olsen","fromEmail":"marius@trolltech.com","sentAt":"2009-02-20T21:55:52Z","receivedAt":"2009-02-20T21:55:52Z","isPatch":true,"sender":{"key":"marius@trolltech.com","avatar":"https://gravatar.com/avatar/a40071d8f651862c6ab10bd7996f0ad84d94f06c0399de9e3fa4f06beb390a71?d=mp&s=160"},"body":"Michael J Gruber said the following on 20.02.2009 17:39:\n>> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;\n>> rv:1.8.1.19) Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19\n>> ThunderGit/0.1a Mnenhy/0.7.6.666\n\nHeh, you noticed the user-agent extra \\o/ :-)\n\n\n> Marius Storm-Olsen venit, vidit, dixit 20.02.2009 15:56:\n>> Prefixes the branch name with \"BARE:\" if you're in a bare \n>> repository.\n>> \n>> Signed-off-by: Marius Storm-Olsen <marius@trolltech.com> ---\n>> Patch tried sent via ThunderGit extension. Sorry if it's mangled\n>> :-)\n> \n> Now what's that ThunderGit thingy? ;)\n> \n> Seriously, I see you and Dscho have been carrying this on, and soon\n> external commands may be lauched. Is this going in a git specific \n> direction rather than attaching patch files unmangled (UnflowedTB)?\n\nWell, Dscho's intentions was, as the project name says, to simply send \npatches unflowed. I have, however, had many other features which I \nwould like to see in a Git extension, which is why called it \nThunderGit instead. First I want the extension to help with Best \nPractices for sending patches. Second, I want the extension to have \nneatness like:\n\n   1) Saving a whole patch series as a mailbox, for easy apply. Maybe\n      even a \"create new branch based on <branch>, and apply series\"\n      feature? ^shrug^\n\n   2) Send patch (series) based on a selected email\n      (ie. setting \"references\" based on selection)\n\n   3) Showing Git patches with diff coloring (maybe also in the\n      editor, but mostly for received mails)\n\n   4) Basic validation of patch before sending, like\n      a) trailing whitespace\n      b) consistent preceding whitespaces\n      c) <add favorite>\n\nThis is my first extension though, so any help from people \"in the \nknow\" would be great!\n\nIf all attempts fail to make the extension fool proof wrt sending \nproper unflowed patches, we could always just use Thunderbird as the \nfront-end for 'git send-email' ;-) I'm almost tempted to already go \nthat route, simply to avoid all the hassle. Then we could also just \nuse the plaintext composer, instead of the HTML composer which isn't \nexactly \"fool proof\" for plaintext patches.\n\n--\n.marius\n"},{"id":"105658","messageId":"499F27F9.8090506@trolltech.com","threadId":"17922","inReplyTo":"499EE324.4050305@tedpavlic.com","subject":"Re: [PATCH] Add bare repository indicator for __git_ps1","fromName":"Marius Storm-Olsen","fromEmail":"marius@trolltech.com","sentAt":"2009-02-20T22:00:25Z","receivedAt":"2009-02-20T22:00:25Z","isPatch":true,"sender":{"key":"marius@trolltech.com","avatar":"https://gravatar.com/avatar/a40071d8f651862c6ab10bd7996f0ad84d94f06c0399de9e3fa4f06beb390a71?d=mp&s=160"},"body":"Ted Pavlic said the following on 20.02.2009 18:06:\n>> +\t\tif test \"$(git config --bool core.bare)\" == \"true\"; then\n> \n> As discussed in another thread, to be consistent with local coding\n>  convention, \"test\" should be replaced with \"[ ... ]\".\n> \n> Additionally, double equality (==) should be replaced with single \n> equality (=).\n\nOk, I think I was based off of master at the time. I'll take a closer \nlook. Thanks!\n\n--\n.marius\n"},{"id":"105659","messageId":"499F28FF.30905@trolltech.com","threadId":"17922","inReplyTo":"200902201746.15242.trast@student.ethz.ch","subject":"Re: [PATCH] Add bare repository indicator for __git_ps1","fromName":"Marius Storm-Olsen","fromEmail":"marius@trolltech.com","sentAt":"2009-02-20T22:04:47Z","receivedAt":"2009-02-20T22:04:47Z","isPatch":true,"sender":{"key":"marius@trolltech.com","avatar":"https://gravatar.com/avatar/a40071d8f651862c6ab10bd7996f0ad84d94f06c0399de9e3fa4f06beb390a71?d=mp&s=160"},"body":"Thomas Rast said the following on 20.02.2009 17:46:\n> Johannes Schindelin wrote:\n>> On Fri, 20 Feb 2009, Marius Storm-Olsen wrote:\n>>> +\t\tlocal c\n>>> +\t\t+\t\tif test \"$(git config --bool core.bare)\" ==\n>>> \"true\"; then\n>> Indeed, it seems that this got mangled, unfortunately.\n> \n> Actually it seems the patch itself is fine, but the mail is still \n> flagged format=flowed, so f=f-aware readers will mangle it on\n> display.\n\nHmm, it looks ok for me as well, though I do see the incorrect \nformat=flowed for this unflowed mail. I think it's one of my other \nextensions causing this, but I'm not sure. I need to disable them to \ncheck.\n\n\n> It conflicts with e5dd864 (completion: Better __git_ps1 support\n> when not in working directory, 2009-02-11) however, which is on\n> next.\n\nOk, I think I was based on master. I'll rebase and do fixups on Monday.\n\nThanks!\n\n--\n.marius\n"}]}