git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bug: git-bundle create foo --stdin -> segfault
@ 2010-01-19  0:26 Joey Hess
  2010-01-19 23:52 ` Johannes Schindelin
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Joey Hess @ 2010-01-19  0:26 UTC (permalink / raw)
  To: git; +Cc: 554682

[-- Attachment #1: Type: text/plain, Size: 896 bytes --]

joey@gnu:~/tmp/new>echo master | git bundle create ../my.bundle --stdin
zsh: segmentation fault  git bundle create ../my.bundle --stdin

I noticed that git bundle --stdin actually attempts to read from stdin
past EOF. You can see this if you manually type into its stdin.

% git-bundle create ../bundle --stdin
master
^D
master
^D
fatal: Refusing to create empty bundle.

The first stdin read is done by the internal call to rev-list --stdin.
The second stdin read is done by the call to setup_revisions(),
which has its own handler for --stdin.

Bug seen with git version 1.6.5.7 / 1.6.6.243.gff6d2

I also tried going back to 22568f0a336ac37ae7329c917857b455839d1d09, but
still see a bug with Adam Brewster's initial code to add --stdin to
git-bundle. That code still tries to read stdin twice. If it sees
"master" both times, it does create a bundle.

-- 
see shy jo

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2010-06-30 20:38 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19  0:26 bug: git-bundle create foo --stdin -> segfault Joey Hess
2010-01-19 23:52 ` Johannes Schindelin
2010-04-19  7:14 ` [PATCH 0/2] test bundle --stdin, fix objects_array_remove_duplicates() Jonathan Nieder
2010-04-19  8:03   ` [PATCH 1/2] t5704 (bundle): add tests for bundle --stdin Jonathan Nieder
2010-04-19  8:03   ` [PATCH 2/2] fix "bundle --stdin" segfault Jonathan Nieder
2010-04-20  5:16   ` [PATCH 0/2] test bundle --stdin, fix objects_array_remove_duplicates() Junio C Hamano
2010-06-26  6:17 ` [RFC/PATCH 0/8] Re: bug: git-bundle create foo --stdin -> segfault Jonathan Nieder
2010-06-26  6:19   ` [PATCH 1/8] bundle: split basis discovery into its own function Jonathan Nieder
2010-06-26  6:20   ` [PATCH 2/8] bundle: use libified rev-list --boundary Jonathan Nieder
2010-06-30 17:57     ` Junio C Hamano
2010-06-30 20:34       ` Jonathan Nieder
2010-06-26  6:20   ` [PATCH 3/8] bundle: give list_prerequisites() loop body its own function Jonathan Nieder
2010-06-30 18:04     ` Junio C Hamano
2010-06-30 20:37       ` Jonathan Nieder
2010-06-26  6:21   ` [PATCH 4/8] bundle: split table of contents output into " Jonathan Nieder
2010-06-26  6:22   ` [PATCH 5/8] bundle: reuse setup_revisions result Jonathan Nieder
2010-06-26  6:28   ` [PATCH 6/8] Fix bundle --stdin Jonathan Nieder
2010-06-26  6:29   ` [RFC/PATCH 7/8] bundle: Keep names of basis refs after discovery Jonathan Nieder
2010-06-26  6:31   ` [PATCH 8/8] bundle_create: Do not exit when given no revs to bundle Jonathan Nieder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).