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

Re: [PATCH 0/5] fc/transport-helper-sync-error-fix rebased

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 20, 2014, 21:52 UTC
Message-ID
<7v7g6jllck.fsf@alter.siamese.dyndns.org>
In-Reply-To
<535438246097c_4c30158d2ec11@nysa.notmuch>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 23 quoted lines
> Junio C Hamano wrote:
>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>> 
>> > Junio C Hamano wrote:
>> >> As I have said in the recent What's cooking reports, the original
>> >> posted here were based on older codebase and needed to be rebased,
>> >> but it had some conflicts and I wanted to see the result double
>> >> checked by the original author before we can merge it to 'next',
>> >> cooked there and hopefully merged to 'master' before tagging -rc1.
>> >> 
>> >> So here is the series that has been queued in 'pu' for the past
>> >> several days.
>> >> 
>> >> Felipe, can you double check it?
>> >
>> > These patches don't help much,...
>> 
>> What do you mean by that, exactly?  As long as your "don't help
>> much" is "would not hurt and will help some even for a small subset
>> of audience", that would be OK, but I am puzzled.
>
> I mean if purpose of these was for me to review the changes you did, it doesn't
> help as much as an interdiff does.

Ah, I misunderstood. The thing was, that the original was based on older codebase and I couldn't apply them to my tree cleanly. It would be unfair for you to expect _me_ to give you an interdiff in such a situation, especially when I am asking you to double check the conflict resolution based on that original.

OK, so I'll advance the topic to the 'next' and hopefully we can merge it to 'master' before rc1.

> There's nothing in Documentation/CodingGuidelines that says multiple piped
> commands should be one on each line even if togther the line doesn't exceed 80
> characters, nor does it says that file names should be between quotes, even if
> the file name can't possibly have spaces.

Heh, we don't spell out every possible rules. That is where "do as surrounding code" comes in.

As to "$1" vs $1 without quotes, I had to check the calling sites of clean_mark and cmp_marks, primarily because these functions do not say what their "$1" is, to see if an unquoted form is safe. The next person who reads the script has to do the same and quoting is an obvious way to avoid it.

If the functions said "$1 is a branch name", it would have been clear that unquoted $1 would be OK, but still, what these functions has to take (especially the "clean" one that takes pathnames) can change in the future, and a quoted form is an obvious way to futureproof and relieve readers and programmers from having to worry about the quoting issues.

So I think it is better to quote these in this particular case.

The pipe is purely subjective readability. I can go either way, but since I was the one who was applying the patch that needed other changes anyway... ;-)

Previous: Felipe ContrerasNext: Felipe Contreras
Message 19 of 20 in “transport-helper: serious crash fix”
  1. 0/5 transport-helper: serious crash fixFelipe Contreras, Apr 12, 2014
  2. 1/5 transport-helper: remove barely used xchgline()Felipe Contreras, Apr 12, 2014
  3. 2/5 remote-helpers: make recvline return an errorFelipe Contreras, Apr 12, 2014
  4. 3/5 transport-helper: propagate recvline() error pushingFelipe Contreras, Apr 12, 2014
  5. 4/5 transport-helper: trivial cleanupFelipe Contreras, Apr 12, 2014
  6. Junio C HamanoApr 14, 2014
  7. 5/5 transport-helper: fix sync issue on crashesFelipe Contreras, Apr 12, 2014
  8. Junio C HamanoApr 14, 2014
  9. Junio C HamanoApr 15, 2014
  10. 0/5 fc/transport-helper-sync-error-fix rebasedJunio C Hamano, Apr 19, 2014
  11. 1/5 transport-helper: remove barely used xchgline()Junio C Hamano, Apr 19, 2014
  12. 2/5 remote-helpers: make recvline return an errorJunio C Hamano, Apr 19, 2014
  13. 3/5 transport-helper: propagate recvline() error pushingJunio C Hamano, Apr 19, 2014
  14. 4/5 transport-helper: trivial cleanupJunio C Hamano, Apr 19, 2014
  15. 5/5 transport-helper: fix sync issue on crashesJunio C Hamano, Apr 19, 2014
  16. Felipe ContrerasApr 20, 2014
  17. Junio C HamanoApr 20, 2014
  18. Felipe ContrerasApr 20, 2014
  19. Junio C HamanoApr 20, 2014
  20. Felipe ContrerasApr 20, 2014

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.