git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Olga Telezhnaya <olyatelezhnaya@gmail.com>
To: Kapil Jain <jkapil.cs@gmail.com>
Cc: git <git@vger.kernel.org>,
	Christian Couder <christian.couder@gmail.com>,
	Thomas Gummerer <t.gummerer@gmail.com>, Jeff King <peff@peff.net>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [GSoC] [RFC] Unify ref-filter formats with other --pretty formats
Date: Thu, 4 Apr 2019 15:02:33 +0300	[thread overview]
Message-ID: <CAL21Bmnm0Pk9mHzetSx0_GDcUc0SJZ5giWoFUdTMLCZ+KutEVQ@mail.gmail.com> (raw)
In-Reply-To: <CAMknYEPzUpa3c9PSfJNo6rzUOt-bDUDYrcn9JcHgSGW43KuRYg@mail.gmail.com>

ср, 3 апр. 2019 г. в 22:54, Kapil Jain <jkapil.cs@gmail.com>:
>
> Reference: https://git.github.io/SoC-2019-Ideas/#unify-ref-filter-formats-with-other---pretty-formats
>
> I have spent some time with both pretty.* and ref-filter.*
>
> First off, we are aiming to reuse ref-filter, so avoiding any sort of
> re-implementation is recommended.

It is recommended, but it's normal situation to re-implement something
as a middle step.

>
> Now, coming to pretty.* and ref-filter.*
>
> suppose, a function named xyz() in ref-filter.c seems like it could be
> reused in pretty.c.
> since ref-filter doesn't use any struct of pretty.c. The xyz()
> function in its original form is not useful for pretty.c.
> So now, in order for the xyz() function to be useful in pretty.c.
> Function xyz() should be using structs of pretty.*
>
> now, if we make xyz() use the pretty.* structs, then its
> re-implementation and not reusing. its like keeping two different
> functions one for ref-filter and another for pretty.*.
> which is what is already happening.

It's OK as the middle step. Another approach is to add using
ref-filter structures and continue using existing ones, so that you
have 2 duplicating flows of data. Reuse ref-filter logic, and then in
the end of the patch delete duplicating logic from pretty. Both these
approaches could be useful, choose any of them or design your own way.
I deleted so much code that I wrote, I advice you try not to afraid of
it. It's OK to make something and then rewrite it several times. The
only thing that matters is the final result.

>
> please provide any starting point for reusing ref-filter. i don't see
> any in pretty.*.
> reusing ref-filter specifically in pretty.* is not the motive. please
> point out any file in entire code base, that you may feel can reuse
> some ref-filter logic.

      reply	other threads:[~2019-04-04 12:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 19:54 [GSoC] [RFC] Unify ref-filter formats with other --pretty formats Kapil Jain
2019-04-04 12:02 ` Olga Telezhnaya [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL21Bmnm0Pk9mHzetSx0_GDcUc0SJZ5giWoFUdTMLCZ+KutEVQ@mail.gmail.com \
    --to=olyatelezhnaya@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jkapil.cs@gmail.com \
    --cc=peff@peff.net \
    --cc=t.gummerer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).