From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-5.3 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id D59E420986 for ; Sun, 9 Oct 2016 09:04:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753327AbcJIJEG (ORCPT ); Sun, 9 Oct 2016 05:04:06 -0400 Received: from mout.gmx.net ([212.227.15.19]:54921 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752787AbcJIJEF (ORCPT ); Sun, 9 Oct 2016 05:04:05 -0400 Received: from virtualbox ([37.24.142.40]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Lx8vJ-1anVQh2Aaf-016dB8; Sun, 09 Oct 2016 10:57:22 +0200 Date: Sun, 9 Oct 2016 10:57:20 +0200 (CEST) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Johannes Sixt cc: Junio C Hamano , git@vger.kernel.org, =?UTF-8?Q?Jakub_Nar=C4=99bski?= Subject: Re: [PATCH v2 20/25] sequencer: left-trim lines read from the script In-Reply-To: <5ed8aaea-9fbe-11b0-49b7-1b42567d4918@kdbg.org> Message-ID: References: <09e05e7ac23164625f2076ff06d2b034101878da.1473590966.git.johannes.schindelin@gmx.de> <5ed8aaea-9fbe-11b0-49b7-1b42567d4918@kdbg.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags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cQSxxGBVpBMdHlrTP47o 8MTlJRr Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Hannes, On Thu, 6 Oct 2016, Johannes Sixt wrote: > [PATCH] sequencer: strip CR from the end of exec insns > > It is not unheard of that editors on Windows write CRLF even if the file > originally had only LF. This is particularly awkward for exec lines of a > rebase -i todo sheet. Take for example the insn "exec echo": The shell > script parser (either of the sequencer or of the shell that is invoked, > I do not know) splits at the LF and leaves the CR attached to "echo", > which leads to the unknown command "echo\r". > > Work it around by stripping CR before the command specified with exec is > passed to the shell. > > This happens to fix t9903.14 and .15 in my environment: the insn sheet > constructed here contains CRLF thanks to MSYS1's bash cleverness. Good point. I decided to do it at a different level, though: parse_insn_line() should already receive the line without trailing end-of-line markers (this was already the case for LF-only todo scripts). I reused your commit message and touched it up a bit, hope you don't mind! Ciao, Dscho