{"thread":{"id":"59429","subject":"[GSoC] Intro and Micro-project","startedAt":"2023-03-21T14:38:54Z","lastAt":"2023-03-21T18:10:18Z","messageCount":5,"participants":["Edwin Fernando","Felipe Contreras","Taylor Blau","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"473843","messageId":"CAPNJDgcauhz_NraSPTQfiDM61gyghSJShZLPUtt5HOr2xKysZg@mail.gmail.com","threadId":"59429","inReplyTo":null,"subject":"[GSoC] Intro and Micro-project","fromName":"Edwin Fernando","fromEmail":"edwinfernando734@gmail.com","sentAt":"2023-03-21T14:38:34Z","receivedAt":"2023-03-21T14:38:54Z","isPatch":false,"sender":{"key":"edwinfernando734@gmail.com","avatar":null},"body":"Hello,\nI am Edwin, a first year undergrad in the department of computing,\nImperial College London. This is my first message to this mailing\nlist! I want to work on the micro-project \"avoiding pipelines in test\nscripts\".\nI'm really excited to work on such a massive project (ie, git, not the\nmicroproject) and be in contact with the people who put it all\ntogether. I'm curious about how software development works at this\nscale, since it feels quite different from the small projects I've\nused to work on. I use bash quite frequently for automating tasks, and\nI have experience in C, through a uni project of making an assembler.\n\nI found and looked at a few places with pipes. I have a few thoughts\nand questions on making a change. Firstly (if this is relevant), how\ndo I ensure that the file I write the std output to doesn't have a\nname clash with other such files made during tests?\n\nI will follow up with an email of the proposed patch.\nRegards,\nEdwin.\n"},{"id":"473845","messageId":"CAMP44s1VnaM=vVYX-uvN1O0D87cgmWYjZzh+QzVhxr68c8W3Cw@mail.gmail.com","threadId":"59429","inReplyTo":"CAPNJDgcauhz_NraSPTQfiDM61gyghSJShZLPUtt5HOr2xKysZg@mail.gmail.com","subject":"Re: [GSoC] Intro and Micro-project","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2023-03-21T15:59:39Z","receivedAt":"2023-03-21T16:00:07Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Tue, Mar 21, 2023 at 9:32 AM Edwin Fernando\n<edwinfernando734@gmail.com> wrote:\n\n> I found and looked at a few places with pipes. I have a few thoughts\n> and questions on making a change. Firstly (if this is relevant), how\n> do I ensure that the file I write the std output to doesn't have a\n> name clash with other such files made during tests?\n\nEvery test script is run inside a different directory. You can check the $PWD.\n\n> I will follow up with an email of the proposed patch.\n\nI'm not sure of the usefulness of such patch.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"473851","messageId":"ZBnmsoRmQGKkQt+S@nand.local","threadId":"59429","inReplyTo":"CAPNJDgcauhz_NraSPTQfiDM61gyghSJShZLPUtt5HOr2xKysZg@mail.gmail.com","subject":"Re: [GSoC] Intro and Micro-project","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2023-03-21T17:17:38Z","receivedAt":"2023-03-21T17:17:44Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"Hi Edwin!\n\nOn Tue, Mar 21, 2023 at 02:38:34PM +0000, Edwin Fernando wrote:\n> Hello,\n> I am Edwin, a first year undergrad in the department of computing,\n> Imperial College London. This is my first message to this mailing\n> list! I want to work on the micro-project \"avoiding pipelines in test\n> scripts\".\n\nThat sounds great! I assume that you meant avoiding pipelines where the\n'git' executable is in a non-terminal position of the pipe, e.g.:\n\n    $ git blah | <something else>\n\nSince if \"git blah\" exited with a non-zero code or crashed, etc., then\nwe wouldn't see the failure since the pipeline would suppress it.\n\nThat has been a long-standing goal within the test suite, and I think\nthat it's a great project to get you started. It'll ensure that you have\nall of the bits in the right place to get Git running on your machine\nand that you're able to run the tests.\n\n> I'm really excited to work on such a massive project (ie, git, not the\n> microproject) and be in contact with the people who put it all\n> together. I'm curious about how software development works at this\n> scale, since it feels quite different from the small projects I've\n> used to work on. I use bash quite frequently for automating tasks, and\n> I have experience in C, through a uni project of making an assembler.\n\n:-).\n\n> I found and looked at a few places with pipes. I have a few thoughts\n> and questions on making a change. Firstly (if this is relevant), how\n> do I ensure that the file I write the std output to doesn't have a\n> name clash with other such files made during tests?\n\nEach of the tests runs in their own \"trash directory\", which you can\nkeep around after the tests are finished running if you invoke them with\nthe '-d' flag. More information about each of those flags is available\nin t/README, as is information about the test suite as a whole.\n\nI would also recommend that you take a look through t/test-lib.sh and\nt/test-lib-functions.sh, as those give a good overview of both (a) some\nof the internals of our integration testing library, and (b) some of the\nconvenience functions available to you as a test author.\n\nLooking at some example tests in the tree may be useful, too. You might\nwant to check out t/t5318-commit-graph.sh as an example of our modern\ntest-writing style.\n\nLet us know if you have any questions or want any pointers on getting\nstarted.\n\nThanks,\nTaylor\n"},{"id":"473858","messageId":"xmqqo7omhuia.fsf@gitster.g","threadId":"59429","inReplyTo":"ZBnmsoRmQGKkQt+S@nand.local","subject":"Re: [GSoC] Intro and Micro-project","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-03-21T17:41:33Z","receivedAt":"2023-03-21T17:41:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Taylor Blau <me@ttaylorr.com> writes:\n\n> That sounds great! I assume that you meant avoiding pipelines where the\n> 'git' executable is in a non-terminal position of the pipe, e.g.:\n>\n>     $ git blah | <something else>\n>\n> Since if \"git blah\" exited with a non-zero code or crashed, etc., then\n> we wouldn't see the failure since the pipeline would suppress it.\n>\n> That has been a long-standing goal within the test suite, and I think\n> that it's a great project to get you started. It'll ensure that you have\n> all of the bits in the right place to get Git running on your machine\n> and that you're able to run the tests.\n\nYes, but can somebody rewrite the micro-project idea page to clarify\nwhat the \"pipe\" thing is about a bit more, so that you do not have\nto repeat the above explanation the next time ;-)?\n\nIt is not \"we do not want pipe\", but it is about \"we do not want to\nignore exit status of git\".  So just like \n\n\t$ git <subcommand> | <some other command>\n\nsequence is bad, we want to avoid \n\n\t$ <some command> $(git <subcommand>)\n\nthat feeds output of Git as an argument to some other command.  And\n\n\t<some command> <<EOF\n\t... some text ...\n\t$(git <subcommand)\n\tEOF\n\nis bad too.  But\n\n\tvar=$(git <subcommand>)\n\nis OK ;-).\n"},{"id":"473864","messageId":"ZBnzBEqViueKIXHx@nand.local","threadId":"59429","inReplyTo":"xmqqo7omhuia.fsf@gitster.g","subject":"Re: [GSoC] Intro and Micro-project","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2023-03-21T18:10:12Z","receivedAt":"2023-03-21T18:10:18Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Mar 21, 2023 at 10:41:33AM -0700, Junio C Hamano wrote:\n> Taylor Blau <me@ttaylorr.com> writes:\n>\n> > That sounds great! I assume that you meant avoiding pipelines where the\n> > 'git' executable is in a non-terminal position of the pipe, e.g.:\n> >\n> >     $ git blah | <something else>\n> >\n> > Since if \"git blah\" exited with a non-zero code or crashed, etc., then\n> > we wouldn't see the failure since the pipeline would suppress it.\n> >\n> > That has been a long-standing goal within the test suite, and I think\n> > that it's a great project to get you started. It'll ensure that you have\n> > all of the bits in the right place to get Git running on your machine\n> > and that you're able to run the tests.\n>\n> Yes, but can somebody rewrite the micro-project idea page to clarify\n> what the \"pipe\" thing is about a bit more, so that you do not have\n> to repeat the above explanation the next time ;-)?\n\nGood suggestion. I did so in the following pull request:\n\n  https://github.com/git/git.github.io/pull/633\n\nThanks,\nTaylor\n"}]}