Remi Galan Alfonso <remi.galan-alfo...@ensimag.grenoble-inp.fr> writes:

> Matthieu Moy <matthieu....@grenoble-inp.fr> writes:
>> You're using $1 and $2 only to redirect input and output. I would find
>> it more elegant to write todo_list_to_sha_list as a filter, and do the
>> redirection in the call site (to keep the option of using
>> todo_list_to_sha_list in a pipe).
>
> If I understood correctly, then the calling line would look like:
>> todo_list_to_sha_list <"$todo".backup >"$todo".oldsha1
> ?

Yes.

> Should I do the same for the function warn_file ?
> Meaning
>> warn_file <"$todo".miss
> instead of
>> warn_file "$todo".miss

If you do so, then warn_file won't be a good name anymore since you'd be
able to read from a pipe too.

Anyway, it's really a matter of personnal preference. I would keep
warn_file as-is and change todo_list_to_sha_list, but feel free to
ignore this point if you disagree.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to