{"thread":{"id":"14326","subject":"stgit error on status command","startedAt":"2008-07-07T15:10:32Z","lastAt":"2008-07-08T19:57:20Z","messageCount":6,"participants":["Jon Smirl","Karl Hasselström"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"82461","messageId":"9e4733910807070810i14c8856vfbec24127e711285@mail.gmail.com","threadId":"14326","inReplyTo":null,"subject":"stgit error on status command","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2008-07-07T15:10:32Z","receivedAt":"2008-07-07T15:10:32Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"jonsmirl@terra:~$ stg --version\nStacked GIT 0.14.3.163.g06f9\ngit version 1.5.6.1\nPython version 2.5.2 (r252:60911, Apr 21 2008, 11:17:30)\n[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]\njonsmirl@terra:~$\n\njonsmirl@terra:~/fs$ stg status\nError: Unhandled exception:\nTraceback (most recent call last):\n  File \"/usr/local/lib/python2.5/site-packages/stgit/main.py\", line 278, in main\n    ret = command.func(parser, options, args)\n  File \"/usr/local/lib/python2.5/site-packages/stgit/commands/status.py\",\nline 119, in func\n    options.diff_flags)\n  File \"/usr/local/lib/python2.5/site-packages/stgit/commands/status.py\",\nline 75, in status\n    diff_flags = diff_flags)\n  File \"/usr/local/lib/python2.5/site-packages/stgit/git.py\", line\n255, in tree_status\n    for t, fn in parse_git_ls(GRun('diff-index', '-z', *args).raw_output()):\n  File \"/usr/local/lib/python2.5/site-packages/stgit/git.py\", line\n201, in parse_git_ls\n    mode_a, mode_b, sha1_a, sha1_b, t = line.split(' ')\nValueError: need more than 1 value to unpack\njonsmirl@terra:~/fs$\n\njonsmirl@terra:~/fs$ git status\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#       renamed:    arch/powerpc/boot/dts/digispeaker-alpha.dts ->\narch/powerpc/boot/dts/dspeak01.dts\n#       renamed:    arch/powerpc/platforms/52xx/digispeaker_alpha.c ->\narch/powerpc/platforms/52xx/dspeak0\n#\n# Changed but not updated:\n#   (use \"git add <file>...\" to update what will be committed)\n#\n#       modified:   arch/powerpc/platforms/52xx/dspeak01.c\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"82563","messageId":"20080708070254.GA4129@diana.vm.bytemark.co.uk","threadId":"14326","inReplyTo":"9e4733910807070810i14c8856vfbec24127e711285@mail.gmail.com","subject":"Re: stgit error on status command","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-07-08T07:02:54Z","receivedAt":"2008-07-08T07:02:54Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"Thanks for the report.\n\nThe problem is that we mis-parse the output of git diff-index when\nrename detection is on (and it prints more than one filename on one\nline). This happens if you give stg status the --diff-opts=-M flag,\nbut you didn't -- but it could also happen if you have the\nstgit.diff-opts config variable set.\n\nI'll try to get a patch out tonight. In the mean time, if you like you\nshould be able to work around the problem by unsetting\nstgit.diff-opts.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"82593","messageId":"9e4733910807080506k6d51bc98h96a7a7b2bd56d98b@mail.gmail.com","threadId":"14326","inReplyTo":"20080708070254.GA4129@diana.vm.bytemark.co.uk","subject":"Re: stgit error on status command","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2008-07-08T12:06:04Z","receivedAt":"2008-07-08T12:06:04Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 7/8/08, Karl Hasselström <kha@treskal.com> wrote:\n> Thanks for the report.\n>\n>  The problem is that we mis-parse the output of git diff-index when\n>  rename detection is on (and it prints more than one filename on one\n>  line). This happens if you give stg status the --diff-opts=-M flag,\n>  but you didn't -- but it could also happen if you have the\n>  stgit.diff-opts config variable set.\n\nI have -M in my config file. If I don't use people on lkml complain\nabout renames generating piles of output in the patches. I'm able to\nwork around the problem for the moment.\n\n>\n>  I'll try to get a patch out tonight. In the mean time, if you like you\n>  should be able to work around the problem by unsetting\n>  stgit.diff-opts.\n>\n>\n>  --\n>  Karl Hasselström, kha@treskal.com\n>       www.treskal.com/kalle\n>\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"82595","messageId":"20080708122502.GA8838@diana.vm.bytemark.co.uk","threadId":"14326","inReplyTo":"9e4733910807080506k6d51bc98h96a7a7b2bd56d98b@mail.gmail.com","subject":"Re: stgit error on status command","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-07-08T12:25:02Z","receivedAt":"2008-07-08T12:25:02Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2008-07-08 08:06:04 -0400, Jon Smirl wrote:\n\n> On 7/8/08, Karl Hasselström <kha@treskal.com> wrote:\n>\n> > Thanks for the report.\n> >\n> > The problem is that we mis-parse the output of git diff-index when\n> > rename detection is on (and it prints more than one filename on\n> > one line). This happens if you give stg status the --diff-opts=-M\n> > flag, but you didn't -- but it could also happen if you have the\n> > stgit.diff-opts config variable set.\n>\n> I have -M in my config file. If I don't use people on lkml complain\n> about renames generating piles of output in the patches. I'm able to\n> work around the problem for the moment.\n\nOh, I'm certainly not suggesting that you shouldn't have -M in your\nstgit.diff-opts -- just that dropping it for the moment is a\nworkaround to your problem.\n\nHmm. Another workaround is to pass an explicit --diff-opts=\"\" to stg\nstatus; that'll override your stgit.diff-opts, and avoid triggering\nthe bug.\n\nBut with any luck, I'll have this fixed within 4-6 hours or so.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"82632","messageId":"20080708195508.25030.46828.stgit@yoghurt","threadId":"14326","inReplyTo":"20080708122502.GA8838@diana.vm.bytemark.co.uk","subject":"[StGit PATCH] stg status rename fix (safe+experimental)","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-07-08T19:57:14Z","receivedAt":"2008-07-08T19:57:14Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"This is just a patch to make sure the bug is gone; the bugfix consists\nof a merge of the updated stable branch.\n\nBoth safe and experimental at git://repo.or.cz/stgit/kha.git has said\nmerge, and this test.\n\n---\n\nKarl Hasselström (1):\n      Test \"stg status\" with -M in stgit.diff-opts\n\n\n t/t0002-status.sh |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"82633","messageId":"20080708195720.25030.94355.stgit@yoghurt","threadId":"14326","inReplyTo":"20080708195508.25030.46828.stgit@yoghurt","subject":"[StGit PATCH] Test \"stg status\" with -M in stgit.diff-opts","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-07-08T19:57:20Z","receivedAt":"2008-07-08T19:57:20Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"It used to fail, before the recent merge of the -O/--diff-opts\nremoval, since the default value of that option was taken from\nstgit.diff-opts and passed on to stgit.git.tree_status() which\ncouldn't handle it.\n\nSigned-off-by: Karl Hasselström <kha@treskal.com>\n\n---\n\n t/t0002-status.sh |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\n\ndiff --git a/t/t0002-status.sh b/t/t0002-status.sh\nindex 5e1e8ca..86ff419 100755\n--- a/t/t0002-status.sh\n+++ b/t/t0002-status.sh\n@@ -186,4 +186,10 @@ test_expect_success 'Status after renaming a file' '\n     test_cmp expected.txt output.txt\n '\n \n+test_expect_success 'Status after renaming a file (with rename detection)' '\n+    git config stgit.diff-opts -M &&\n+    stg status > output.txt &&\n+    test_cmp expected.txt output.txt\n+'\n+\n test_done\n"}]}