Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2096456pxb; Fri, 17 Sep 2021 02:00:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDSRmiPHifaWoDKAXi9u+hSIHAlZoDz2NcSe7fexLxD7Fx3+ASjeO5IJkVNGfiOsNIL2s1 X-Received: by 2002:a05:6e02:1bc2:: with SMTP id x2mr7192329ilv.98.1631869226727; Fri, 17 Sep 2021 02:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631869226; cv=none; d=google.com; s=arc-20160816; b=GHcdaYglkYhZVHwcII+1LPawfTRbRIsz3XekdOy4RlecLocnenfwAVDmJph31YBM+l 0UsPtGHIRwMnz35nVAxUU//g0oLUt9ctgWrOlvuyssqXtk9dU+YCrPECyW9qILtRgQfY JD+GVNyryEQ/XxL52EMkw58afIHUITV0oPVsOP5Qcr7OIcoaCB9X/WcAe/5/7Rsqhdr8 WNnUYe8NqCwXrFhMokgYW8kRvB1KbvPHmrtgEEnlEU0xP7FwamXH3AIpZBANJBCuAITV 898ZjMuRxzfDwT+CjCG6tADYX8L82wuDo+gxThz26ydus0IFKts9Hr6Jsv+q2mFJgA4b uASg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=qcT2Eu++A/nnhQ2VmHzlAtBhyLur0KJ8/0RSdViRw/w=; b=i0TyXyFWACG6Yfp84Y7NWPOeoG3+uhohHh6ffCrLSbVrLwC6vs7YEb+KnZo8hhJvAK IMbp6TA1OR5UqDye4uqmdvajhRKmFsHcZ+l0n1/VFtKPyqeNRTTr+bJwZrg2ovhlHOeu nfH/zq1JgN6ulpHODwaSfUTqqocmf+o0N/AJfm7CkjHfgCQcf+POY4OfAJfdwTUXZLIj OqQz+9dONTq60H3n/9sC+ZMkKfhFiLen2LpRnhJTPDG2s/ogJWh37cpKxKHPmrkpD9qg +FV90+IpH00rPcmod8AkG8vREyEq9LInlSiACE4Q/e3vd+m1tW2qBePyzP3a3+RmiVt+ GiLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b="L/SDGx8T"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pobox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si4838683iox.32.2021.09.17.02.00.13; Fri, 17 Sep 2021 02:00:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b="L/SDGx8T"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=pobox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239258AbhIPUnt (ORCPT + 99 others); Thu, 16 Sep 2021 16:43:49 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:63805 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234327AbhIPUnt (ORCPT ); Thu, 16 Sep 2021 16:43:49 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 410DA150025; Thu, 16 Sep 2021 16:42:28 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=zlwgF80ohENM13rU+/lt7dWFfGqYaIVa4sz2Jz HlXTM=; b=L/SDGx8TU/4bm3dqf2gb6r8Yp6p20RW6+Z16ZUgHs36eU+I+xI3Ijd ITeQDH4zHlsNX9hU33vUSE0DncRaGJvSDtA+rYqIlvtYQ6FUcIeCm4NvRQHPKmgV u5md+6gbDYQdiKwk8kS4iKXyUVo9WRzoGJ/XvyuRLTJ9ffXMellL8= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 39AEE150024; Thu, 16 Sep 2021 16:42:28 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.73.10.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 71A5F150023; Thu, 16 Sep 2021 16:42:24 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Linus Torvalds Cc: Rolf Eike Beer , Git List Mailing , Tobias Ulmer , Linux Kernel Mailing List Subject: Re: data loss when doing ls-remote and piped to command References: <6786526.72e2EbofS7@devpool47> <2279155.Qy0YqsFniq@devpool47> <85a103f6-8b3c-2f21-cc0f-04f517c0c9a1@emlix.com> <2677927.DK6gFqPMyL@devpool47> Date: Thu, 16 Sep 2021 13:42:22 -0700 In-Reply-To: (Linus Torvalds's message of "Thu, 16 Sep 2021 10:11:22 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 9904F25A-172E-11EC-9C9A-98D80D944F46-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds writes: > On Thu, Sep 16, 2021 at 5:17 AM Rolf Eike Beer wrote: >> >> Am Donnerstag, 16. September 2021, 12:12:48 CEST schrieb Tobias Ulmer: >> > > The redirection seems to be an important part of it. I now did: >> > > >> > > git ... 2>&1 | sha256sum >> > >> > I've tried to reproduce this since yesterday, but couldn't until now: >> > >> > 2>&1 made all the difference, took less than a minute. > > So if that redirection is what matters, and what causes problems, I > can almost guarantee that the reason is very simple: > ... > Anyway. That was a long email just to tell people it's almost > certainly user error, not the kernel. Yes, 2>&1 will mix messages from the standard error stream at random places in the output, which explains the checksum quite well. I am not sure if it explains the initial report where ls-remote 2>&1 | less produced > 6f38b5d6cfd43dde3058a10c68baae9cf17af912 refs/tags/v5.0-rc2 > 1c7fc5cbc33980acd13ae83d0b416db002fe95601e7f97f64b59514d936 refs/tags/v5.7-rc2^{} > d0709bb6da2ab6d49b11643e98abdf79b1a2817f refs/tags/v5.7-rc3 What we see on the second line is the beginning of peeled v5.0-rc2^{} up to the "acd13" (that is, the first 19 bytes of the line), followed by the full line for peeled v5.7-rc2^{} (which begins with "ae83d"). 12407 bytes in between are missing, which is even more puzzling as it is not a nice round number. I can sort of guess that the progress display during transfer, which comes out on the standard error stream and uses terminal control sequences like "go back to the end of the line without feeding a new line", "erase to the end of the line", etc., would be contributing, but because it is piped to "less", which would make it "visible" (i.e. you do not get the raw escape but see three capital letters ESC in reverse), it does not quite explain how the display was broken. In any case, I do not think the kernel is involved, or more generally I do not think any "loss of output bytes" is happening here. It's just "| less" that failed to show a range about 12k bytes long is mystery to me ;-).