<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-08-25 16:12 GMT+03:00 Pino Toscano <span dir="ltr"><<a href="mailto:ptoscano@redhat.com" target="_blank">ptoscano@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Thursday, 25 August 2016 16:05:47 CEST NoxDaFox wrote:<br>
> 2016-08-25 14:09 GMT+03:00 Pino Toscano <<a href="mailto:ptoscano@redhat.com">ptoscano@redhat.com</a>>:<br>
><br>
> > On Wednesday, 24 August 2016 23:59:53 CEST Matteo Cafasso wrote:<br>
> > > The find_inode API allows the User to search all the entries referring<br>
> > > to a given inode and returns a tsk_dirent structure for each of them.<br>
> > ><br>
> > > As I didn't want to change unrelated code, there is a little bit<br>
> > > of code duplication at the moment. Plan is to refactor the logic<br>
> > > in a dedicated set of patches.<br>
> ><br>
> > The general idea looks ok, but I'd rather see the duplication dealt<br>
> > with sooner than later.<br>
> ><br>
> In the previous submissions, non related changes were rejected therefore I<br>
> thought that was the custom.<br>
<br>
</span>I don't see how the two cases are the same: what was "rejected" was a<br>
single patch contaning both additions documented in the commit message,<br>
and unrelated changes such as formatting fixes. I remember to have said<br>
that it's a no-go as *single* patch, but they can be sent (and<br>
integrated) as different commits.<br></blockquote><div>Then I totally misunderstood. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
In this case, refactoring and de-duplication of code should be done in<br>
different commits as well. <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><br>
> Moreover I'll add another API find_block (block_number --> tsk_dirents<br>
> referring to it) and I think is easier to refactor the code once all the<br>
> use cases are in place as the picture gets more clear.<br>
<br>
</span>More reasons to refactor *before*: since you already planned more APIs,<br>
it's easier to just refactor one in advance with all the common code<br>
needed, and use it later. Also, it eases a lot the review of the<br>
patches, since it will be less code added.<br></blockquote><div>Seems reasonable, I'll proceed and re-submit then. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><font color="#888888"><br>
--<br>
Pino Toscano</font></span><br>______________________________<wbr>_________________<br>
Libguestfs mailing list<br>
<a href="mailto:Libguestfs@redhat.com">Libguestfs@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/libguestfs" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/libguestfs</a><br></blockquote></div><br></div></div>