{"thread":{"id":"15262","subject":"[stgit] understanding why --diff-opts was dropped from stg status","startedAt":"2008-08-28T21:43:38Z","lastAt":"2008-08-28T22:55:36Z","messageCount":2,"participants":["Yann Dirson","Karl Hasselström"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"89017","messageId":"20080828214338.GJ4985@nan92-1-81-57-214-146.fbx.proxad.net","threadId":"15262","inReplyTo":null,"subject":"[stgit] understanding why --diff-opts was dropped from stg status","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2008-08-28T21:43:38Z","receivedAt":"2008-08-28T21:43:38Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"Hi Karl,\n\nIt's been quite some time I have been away from stgit developement, so\nI have missed many things.  I just noticed that the post-0.14.3 stable\nbranch contains a change that adds tests for \"stg status --diff-opts\",\nthen one that removes that flag claiming it did not work.\n\nQuite puzzled (since it is a feature I heavily used), I tried \"git co\n15ad449\" expecting the tests added there would break... but it does\npass on my box.  What problems did you see ?\n\nBest regards,\n-- \nYann\n"},{"id":"89025","messageId":"20080828225536.GC21850@diana.vm.bytemark.co.uk","threadId":"15262","inReplyTo":"20080828214338.GJ4985@nan92-1-81-57-214-146.fbx.proxad.net","subject":"Re: [stgit] understanding why --diff-opts was dropped from stg status","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-08-28T22:55:36Z","receivedAt":"2008-08-28T22:55:36Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2008-08-28 23:43:38 +0200, Yann Dirson wrote:\n\n> It's been quite some time I have been away from stgit developement,\n> so I have missed many things.\n\nYes, we've missed you!\n\n> I just noticed that the post-0.14.3 stable branch contains a change\n> that adds tests for \"stg status --diff-opts\", then one that removes\n> that flag claiming it did not work.\n>\n> Quite puzzled (since it is a feature I heavily used), I tried \"git\n> co 15ad449\" expecting the tests added there would break... but it\n> does pass on my box. What problems did you see ?\n\nThis is the kind of output you get from git diff-index, diff-files, et\nal (from Documentation/diff-format.txt):\n\nin-place edit  :100644 100644 bcd1234... 0123456... M file0\ncopy-edit      :100644 100644 abcd123... 1234567... C68 file1 file2\nrename-edit    :100644 100644 abcd123... 1234567... R86 file1 file3\ncreate         :000000 100644 0000000... 1234567... A file4\ndelete         :100644 000000 1234567... 0000000... D file5\nunmerged       :000000 000000 0000000... 0000000... U file6\n\nNote that in the copy and rename cases (which are only triggered when\n-C or -M are in effect) there are two filenames and not one. I don't\nrecall the details, but the code parsing this output barfed on it. (I\ndiscovered this problem when I added stgit.diff-opts = -M to my global\nconfig, and stg status started failing.) I considered fixing it, but\nas I recall making it handle two filenames required more surgery than\nI was prepared to do at that point, in the stable branch and all. But\nI'm in no way opposed to the feature. Quite the contrary. As long as\nit isn't broken ...\n\n( In case you feel like fixing this:\n  stgit.lib.git.Repository.diff_tree_files() knows how to parse the\n  output including copy and rename records, so no need to write a new\n  parser. Just make stg status use this one, and teach it to handle\n  pairs of filenames. )\n\nAbout the test succeeding for you -- are you sure? The stable branch\nhas an older version of the test suite lib, which just prints \"OK\" for\nexpected failures that indeed fail. Try changing that test from\ntest_expect_success to test_expect_failure, and you should see the\nmagic blue smoke coming out of your computer ...\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"}]}