git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: data loss when doing ls-remote and piped to command

From
RBRolf Eike Beer <eb@emlix.com>
Date
Sep 16, 2021, 12:17 UTC
Message-ID
<2677927.DK6gFqPMyL@devpool47>
In-Reply-To
<85a103f6-8b3c-2f21-cc0f-04f517c0c9a1@emlix.com>
Am Donnerstag, 16. September 2021, 12:12:48 CEST schrieb Tobias Ulmer:
Show 32 quoted lines
> On 16/09/2021 08:38, Rolf Eike Beer wrote:
> ...
> 
> > 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.
> 
> Different repo, different machine, but also running Tumbleweed
> 5.14.1-1-default, git 2.33.0
> 
> while [ "`git --git-dir=$PWD/in/linux/.git ls-remote origin 2>&1 | tee
> failed.out | sha1sum`" = "7fa299e589bacdc908395730beff542b0fc684eb  -"
> ]; do echo -n .; done
> ..........
> 
> failed.out has multiple lines like this:
> 
> --8<--
> 4e77f7f1261f65cff06918bc5e66d02a418fc842        refs/tags/v3.10.18^{}
> f7b8df0cc81cf82a4ac6834225bddbe46a340455a4a5d52f29d08d923ce8d232b0b497da674d
> d2c refs/tags/v3.18
> b2776bf7149bddd1f4161f14f79520f17fc1d71d        refs/tags/v3.18^{}
> --8<--
> 
> 
> Running the same on Archlinux (5.13.13-arch1-1, 2.33.0) doesn't show the
> problem.
> This may well turn out not to be git, but a kernel issue.
Linus,

since you have been hacking around in pipe.c recently, I fear this isn't entirely impossible. Have you any idea?

For easier reference, the complete thread is at:
https://public-inbox.org/git/85a103f6-8b3c-2f21-cc0f-04f517c0c9a1@emlix.com/T/
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
Previous: Tobias UlmerNext: Mike Galbraith
Message 5 of 13 in “data loss when doing ls-remote and piped to command”
  1. Rolf Eike BeerSep 15, 2021
  2. Junio C HamanoSep 15, 2021
  3. Rolf Eike BeerSep 16, 2021
  4. Tobias UlmerSep 16, 2021
  5. Rolf Eike BeerSep 16, 2021
  6. Mike GalbraithSep 16, 2021
  7. Mike GalbraithSep 17, 2021
  8. Linus TorvaldsSep 16, 2021
  9. Junio C HamanoSep 16, 2021
  10. Rolf Eike BeerSep 17, 2021
  11. Jeff KingSep 17, 2021
  12. Linus TorvaldsSep 17, 2021
  13. Mike GalbraithSep 18, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.