{"thread":{"id":"59465","subject":"rebase has no --cleanup option","startedAt":"2023-03-24T12:13:59Z","lastAt":"2023-03-24T12:54:33Z","messageCount":2,"participants":["Дилян Палаузов","Kristoffer Haugsbakk"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"474080","messageId":"e2ceba47235e2f7e4f6889954111044d@aegee.org","threadId":"59465","inReplyTo":null,"subject":"rebase has no --cleanup option","fromName":"Дилян Палаузов","fromEmail":"dilyan.palauzov@aegee.org","sentAt":"2023-03-24T12:11:06Z","receivedAt":"2023-03-24T12:13:59Z","isPatch":false,"sender":{"key":"dilyan.palauzov@aegee.org","avatar":null},"body":"Hello,\n\nin rare cases I want to write commit messages with leading # sign and \nfor these messages I call “git commit --cleanup==whitespace”.  So far, \nso good.\n\nNow I want to rebase - modify (edit) the commit message of an old \ncommit, or squash a commit, which has leading # in its comment.  I \ncannot pass --cleanup=whitespace and this is the problem description \nhere — the #-lines disappear after rebase (edit/squash operations).\n\nIn theory I could set the commit.cleanup configuration parameter (in \n.gitconfig), but I prefer not to do this, as I do not want to disable \npermanently the stripping of lines with leading # in git commit \nmessages.\n\nPlease add --cleanup= option to the rebase command.\n\nI use here the command-line git client 2.39.2, not a GUI or whatsoever.\n\nKind regards\n   Дилян\n"},{"id":"474081","messageId":"c16793b7-c4ce-4acf-904d-b844769fe17a@app.fastmail.com","threadId":"59465","inReplyTo":"e2ceba47235e2f7e4f6889954111044d@aegee.org","subject":"Re: rebase has no --cleanup option","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2023-03-24T12:52:26Z","receivedAt":"2023-03-24T12:54:33Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"Hi Дилян\n\nOn Fri, Mar 24, 2023, at 13:11, Дилян Палаузов wrote:\n> Hello,\n>\n> in rare cases I want to write commit messages with leading # sign\n\nHave you considered changing your `commentchar` to something else that\nyou never use as a leading character in the message proper? For example\n`%`:\n\n    [core]\n            commentchar = %\n\nLooks like:\n\n    git: temporary for demonstration\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    %\n    % Date:      Fri Mar 24 13:45:28 2023 +0100\n    %\n    % On branch master\n    % Your branch is ahead of '<remote branch>' by 57 commits.\n    %   (use \"git push\" to publish your local commits)\n    %\n    % Changes to be committed:\n    %\tmodified:   config/.config/git/config\n    %\n    % Untracked files:\n    %\tconfig/.config/git/gitk\n    %\n\nThat’s at least what I would do if I used leading `#` since it seems\nlike less trouble than having to change `cleanup`.\n"}]}