From: Rolf Eike Beer <eb@emlix.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: Re: data loss when doing ls-remote and piped to command
Date: Thu, 16 Sep 2021 08:38:13 +0200 [thread overview]
Message-ID: <2279155.Qy0YqsFniq@devpool47> (raw)
In-Reply-To: <xmqqwnnhwvnd.fsf@gitster.g>
[-- Attachment #1: Type: text/plain, Size: 2290 bytes --]
Am Mittwoch, 15. September 2021, 20:17:42 CEST schrieb Junio C Hamano:
> Rolf Eike Beer <eb@emlix.com> writes:
> > The given repository is a clone of the vanilla kernel.
> >
> > /usr/bin/git --git-dir=/home/ebeer/repos/upstream/linux/.git ls-remote
> > origin 2>&1 | less
> >
> > And I then see things like this:
> >
> > 6f38b5d6cfd43dde3058a10c68baae9cf17af912 refs/tags/v5.0-rc2
> > 1c7fc5cbc33980acd13ae83d0b416db002fe95601e7f97f64b59514d936
> > refs/tags/v5.7-rc2^{} d0709bb6da2ab6d49b11643e98abdf79b1a2817f
> > refs/tags/v5.7-rc3
> Not offering any solution, just an observation of the problem and
> annotating the report.
>
> 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 wonder if this is "less" misconfigured and misbehaving. Did the
> user after seeing v5.7-* tags scroll back with 'b' or something?
To quote myself:
>> This is not bound to less, we originally observed the error on a
>> entirely different tool that tried to parse the output of ls-remote.
In fact when less opened I just started to scroll down until I visually
noticed an error.
> If the output (including the 2>&1 redirection) is sent to a file and
> then "cat <that-file" is invoked, does the same thing happen? How
> about "cat <that-file | less"?
The redirection seems to be an important part of it. I now did:
git ... 2>&1 | sha256sum
This gives different results basically on every run. I also noticed that
having more tags makes it easier to reproduce, so a stable kernel in contrast
to vanilla is a better trigger. Doing that without the stderr redirection gave
the same result every time I tried.
Regards,
Eike
--
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055
emlix - smart embedded open source
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 313 bytes --]
next prev parent reply other threads:[~2021-09-16 6:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 12:43 data loss when doing ls-remote and piped to command Rolf Eike Beer
2021-09-15 18:17 ` Junio C Hamano
2021-09-16 6:38 ` Rolf Eike Beer [this message]
2021-09-16 10:12 ` Tobias Ulmer
2021-09-16 12:17 ` Rolf Eike Beer
2021-09-16 15:49 ` Mike Galbraith
2021-09-17 6:38 ` Mike Galbraith
2021-09-16 17:11 ` Linus Torvalds
2021-09-16 20:42 ` Junio C Hamano
2021-09-17 6:59 ` Rolf Eike Beer
2021-09-17 19:13 ` Jeff King
2021-09-17 19:28 ` Linus Torvalds
2021-09-18 6:33 ` Mike Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2279155.Qy0YqsFniq@devpool47 \
--to=eb@emlix.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.