{"thread":{"id":"13633","subject":"Multiple user questions","startedAt":"2008-05-23T11:27:37Z","lastAt":"2008-05-27T08:24:08Z","messageCount":7,"participants":["Dennis Schridde","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"77537","messageId":"200805231327.41216.devurandom@gmx.net","threadId":"13633","inReplyTo":null,"subject":"Multiple user questions","fromName":"Dennis Schridde","fromEmail":"devurandom@gmx.net","sentAt":"2008-05-23T11:27:37Z","receivedAt":"2008-05-23T11:27:37Z","isPatch":false,"sender":{"key":"devurandom@gmx.net","avatar":null},"body":"Hello!\n\nI have some questions regarding the usage of Git, I did not find answered in \nmanpages or on IRC:\n\n1) Can I somehow make send-email just send one email with multiple patches \nattached?\n2) Can I make format-patch include the full commit message, date, author, \nstats in the patches? (To mimic what git-show would show me.)\nWill this be sent via send-email, too?\n3) Can I make format-patch --attach / --inline additionaly include this in the \nattachements as well?\n4) Can I make format-patch output one deletion and one insertion for a \ncomplete rewrite of a function, instead of multiple deletes/inserts?\n5) If rebase -i does not keep at least one valid line, it will \"do nothing\" \n(instead of deleting all revisions). Is that intended? Why?\n\nThanks for your answers,\nDennis\n"},{"id":"77538","messageId":"200805231337.04764.devurandom@gmx.net","threadId":"13633","inReplyTo":"200805231327.41216.devurandom@gmx.net","subject":"Re: Multiple user questions","fromName":"Dennis Schridde","fromEmail":"devurandom@gmx.net","sentAt":"2008-05-23T11:37:04Z","receivedAt":"2008-05-23T11:37:04Z","isPatch":false,"sender":{"key":"devurandom@gmx.net","avatar":null},"body":"Am Freitag, 23. Mai 2008 13:27:37 schrieb Dennis Schridde:\n> Hello!\n>\n> I have some questions regarding the usage of Git, I did not find answered\n> in manpages or on IRC:\n>\n> 1) Can I somehow make send-email just send one email with multiple patches\n> attached?\n> 2) Can I make format-patch include the full commit message, date, author,\n> stats in the patches? (To mimic what git-show would show me.)\n> Will this be sent via send-email, too?\n> 3) Can I make format-patch --attach / --inline additionaly include this in\n> the attachements as well?\n> 4) Can I make format-patch output one deletion and one insertion for a\n> complete rewrite of a function, instead of multiple deletes/inserts?\n> 5) If rebase -i does not keep at least one valid line, it will \"do nothing\"\n> (instead of deleting all revisions). Is that intended? Why?\n>\n> Thanks for your answers,\n> Dennis\nPS: Please CC me, because I am not subscribed.\n"},{"id":"77629","messageId":"m3zlqg32w9.fsf@localhost.localdomain","threadId":"13633","inReplyTo":"200805231327.41216.devurandom@gmx.net","subject":"Re: Multiple user questions","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-05-24T01:30:43Z","receivedAt":"2008-05-24T01:30:43Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Dennis Schridde <devurandom@gmx.net> writes:\n\n> 1) Can I somehow make send-email just send one email with multiple patches \n> attached?\n\nThis way you cannot reply to each patch separately in an easy way.\nThats what \"[PATCH n/m]\" and threading/chaining to cover letter is\nfor.\n\n> 2) Can I make format-patch include the full commit message, date, author, \n> stats in the patches? (To mimic what git-show would show me.)\n> Will this be sent via send-email, too?\n\nErrr... git-format-patch output _does_ include full commit message,\nauthor, author date and diffstat.\n\ngit-send-email can send fir-format-patch patches (and usually is used\nin such way).\n\n> 4) Can I make format-patch output one deletion and one insertion for a \n> complete rewrite of a function, instead of multiple deletes/inserts?\n\nTry git-format-patch with -B option, or -B<num>.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"77647","messageId":"200805241113.57848.devurandom@gmx.net","threadId":"13633","inReplyTo":"m3zlqg32w9.fsf@localhost.localdomain","subject":"Re: Multiple user questions","fromName":"Dennis Schridde","fromEmail":"devurandom@gmx.net","sentAt":"2008-05-24T09:13:54Z","receivedAt":"2008-05-24T09:13:54Z","isPatch":false,"sender":{"key":"devurandom@gmx.net","avatar":null},"body":"Thanks for your answers!\n\nAm Samstag, 24. Mai 2008 03:30:43 schrieb Jakub Narebski:\n> Dennis Schridde <devurandom@gmx.net> writes:\n> > 2) Can I make format-patch include the full commit message, date, author,\n> > stats in the patches? (To mimic what git-show would show me.)\n> > Will this be sent via send-email, too?\n>\n> Errr... git-format-patch output _does_ include full commit message,\n> author, author date and diffstat.\nFor me only the first line of the commit message is printed in the subject, \nall other lines are missing.\nIf I want a message to appear in the body at all, I need a special way to \nformat my commit messages: 1 line summary, 1 empty line, description.\nOnly the description is then shown in the email.\nThis seems inconvenient, especially for smaller changes.\n\nFurther, attachments do not at all contain any information like that.\nSee the attached example.\n\n> > 4) Can I make format-patch output one deletion and one insertion for a\n> > complete rewrite of a function, instead of multiple deletes/inserts?\n>\n> Try git-format-patch with -B option, or -B<num>.\nI tried that already.\nWhether I specified -B or not, it always gave the exact same output (says \ndiff).\n\nThe <num> parameter to -B is not mentioned or explained in the manpages.\n\n5) fsck --full --lost-found shows me a lot of \"dangling commit\". I would like \nto clean them up. prune did only remove \"dangling tree\" and blobs.\n(Reason: Last time I droped a stash accidently, I was able to find it in that \nlist. I will not be able to do this again if it continues to grow at that \nrate.)\nHow can I do that?\nFurther fsck --full --unreachable also shows a lot of unreachable things \n(commits, trees, blobs). Can that be cleaned up as well?\n\nGreetings,\nDennis\n\nAgain: Please CC me, as I am not subscribed.\n\n\ndiff --git a/src/projectile.c b/src/projectile.c\nindex 1389d4c..f9ae99a 100644\n--- a/src/projectile.c\n+++ b/src/projectile.c\n@@ -640,8 +640,8 @@ static void proj_InFlightDirectFunc( PROJECTILE *psProj )\n \t/* we want a delay between Las-Sats firing and actually hitting in multiPlayer\n \tmagic number but that's how long the audio countdown message lasts! */\n \tconst unsigned int LAS_SAT_DELAY = 8;\n-\tunsigned int timeSoFar;\n-\tunsigned int distancePercent; /* How far we are 0..100 */\n+\tint timeSoFar;\n+\tint distancePercent; /* How far we are 0..100 */\n \tfloat distanceRatio; /* How far we are, 1.0==at target */\n \tfloat distanceExtensionFactor; /* Extended lifespan */\n \tVector3i move;\n@@ -909,8 +909,8 @@ static void proj_InFlightIndirectFunc( PROJECTILE *psProj )\n \t\t- Some optimisations by leaving out tests which are never true (homing, AA, counter-missile, lassat)\n \t*/\n \n-\tunsigned int timeSoFar;\n-\tunsigned int distancePercent; /* How far we are 0..100 */\n+\tint timeSoFar;\n+\tint distancePercent; /* How far we are 0..100 */\n \tfloat distanceRatio; /* How far we are, 1.0==at target */\n \tfloat distanceExtensionFactor; /* Extended lifespan */\n \tVector3i move;\n"},{"id":"77652","messageId":"200805241433.42954.jnareb@gmail.com","threadId":"13633","inReplyTo":"200805241113.57848.devurandom@gmx.net","subject":"Re: Multiple user questions","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-05-24T12:33:42Z","receivedAt":"2008-05-24T12:33:42Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Dnia sobota 24. maja 2008 11:13, Dennis Schridde napisał:\n> Thanks for your answers!\n\nYou are welcome.\n \n> Am Samstag, 24. Mai 2008 03:30:43 schrieb Jakub Narebski:\n>> Dennis Schridde <devurandom@gmx.net> writes:\n>>> 2) Can I make format-patch include the full commit message, date, author,\n>>> stats in the patches? (To mimic what git-show would show me.)\n>>> Will this be sent via send-email, too?\n>>\n>> Errr... git-format-patch output _does_ include full commit message,\n>> author, author date and diffstat.\n>>\n> For me only the first line of the commit message is printed in the subject, \n> all other lines are missing.\n\nWhat version of git do you use? If I remember correctly this area\nwas worked on some time ago, so git-format-patch takes now whole first\nparagraph as a subject of email, folding it using appropriate RFC\nstyle.\n\nNote though that git-am migh convert this first paragraph to single\nline, losing formatting in the progress.  I think there is some option\nto preserve formatting.\n\n> If I want a message to appear in the body at all, I need a special way to \n> format my commit messages: 1 line summary, 1 empty line, description.\n> Only the description is then shown in the email.\n> This seems inconvenient, especially for smaller changes.\n\nWhat do you think this commit message convention git uses is from?\nIt stems from exchanging patches by email, where you had to put short,\nsingle line description in the email subject, and describe change in\nmore detail in message (email) body.  If you don't follow this\ncommit message convention many git tools (tig, gitk, git-shortlog, etc.)\nwill not work as expected.\n\n> Further, attachments do not at all contain any information like that.\n> See the attached example.\n\nErrr... I just tried \"git format-patch --attach\"[1] and it creates by\ndefault multi-part attachement, first part is commit message, second\nis patch itself.  The commit message contains diffstat.\n\nThis is if I remember correctly quite new thing, so it might need\nsome polishing.\n\n[1] I use git version 1.5.5\n\n>>> 4) Can I make format-patch output one deletion and one insertion for a\n>>> complete rewrite of a function, instead of multiple deletes/inserts?\n>>\n>> Try git-format-patch with -B option, or -B<num>.\n>>\n> I tried that already.  Whether I specified -B or not, it always gave\n> the exact same output (says diff).\n\nAh, I'm sorry.  The -B is to recognize total rewrite, i.e. such a change\nthat is best represent as delete old contents and create new one.\n\nIf I remember correctly there was some work lately, I think by Linus,\nto join together neighbour chunks to make diff more readable.  But\nI think there were no configurable parameters... I also don't remember\nif it hit released version...\n\n> The <num> parameter to -B is not mentioned or explained in the manpages.\n\nIt is explained in diffcore, which in future version of git would be\nin manpage, and not only as HTML / text documentation.\n\n-- \nJakub Narebski\nPoland\n"},{"id":"77700","messageId":"200805251049.59418.devurandom@gmx.net","threadId":"13633","inReplyTo":"200805241433.42954.jnareb@gmail.com","subject":"Re: Multiple user questions","fromName":"Dennis Schridde","fromEmail":"devurandom@gmx.net","sentAt":"2008-05-25T08:49:54Z","receivedAt":"2008-05-25T08:49:54Z","isPatch":false,"sender":{"key":"devurandom@gmx.net","avatar":null},"body":"Am Samstag, 24. Mai 2008 14:33:42 schrieb Jakub Narebski:\n> Dnia sobota 24. maja 2008 11:13, Dennis Schridde napisał:\n> > Am Samstag, 24. Mai 2008 03:30:43 schrieb Jakub Narebski:\n> >> Dennis Schridde <devurandom@gmx.net> writes:\n> >>> 2) Can I make format-patch include the full commit message, date,\n> >>> author, stats in the patches? (To mimic what git-show would show me.)\n> >>> Will this be sent via send-email, too?\n> >>\n> >> Errr... git-format-patch output _does_ include full commit message,\n> >> author, author date and diffstat.\n> >\n> > For me only the first line of the commit message is printed in the\n> > subject, all other lines are missing.\n>\n> What version of git do you use? If I remember correctly this area\n> was worked on some time ago, so git-format-patch takes now whole first\n> paragraph as a subject of email, folding it using appropriate RFC\n> style.\nThen that multiline subject must have been lost somewhere along the way. Maybe \nsome mailserver in between striped it down to one line...\n\n> > If I want a message to appear in the body at all, I need a special way to\n> > format my commit messages: 1 line summary, 1 empty line, description.\n> > Only the description is then shown in the email.\n> > This seems inconvenient, especially for smaller changes.\n>\n> What do you think this commit message convention git uses is from?\n> It stems from exchanging patches by email, where you had to put short,\n> single line description in the email subject, and describe change in\n> more detail in message (email) body.  If you don't follow this\n> commit message convention many git tools (tig, gitk, git-shortlog, etc.)\n> will not work as expected.\nI guess this is then a feature request?\nTo use first line for subject, and repeat the whole commit-message in the \nbody?\n\n> > Further, attachments do not at all contain any information like that.\n> > See the attached example.\n>\n> Errr... I just tried \"git format-patch --attach\"[1] and it creates by\n> default multi-part attachement, first part is commit message, second\n> is patch itself.  The commit message contains diffstat.\nI wanted to know whether I could make that 2nd part (\"patch itself\") also \ncontain the whole commit message, date, author (so it looks like what \ngit-show gives me).\n\n> [1] I use git version 1.5.5\nI use 1.5.5.1\n\n> >>> 4) Can I make format-patch output one deletion and one insertion for a\n> >>> complete rewrite of a function, instead of multiple deletes/inserts?\n> >>\n> >> Try git-format-patch with -B option, or -B<num>.\n> >\n> > I tried that already.  Whether I specified -B or not, it always gave\n> > the exact same output (says diff).\n>\n> Ah, I'm sorry.  The -B is to recognize total rewrite, i.e. such a change\n> that is best represent as delete old contents and create new one.\nTotal rewrite of a file? So not appropriate for the total rewrite of just a \nfunction?\n\n--Dennis\n"},{"id":"77830","messageId":"200805271024.09235.jnareb@gmail.com","threadId":"13633","inReplyTo":"200805251049.59418.devurandom@gmx.net","subject":"Re: Multiple user questions","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-05-27T08:24:08Z","receivedAt":"2008-05-27T08:24:08Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Dnia niedziela 25. maja 2008 10:49, Dennis Schridde napisał:\n> Am Samstag, 24. Mai 2008 14:33:42 schrieb Jakub Narebski:\n>> Dnia sobota 24. maja 2008 11:13, Dennis Schridde napisał:\n>>> Am Samstag, 24. Mai 2008 03:30:43 schrieb Jakub Narebski:\n>>>> Dennis Schridde <devurandom@gmx.net> writes:\n>>>>>\n>>>>> 2) Can I make format-patch include the full commit message, date,\n>>>>> author, stats in the patches? (To mimic what git-show would show me.)\n>>>>> Will this be sent via send-email, too?\n>>>>\n>>>> Errr... git-format-patch output _does_ include full commit message,\n>>>> author, author date and diffstat.\n>>>\n>>> For me only the first line of the commit message is printed in the\n>>> subject, all other lines are missing.\n>>\n>> What version of git do you use? If I remember correctly this area\n>> was worked on some time ago, so git-format-patch takes now whole first\n>> paragraph as a subject of email, folding it using appropriate RFC\n>> style.\n\nIt does, and does not help, see below for details.\n\n> Then that multiline subject must have been lost somewhere along the way. Maybe \n> some mailserver in between striped it down to one line...\n\nActually, after some testing it looks like while git-format-patch\ngenerates correct patches for commit messages which do not follow\ngit convention of single line summary followed (optionally) by longer\ndescription and (optionally) signoff, git-am doesn't correctly apply\nthem.\n\nIt is easy to understand why it is this way: git-format-patch uses\nRFC 2822 (I think) folding of mail headers, so the subject looks like\nbelow:\n\n   Subject: <prefix> <first line of commit message> LF\n   SP <second line of commit message> ...\n\nwhere <prefix> is for example \"[PATCH]\" or \"[PATCH m/n]\".  Now git-am\ndoesn't know if the patch was generated by git-format-patch, or does\nit have subject line wrapped by MUA / MTA as to, for example, do not\ncross line length limit for email headers.\n\n\nNow git-rebase, which by default in non-interactive mode uses\ngit-format-patch | git-am pipeline, _doesn't_ munge commit messages,\neven if they do not follow git commit message convention.\n\nIt does it by using undocumented (at least not mentioned in git-am(1)\nmanpage, even if it is shown in \"git am -h\" output (long usage)) option\nto git-am, namely '--rebasing'.  Unfortunately, at least if you want\nto apply patches send by email, it imples '--keep', so\n\"git am --rebasing\" won't strip \"[PATCH]\" or \"[PATCH m/n]\" prefix.\n\n>>> If I want a message to appear in the body at all, I need a special way to\n>>> format my commit messages: 1 line summary, 1 empty line, description.\n>>> Only the description is then shown in the email.\n>>> This seems inconvenient, especially for smaller changes.\n>>\n>> What do you think this commit message convention git uses is from?\n>> It stems from exchanging patches by email, where you had to put short,\n>> single line description in the email subject, and describe change in\n>> more detail in message (email) body.  If you don't follow this\n>> commit message convention many git tools (tig, gitk, git-shortlog, etc.)\n>> will not work as expected.\n>>\n> I guess this is then a feature request?\n> To use first line for subject, and repeat the whole commit-message in the \n> body?\n\nIIRC you can always repeat \"Subject:\" in the body of email, and it\nwould be used as first line (first paragraph with '--rebasing', see\nabove) of commit message instead of _email_ subject.\n\n>>> Further, attachments do not at all contain any information like that.\n>>> See the attached example.\n>>\n>> Errr... I just tried \"git format-patch --attach\"[1] and it creates by\n>> default multi-part attachement, first part is commit message, second\n>> is patch itself.  The commit message contains diffstat.\n>>\n> I wanted to know whether I could make that 2nd part (\"patch itself\") also \n> contain the whole commit message, date, author (so it looks like what \n> git-show gives me).\n\nI don't see why not.  You can easy distinguish old format (with first\nline / first paragraph given by subject of email) from new format (with\nwhole commit message as first MIME-attachement part) by the fact that\nold format part begins with an empty line... well, beside the fact that\nyou would have be careful and use old format for commit messages which\nbegins with empty line (git-commit wouldn't create such messages, so\nthey have to come for example from misconversion from other SCM).\n\nI have CC-ed Dscho and Mike McCormack, authors of --attach option to\ngit-format-patch.\n\n>>>>> 4) Can I make format-patch output one deletion and one insertion for a\n>>>>> complete rewrite of a function, instead of multiple deletes/inserts?\n>>>>\n>>>> Try git-format-patch with -B option, or -B<num>.\n>>>\n>>> I tried that already.  Whether I specified -B or not, it always gave\n>>> the exact same output (says diff).\n>>\n>> Ah, I'm sorry.  The -B is to recognize total rewrite, i.e. such a change\n>> that is best represent as delete old contents and create new one.\n>>\n> Total rewrite of a file? So not appropriate for the total rewrite of just a \n> function?\n\nIt is not.\n\nBut if I remember correctly some time ago either Linus or Junio\nmodified diff output to concatenate chunks if they are separated by\nless than 2*context+2 lines, or something like that.  Unfortunately\nI cannot find either thread on git mailing list, or commit adding this\nfeature...\n\n-- \nJakub Narebski\nPoland\n"}]}