{"thread":{"id":"34895","subject":"[RFC] Disabling status hints in COMMIT_EDITMSG","startedAt":"2013-09-10T09:19:22Z","lastAt":"2013-09-11T17:40:41Z","messageCount":13,"participants":["Matthieu Moy","Chris Packham","Junio C Hamano","Jonathan Nieder","Javier Domingo","John Szakmeister"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"227312","messageId":"vpq4n9tghk5.fsf@anie.imag.fr","threadId":"34895","inReplyTo":null,"subject":"[RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-09-10T09:19:22Z","receivedAt":"2013-09-10T09:19:22Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Hi,\n\nI just noticed that the template COMMIT_EDITMSG was containing status\nhints, and that they were not particularty helpfull _during_ a commit. I\nthink it would be sensible to ignore advice.statusHints and disable\nhints unconditionally when writting to COMMIT_EDITMSG.\n\nAny objection?\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"227314","messageId":"522EEC28.6020405@gmail.com","threadId":"34895","inReplyTo":"vpq4n9tghk5.fsf@anie.imag.fr","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2013-09-10T09:53:44Z","receivedAt":"2013-09-10T09:53:44Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On 10/09/13 21:19, Matthieu Moy wrote:\n> Hi,\n> \n> I just noticed that the template COMMIT_EDITMSG was containing status\n> hints, and that they were not particularty helpfull _during_ a commit. I\n> think it would be sensible to ignore advice.statusHints and disable\n> hints unconditionally when writting to COMMIT_EDITMSG.\n> \n> Any objection?\n> \n\nI did recently find them useful/reassuring when I was committing a\nmerge. But I wouldn't consider that a strong objection.\n"},{"id":"227316","messageId":"vpqtxhtey4t.fsf@anie.imag.fr","threadId":"34895","inReplyTo":"522EEC28.6020405@gmail.com","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-09-10T11:04:18Z","receivedAt":"2013-09-10T11:04:18Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Chris Packham <judge.packham@gmail.com> writes:\n\n> On 10/09/13 21:19, Matthieu Moy wrote:\n>> Hi,\n>> \n>> I just noticed that the template COMMIT_EDITMSG was containing status\n>> hints, and that they were not particularty helpfull _during_ a commit. I\n>> think it would be sensible to ignore advice.statusHints and disable\n>> hints unconditionally when writting to COMMIT_EDITMSG.\n>> \n>> Any objection?\n>> \n>\n> I did recently find them useful/reassuring when I was committing a\n> merge. But I wouldn't consider that a strong objection.\n\nJust to make sure we're talking about the same thing: when commiting a\nmerge, the template currently looks like:\n\n  Merge branch 'master' of /tmp/git\n  \n  Conflicts:\n  \tfoo.txt\n  #\n  # It looks like you may be committing a merge.\n  # If this is not correct, please remove the file\n  #\t.git/MERGE_HEAD\n  # and try again.\n  \n  \n  # Please enter the commit message for your changes. Lines starting\n  # with '#' will be ignored, and an empty message aborts the commit.\n  # On branch master\n  # Your branch and 'origin/master' have diverged,\n  # and have 3 and 1 different commit each, respectively.\n  #   (use \"git pull\" to merge the remote branch into yours)\n  #\n  # All conflicts fixed but you are still merging.\n  #   (use \"git commit\" to conclude merge)\n  #\n  # Changes to be committed:\n  #\n  #\tmodified:   foo.txt\n  #\n\nWhat I'd like to remove are the parts between parenthesis :\n\n  (use \"git commit\" to conclude merge)\n  (use \"git pull\" to merge the remote branch into yours)\n\nThe first part (It looks like [...]) would remain, of course.\n\nActually, even the \"All conflicts fixed but you are still merging.\" part\nis not really accurate when the commit is already started.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"227327","messageId":"xmqqeh8wzl0h.fsf@gitster.dls.corp.google.com","threadId":"34895","inReplyTo":"vpq4n9tghk5.fsf@anie.imag.fr","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-09-10T16:42:06Z","receivedAt":"2013-09-10T16:42:06Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Hi,\n>\n> I just noticed that the template COMMIT_EDITMSG was containing status\n> hints, and that they were not particularty helpfull _during_ a commit. I\n> think it would be sensible to ignore advice.statusHints and disable\n> hints unconditionally when writting to COMMIT_EDITMSG.\n>\n> Any objection?\n\nI agree that the extra \"this is how you may rectify the situation\"\nlines like these look useless at the first glance.\n\n    # Changes to be committed:\n    #   (use \"git reset HEAD <file>...\" to unstage)\n    #\n    #       new file:   foo\n    #\n    # Untracked files:\n    #  (use \"git add <file>...\" to include in what will be committed)\n    #\n    #       bar\n    #\n\nThe whole point of showing the list is to give the user a chance to\nnotice mistakes, and after noticing a mistake, what the user does is\nto abort the commit, not \"git reset HEAD <file>\" nor \"git add <file>\".\n\nBut at the same time, I feel that these redundant lines, especially\nthe latter one, would give the users a stronger cue than just saying\nthat \"bar is Untracked\"; \"do X to include\" reminds that bar will not\nbe included if nothing is done.\n\nSo I am on the fence on this one.  No strong objection, but I\nsuspect those who do not have any voice in this discussion\n(i.e. those who are about to start using Git) may be helped by\nkeeping these lines.\n"},{"id":"227352","messageId":"20130910180313.GE7470@google.com","threadId":"34895","inReplyTo":"vpq4n9tghk5.fsf@anie.imag.fr","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-09-10T18:03:13Z","receivedAt":"2013-09-10T18:03:13Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Matthieu Moy wrote:\n\n> I just noticed that the template COMMIT_EDITMSG was containing status\n> hints, and that they were not particularty helpfull _during_ a commit. I\n> think it would be sensible to ignore advice.statusHints and disable\n> hints unconditionally when writting to COMMIT_EDITMSG.\n>\n> Any objection?\n\nNo objection from me.  It sounds like a good change.\n\nThanks,\nJonathan\n"},{"id":"227368","messageId":"CAFOYHZBiMNMeq4JKX1st0yTLJ8hm8aUNGPd0WA2uaLhOP44w6w@mail.gmail.com","threadId":"34895","inReplyTo":"vpqtxhtey4t.fsf@anie.imag.fr","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2013-09-10T21:11:29Z","receivedAt":"2013-09-10T21:11:29Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Tue, Sep 10, 2013 at 11:04 PM, Matthieu Moy\n<Matthieu.Moy@grenoble-inp.fr> wrote:\n> Chris Packham <judge.packham@gmail.com> writes:\n>\n>> On 10/09/13 21:19, Matthieu Moy wrote:\n>>> Hi,\n>>>\n>>> I just noticed that the template COMMIT_EDITMSG was containing status\n>>> hints, and that they were not particularty helpfull _during_ a commit. I\n>>> think it would be sensible to ignore advice.statusHints and disable\n>>> hints unconditionally when writting to COMMIT_EDITMSG.\n>>>\n>>> Any objection?\n>>>\n>>\n>> I did recently find them useful/reassuring when I was committing a\n>> merge. But I wouldn't consider that a strong objection.\n>\n> Just to make sure we're talking about the same thing: when commiting a\n> merge, the template currently looks like:\n>\n>   Merge branch 'master' of /tmp/git\n>\n>   Conflicts:\n>         foo.txt\n>   #\n>   # It looks like you may be committing a merge.\n>   # If this is not correct, please remove the file\n>   #     .git/MERGE_HEAD\n>   # and try again.\n>\n>\n>   # Please enter the commit message for your changes. Lines starting\n>   # with '#' will be ignored, and an empty message aborts the commit.\n>   # On branch master\n>   # Your branch and 'origin/master' have diverged,\n>   # and have 3 and 1 different commit each, respectively.\n>   #   (use \"git pull\" to merge the remote branch into yours)\n>   #\n>   # All conflicts fixed but you are still merging.\n>   #   (use \"git commit\" to conclude merge)\n>   #\n>   # Changes to be committed:\n>   #\n>   #     modified:   foo.txt\n>   #\n>\n> What I'd like to remove are the parts between parenthesis :\n>\n>   (use \"git commit\" to conclude merge)\n>   (use \"git pull\" to merge the remote branch into yours)\n>\n> The first part (It looks like [...]) would remain, of course.\n>\n> Actually, even the \"All conflicts fixed but you are still merging.\" part\n> is not really accurate when the commit is already started.\n\nOK. I wouldn't miss that parts in parenthesis. If I chose to abort the\ncommit from the editor (e.g. :cq in vi) git status would still tell me\nwhat I need to know.\n\n>\n> --\n> Matthieu Moy\n> http://www-verimag.imag.fr/~moy/\n"},{"id":"227430","messageId":"vpq61u7akin.fsf@anie.imag.fr","threadId":"34895","inReplyTo":"xmqqeh8wzl0h.fsf@gitster.dls.corp.google.com","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-09-11T07:24:16Z","receivedAt":"2013-09-11T07:24:16Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> But at the same time, I feel that these redundant lines, especially\n> the latter one, would give the users a stronger cue than just saying\n> that \"bar is Untracked\"; \"do X to include\" reminds that bar will not\n> be included if nothing is done.\n\nThe one which draw my attention was \"(use \"git commit\" to conclude\nmerge)\" which is particularly counter-productive when you are already\ndoing a \"git commit\". The advice for untracked files is less\ncounter-productive, but while we're removing the non-sensical ones, I\nthink it makes sense to remove the essentially-useless ones too.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"227431","messageId":"CALZVapmYzKO=fvVgSd+3fzAhdGrawU0C=iETkoJ5fxG87o4KtA@mail.gmail.com","threadId":"34895","inReplyTo":"vpq61u7akin.fsf@anie.imag.fr","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Javier Domingo","fromEmail":"javierdo1@gmail.com","sentAt":"2013-09-11T07:42:32Z","receivedAt":"2013-09-11T07:42:32Z","isPatch":false,"sender":{"key":"javierdo1@gmail.com","avatar":"https://gravatar.com/avatar/0f43d4d2e5f4320e8b5e1a46914213c5459dd0de261ab1587f222827f863d727?d=mp&s=160"},"body":"IMHO, It is alright as it is.\n\nI have been using git for 4~ years now, and I still find very useful\nthose lines. They are like a git status while committing, and it's the\nkey to avoid accidental commits of objects or forgetting files in a\ncommit. Between that and that the commit message can't be empty, I can\nabort a commit and correct the staging area.\n\nCheers,\n\nJavier Domingo\n"},{"id":"227433","messageId":"vpqfvtb7phh.fsf@anie.imag.fr","threadId":"34895","inReplyTo":"CALZVapmYzKO=fvVgSd+3fzAhdGrawU0C=iETkoJ5fxG87o4KtA@mail.gmail.com","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-09-11T08:05:14Z","receivedAt":"2013-09-11T08:05:14Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Javier Domingo <javierdo1@gmail.com> writes:\n\n> IMHO, It is alright as it is.\n>\n> I have been using git for 4~ years now, and I still find very useful\n> those lines. They are like a git status while committing, and it's the\n> key to avoid accidental commits of objects or forgetting files in a\n> commit.\n\nHaving the list of staged/unstaged/untracked is the key to that, and I'm\nnot planning on changing that. Having advices on how to change it\n(\"run ... to ...\") is another matter.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"227439","messageId":"CAEBDL5VVxMSPnfwBL4PiQAjAHDX1FkfaG3SOFZ1oqEh8d6S1YQ@mail.gmail.com","threadId":"34895","inReplyTo":"vpq61u7akin.fsf@anie.imag.fr","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"John Szakmeister","fromEmail":"john@szakmeister.net","sentAt":"2013-09-11T09:14:08Z","receivedAt":"2013-09-11T09:14:08Z","isPatch":false,"sender":{"key":"john@szakmeister.net","avatar":"https://avatars.githubusercontent.com/u/448087?v=4"},"body":"On Wed, Sep 11, 2013 at 3:24 AM, Matthieu Moy\n<Matthieu.Moy@grenoble-inp.fr> wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> But at the same time, I feel that these redundant lines, especially\n>> the latter one, would give the users a stronger cue than just saying\n>> that \"bar is Untracked\"; \"do X to include\" reminds that bar will not\n>> be included if nothing is done.\n>\n> The one which draw my attention was \"(use \"git commit\" to conclude\n> merge)\" which is particularly counter-productive when you are already\n> doing a \"git commit\". The advice for untracked files is less\n> counter-productive, but while we're removing the non-sensical ones, I\n> think it makes sense to remove the essentially-useless ones too.\n\nFWIW, I think it makes sense to remove the extra advice too.\n\n-John\n"},{"id":"227450","messageId":"CALZVapkJMdaHt=-PBbmDnnNA+uPj6vRzeDdmmFGJcGahXFg-4Q@mail.gmail.com","threadId":"34895","inReplyTo":"CAEBDL5VVxMSPnfwBL4PiQAjAHDX1FkfaG3SOFZ1oqEh8d6S1YQ@mail.gmail.com","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Javier Domingo","fromEmail":"javierdo1@gmail.com","sentAt":"2013-09-11T14:03:13Z","receivedAt":"2013-09-11T14:03:13Z","isPatch":false,"sender":{"key":"javierdo1@gmail.com","avatar":"https://gravatar.com/avatar/0f43d4d2e5f4320e8b5e1a46914213c5459dd0de261ab1587f222827f863d727?d=mp&s=160"},"body":"That extra info doesn't occupy too much, and helps distinguish between\nsections. They do also remember you the commands to use (thought after\nsome time using git, you may not need it).\n\nCheers,\n\nJavier\n"},{"id":"227467","messageId":"xmqqob7ztgpb.fsf@gitster.dls.corp.google.com","threadId":"34895","inReplyTo":"vpq61u7akin.fsf@anie.imag.fr","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-09-11T17:24:00Z","receivedAt":"2013-09-11T17:24:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> But at the same time, I feel that these redundant lines, especially\n>> the latter one, would give the users a stronger cue than just saying\n>> that \"bar is Untracked\"; \"do X to include\" reminds that bar will not\n>> be included if nothing is done.\n>\n> The one which draw my attention was \"(use \"git commit\" to conclude\n> merge)\" which is particularly counter-productive when you are already\n> doing a \"git commit\".\n\nOh, no question about that.  Nobody would object to the removal of\nthat one; it is clearly nonsense.\n\nI was commented on the value of keeping \"hints\" like this:\n\n      # Untracked files:\n      #   (use \"git add <file>...\" to include in what will be committed)\n\nThe primary value of the hint in the context of commit message\nbuffer *NOT* being \"what exactly do I need to do after I abort this\ncommit?\", but being \"Ahh, this 'Untracked' section is showing me\nfiles that I may have forgotten to 'git add'\".  If new users do not\nbenefit from the latter, I am perfectly fine with the removal, but I\nsuspect it may not be the case, hence my earlier comment.\n\nAnd \"the user can see these hints by running another 'git status'\nafter aborting the commit anyway\" is an irrelevant counter-argument,\nexactly because my point is that I suspect having them in the commit\ntemplate comment may help the users to *decide* if they want to\ncontinue with or abort the commit.\n\nBut as I said already, I do not have a strong preference either way.\n\nWill queue the two patches (but I see there are already some obvious\nfixes suggested).\n\nThanks.\n"},{"id":"227469","messageId":"vpqfvtb5k9y.fsf@anie.imag.fr","threadId":"34895","inReplyTo":"xmqqob7ztgpb.fsf@gitster.dls.corp.google.com","subject":"Re: [RFC] Disabling status hints in COMMIT_EDITMSG","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-09-11T17:40:41Z","receivedAt":"2013-09-11T17:40:41Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n>\n>> Junio C Hamano <gitster@pobox.com> writes:\n>>\n>>> But at the same time, I feel that these redundant lines, especially\n>>> the latter one, would give the users a stronger cue than just saying\n>>> that \"bar is Untracked\"; \"do X to include\" reminds that bar will not\n>>> be included if nothing is done.\n>>\n>> The one which draw my attention was \"(use \"git commit\" to conclude\n>> merge)\" which is particularly counter-productive when you are already\n>> doing a \"git commit\".\n>\n> Oh, no question about that.  Nobody would object to the removal of\n> that one; it is clearly nonsense.\n>\n> I was commented on the value of keeping \"hints\" like this:\n>\n>       # Untracked files:\n>       #   (use \"git add <file>...\" to include in what will be committed)\n\nYes, I understood your argument.\n\nI have no strong opinion on whether they should be removed either, but I\nwent for the removal essentially because it keeps the code simple.\n\nIf we want to keep the advices, and if we want them to be really sound,\nthen for example the advice for \"Changes to be committed:\" should be\nchanged when running \"git commit --amend\" (we currently hint \"git reset\"\neven for files which are not in the index in this case). Same for\n--only/--include. So, giving accurate hints in all cases seems\nnon-trivial.\n\nI think the value of these messages is smaller than the potential\nconfusion and/or the code complexity to select and possibly modify the\nhints.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}