{"thread":{"id":"3061","subject":"Re: git-commit: allow From: line to be entered in commit message","startedAt":"2006-01-12T19:00:31Z","lastAt":"2006-01-13T21:47:44Z","messageCount":14,"participants":["Joel Becker","Alex Riesen","Junio C Hamano","sean","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14566","messageId":"20060112190031.GH14196@ca-server1.us.oracle.com","threadId":"3061","inReplyTo":"20060112093700.1d3d25db.seanlkml@sympatico.ca","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Joel Becker","fromEmail":"joel.becker@oracle.com","sentAt":"2006-01-12T19:00:31Z","receivedAt":"2006-01-12T19:00:31Z","isPatch":false,"sender":{"key":"joel.becker@oracle.com","avatar":null},"body":"On Thu, Jan 12, 2006 at 09:37:00AM -0500, sean wrote:\n> Use the author name and email information given as the \n> first line of the commit message in the form of:\n> \n> From: name <email>\n> \n> as the author's name and email address in the resulting\n> commit object.  This makes committing foreign patches\n> a little less cumbersome to handle for some workflows.\n\n\tIf we do this, can we have it populated up front?  That is, when\nthe edit opens, the current idea of author is in the comments as \"From:\"\nso I can see what the author would be if I changed nothing.  This would\ncatch surprises where I'd forgotten to set AUTHOR_*, etc.\n\nJoel\n \n\n-- \n\nLife's Little Instruction Book #182\n\n\t\"Be romantic.\"\n\nJoel Becker\nPrincipal Software Developer\nOracle\nE-mail: joel.becker@oracle.com\nPhone: (650) 506-8127\n"},{"id":"14571","messageId":"20060112201646.GA3179@steel.home","threadId":"3061","inReplyTo":"20060112093700.1d3d25db.seanlkml@sympatico.ca","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2006-01-12T20:16:46Z","receivedAt":"2006-01-12T20:16:46Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"sean, Thu, Jan 12, 2006 15:37:00 +0100:\n> \n> Mostly just for comment to see if there is any support\n> for this feature....\n> \n> Sean\n> \n> ---\n> Use the author name and email information given as the \n> first line of the commit message in the form of:\n> \n> From: name <email>\n> \n\nIsn't this what git-am expect (as a part of mbox) and handle?\n"},{"id":"14572","messageId":"7vhd89mc0y.fsf@assigned-by-dhcp.cox.net","threadId":"3061","inReplyTo":"20060112190031.GH14196@ca-server1.us.oracle.com","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-12T20:22:53Z","receivedAt":"2006-01-12T20:22:53Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Joel Becker <Joel.Becker@oracle.com> writes:\n\n> On Thu, Jan 12, 2006 at 09:37:00AM -0500, sean wrote:\n>> Use the author name and email information given as the \n>> first line of the commit message in the form of:\n>> \n>> From: name <email>\n>> \n> \tIf we do this, can we have it populated up front?  That is, when\n> the edit opens, the current idea of author is in the comments as \"From:\"\n> so I can see what the author would be if I changed nothing.  This would\n> catch surprises where I'd forgotten to set AUTHOR_*, etc.\n\nCommitting somebody else's changes by hand ought to be a rare\nevent.  Otherwise that is an indication that there needs to be a\n\"git am/applymbox\" equivalent for the mythical transport medium\n(other than e-mail) that feeds you somebody else's changes to\nyou and have you commit.  If something is a regular event in a\nworkflow, we would want to be able to automate things, and\nhaving the user type in whom the changes have come from is not\nthe way to do it.\n\nMost of the time when I use \"git commit\", I'll be committing my\nown changes; I do not want to see \"From: me\" every time I\ncommit.\n\n\"Populate upfront, only if it is different from yourself\" is\nperhaps acceptable, but that is probably hard to arrange.  There\nis no reliable way to know what is \"yourself\", and that was why\nwe have GIT_AUTHOR_* environment variables to override things to\nbegin with.\n"},{"id":"14590","messageId":"BAYC1-PASMTP1298D73139F4BE57D59B97AE260@CEZ.ICE","threadId":"3061","inReplyTo":"20060112201646.GA3179@steel.home","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-01-13T02:46:42Z","receivedAt":"2006-01-13T02:46:42Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Thu, 12 Jan 2006 21:16:46 +0100\nAlex Riesen <raa.lkml@gmail.com> wrote:\n\n> > Use the author name and email information given as the \n> > first line of the commit message in the form of:\n> > \n> > From: name <email>\n> > \n> Isn't this what git-am expect (as a part of mbox) and handle?\n> \n\nHi Alex,\n\nYes it is, but not everyone is processing patches in mbox format.   If \nthis facility is good enough for the mbox users, it seems like it would\nbe good enough for non-mbox users.   In fact, it would seem more\nconsistent to tell someone that a From: line will be handled properly\nwhether they use git-am or git-commit. \n\nSean\n"},{"id":"14595","messageId":"BAYC1-PASMTP1281924C5151CEB4DECC7CAE260@CEZ.ICE","threadId":"3061","inReplyTo":"7vek3chj8j.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-01-13T03:58:00Z","receivedAt":"2006-01-13T03:58:00Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Thu, 12 Jan 2006 19:58:20 -0800\nJunio C Hamano <junkio@cox.net> wrote:\n\n> sean <seanlkml@sympatico.ca> writes:\n> \n> > ...   In fact, it would seem more\n> > consistent to tell someone that a From: line will be handled properly\n> > whether they use git-am or git-commit. \n> \n> Yuck.\n> \n> Somebody using am/applymbox is not writing that \"From: \" line\n> himself.  The person who writes that \"From: \" line writes that\n> into his MUA when sending a patch --- that is \"editing an\n> email\", so there is a consistency between that activity and use\n> of word \"From: \".\n> \n> The editor for commit message does not have anything to do with\n> e-mail.  What you are talking about is not consistency, but\n> confusion.\n> \n\nI don't imagine that the person \"editing\" the commit message is\ndoing so in this case either, rather copy-n-pasting.  If you're\nreally dead-set against this method, you should at least consider\nadding it as a command line option, because having to set this\nvia environment variables is a much bigger Yuck.\n\nSean\n"},{"id":"14593","messageId":"7vek3chj8j.fsf@assigned-by-dhcp.cox.net","threadId":"3061","inReplyTo":"BAYC1-PASMTP1298D73139F4BE57D59B97AE260@CEZ.ICE","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-13T03:58:20Z","receivedAt":"2006-01-13T03:58:20Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"sean <seanlkml@sympatico.ca> writes:\n\n> ...   In fact, it would seem more\n> consistent to tell someone that a From: line will be handled properly\n> whether they use git-am or git-commit. \n\nYuck.\n\nSomebody using am/applymbox is not writing that \"From: \" line\nhimself.  The person who writes that \"From: \" line writes that\ninto his MUA when sending a patch --- that is \"editing an\nemail\", so there is a consistency between that activity and use\nof word \"From: \".\n\nThe editor for commit message does not have anything to do with\ne-mail.  What you are talking about is not consistency, but\nconfusion.\n"},{"id":"14604","messageId":"20060113065855.GJ14196@ca-server1.us.oracle.com","threadId":"3061","inReplyTo":"7vhd89mc0y.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Joel Becker","fromEmail":"joel.becker@oracle.com","sentAt":"2006-01-13T06:58:55Z","receivedAt":"2006-01-13T06:58:55Z","isPatch":false,"sender":{"key":"joel.becker@oracle.com","avatar":null},"body":"On Thu, Jan 12, 2006 at 12:22:53PM -0800, Junio C Hamano wrote:\n> Committing somebody else's changes by hand ought to be a rare\n> event.  Otherwise that is an indication that there needs to be a\n>...\n> Most of the time when I use \"git commit\", I'll be committing my\n> own changes; I do not want to see \"From: me\" every time I\n> commit.\n\n\tWell, I'm wary of putting\nGIT_AUTHOR_EMAIL=joel.becker@oracle.com as a permanent part of my\nenvironment, for fear of overriding some other authors at some point.\nOn the other hand, if I don't put it in the environment, I get a bogus\nauthor line (jlbec@thisbox.oracle.com).  So I end up having to\nhand-write the AUTHOR_EMAIL lines on each commit line; not a solution\nI'm happy with.\n\tThis way, I'd have a chance to edit it and be sure :-)\n\nJoel\n \n\n-- \n\nLife's Little Instruction Book #274\n\n\t\"Leave everything a little better than you found it.\"\n\nJoel Becker\nPrincipal Software Developer\nOracle\nE-mail: joel.becker@oracle.com\nPhone: (650) 506-8127\n"},{"id":"14605","messageId":"7vpsmwbo9s.fsf@assigned-by-dhcp.cox.net","threadId":"3061","inReplyTo":"20060113065855.GJ14196@ca-server1.us.oracle.com","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-13T07:06:07Z","receivedAt":"2006-01-13T07:06:07Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Joel Becker <Joel.Becker@oracle.com> writes:\n\n> Well, I'm wary of putting\n> GIT_AUTHOR_EMAIL=joel.becker@oracle.com as a permanent part of my\n> environment, for fear of overriding some other authors at some point.\n\nThe weakest default comes from .git/config so you could have\nthis in your .git/config:\n\n\t[user]\n        \tname = Joel Becker \n                email = Joel.Becker@oracle.com\n\nand you can have GIT_AUTHOR_* override it as necessary.\n"},{"id":"14623","messageId":"20060113191231.GM14196@ca-server1.us.oracle.com","threadId":"3061","inReplyTo":"7vpsmwbo9s.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Joel Becker","fromEmail":"joel.becker@oracle.com","sentAt":"2006-01-13T19:12:31Z","receivedAt":"2006-01-13T19:12:31Z","isPatch":false,"sender":{"key":"joel.becker@oracle.com","avatar":null},"body":"On Thu, Jan 12, 2006 at 11:06:07PM -0800, Junio C Hamano wrote:\n> Joel Becker <Joel.Becker@oracle.com> writes:\n> \n> > Well, I'm wary of putting\n> > GIT_AUTHOR_EMAIL=joel.becker@oracle.com as a permanent part of my\n> > environment, for fear of overriding some other authors at some point.\n> \n> The weakest default comes from .git/config so you could have\n> this in your .git/config:\n> \n> \t[user]\n>         \tname = Joel Becker \n>                 email = Joel.Becker@oracle.com\n\n\tThis configuration is something I have the opportunity to forget\nevery time I call git-clone.  So I still need to leave it in the\nenvironment permanently.\n\tAm I correct in assuming that \"From:\" lines will override the\nenvironment when using git-applymbox?  If so, I guess leaving\nGIT_AUTHOR_* in my environment permanently will be ok.\n\nJoel\n\n-- \n\n\"War doesn't determine who's right; war determines who's left.\"\n\nJoel Becker\nPrincipal Software Developer\nOracle\nE-mail: joel.becker@oracle.com\nPhone: (650) 506-8127\n"},{"id":"14626","messageId":"7vhd877w9m.fsf@assigned-by-dhcp.cox.net","threadId":"3061","inReplyTo":"20060113191231.GM14196@ca-server1.us.oracle.com","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-13T19:39:17Z","receivedAt":"2006-01-13T19:39:17Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Joel Becker <Joel.Becker@oracle.com> writes:\n\n> \tAm I correct in assuming that \"From:\" lines will override the\n> environment when using git-applymbox?  If so, I guess leaving\n> GIT_AUTHOR_* in my environment permanently will be ok.\n\nThat's what I do.  Although I use git-am not git-applymbox, both\nof them are designed to work that way.\n"},{"id":"14631","messageId":"20060113200124.GO14196@ca-server1.us.oracle.com","threadId":"3061","inReplyTo":"7vhd877w9m.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Joel Becker","fromEmail":"joel.becker@oracle.com","sentAt":"2006-01-13T20:01:24Z","receivedAt":"2006-01-13T20:01:24Z","isPatch":false,"sender":{"key":"joel.becker@oracle.com","avatar":null},"body":"On Fri, Jan 13, 2006 at 11:39:17AM -0800, Junio C Hamano wrote:\n> That's what I do.  Although I use git-am not git-applymbox, both\n> of them are designed to work that way.\n\n\tWhile I can see that git-am and git-applymbox have different\noptions for the same basic task, I can't quite see why one would be\npreferred to the other.  What does git-am do that git-applymbox does\nnot?\n\nJoel\n\n-- \n\n\"I'm so tired of being tired,\n Sure as night will follow day.\n Most things I worry about\n Never happen anyway.\"\n\nJoel Becker\nPrincipal Software Developer\nOracle\nE-mail: joel.becker@oracle.com\nPhone: (650) 506-8127\n"},{"id":"14632","messageId":"7virsn50lv.fsf@assigned-by-dhcp.cox.net","threadId":"3061","inReplyTo":"20060113200124.GO14196@ca-server1.us.oracle.com","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-13T20:33:48Z","receivedAt":"2006-01-13T20:33:48Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Joel Becker <Joel.Becker@oracle.com> writes:\n\n> On Fri, Jan 13, 2006 at 11:39:17AM -0800, Junio C Hamano wrote:\n>> That's what I do.  Although I use git-am not git-applymbox, both\n>> of them are designed to work that way.\n>\n> \tWhile I can see that git-am and git-applymbox have different\n> options for the same basic task, I can't quite see why one would be\n> preferred to the other.  What does git-am do that git-applymbox does\n> not?\n\nSorry about the confusion.  This is turning into a FAQ and it is\nall _my_ fault [*1*].\n\nSome historical background.\n\n - \"applymbox\" was there first.  It was renamed from a tool\n   'dotest' Linus had used since BK days, with somewhat\n   unextensible command line syntax.\n\n - \"am\" was invented later, to majorly redo what applymbox does\n   with extensible command line syntax.  It is supposed to do\n   everything applymbox does, but the only thing it does not\n   support is to be command-line compatible.\n\nThe primary reason why I kept applymbox maintained is because\nmany \"How to hack kernel with git\" documents floating around\ntalk about applymbox, and it still is used by Linus to apply\npatches with his trained fingers.  Worse yet, it could be that\napplymbox is used as a building block in larger private scripts\nused by kernel developers, and its removal would force them to\nupdate their scripts to use \"am\" instead.  I do not want to see\nthe kernel people spending their time on adjusting their private\ntools for git changes unnecessarily; their time is better spent\non improving the kernel.\n\nSo in short, I tend to recommend \"am\" to new people, but\n\"applymbox\" is still usable.\n\n\n[Footnote]\n\n*1* I do not mind keeping applymbox maintained, but at the same\ntime I know I would feel it stupid to carry two tools that do\nalmost the same thing if it were somebody else's project, and\nevery time this issue comes up I feel the urge to say \"in 3\nmonths, git-applymbox will be removed, please get used to\ngit-am\", which so far I ended up resisting.\n"},{"id":"14633","messageId":"7vvewn3lgg.fsf@assigned-by-dhcp.cox.net","threadId":"3061","inReplyTo":"7virsn50lv.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-13T20:46:23Z","receivedAt":"2006-01-13T20:46:23Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> Joel Becker <Joel.Becker@oracle.com> writes:\n>\n>> On Fri, Jan 13, 2006 at 11:39:17AM -0800, Junio C Hamano wrote:\n>>> That's what I do.  Although I use git-am not git-applymbox, both\n>>> of them are designed to work that way.\n>>\n>> \tWhile I can see that git-am and git-applymbox have different\n>> options for the same basic task, I can't quite see why one would be\n>> preferred to the other.  What does git-am do that git-applymbox does\n>> not?\n\nThe behaviour upon seeing unapplicable patch is somewhat\ndifferent.  In Linus workflow, he reviews (and modifies if\nnecessary) all patches inside mbox and runs \"applymbox\"; upon\nfailure, he blows what remains in .dotest away, trims mbox to\nget rid of what has already been applied and re-runs it from\nscratch.  The failure recovery method \"applymbox\" had (this\nhappened before my time IIRC) is to edit .dotest/patch to make\nit applicable and re-run it.  OTOH, \"am\" tries to do better by\nallowing you to hand tweak the working tree to match what would\nhave resulted if the patch applied cleanly and say \"--resolved\".\n\nAnother difference is that \"am\" can be told to handle binary\nfile changes and apply such as long as the patch is intra\nrepository (i.e. both pre and post image blob are available in\nthe repository).  This is used as a backend to do \"git rebase\".\n"},{"id":"14635","messageId":"Pine.LNX.4.63.0601132247080.32562@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"3061","inReplyTo":"20060113191231.GM14196@ca-server1.us.oracle.com","subject":"Re: git-commit: allow From: line to be entered in commit message","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-01-13T21:47:44Z","receivedAt":"2006-01-13T21:47:44Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 13 Jan 2006, Joel Becker wrote:\n\n> On Thu, Jan 12, 2006 at 11:06:07PM -0800, Junio C Hamano wrote:\n> > Joel Becker <Joel.Becker@oracle.com> writes:\n> > \n> > > Well, I'm wary of putting\n> > > GIT_AUTHOR_EMAIL=joel.becker@oracle.com as a permanent part of my\n> > > environment, for fear of overriding some other authors at some point.\n> > \n> > The weakest default comes from .git/config so you could have\n> > this in your .git/config:\n> > \n> > \t[user]\n> >         \tname = Joel Becker \n> >                 email = Joel.Becker@oracle.com\n> \n> \tThis configuration is something I have the opportunity to forget\n> every time I call git-clone.  So I still need to leave it in the\n> environment permanently.\n\nOf course, you could put it in your templates and never forget.\n\nCiao,\nDscho\n"}]}