Re: linking libgit.a in C++ projects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 31, 2008 at 11:27 AM, Sverre Rabbelier <alturin@xxxxxxxxx> wrote:
> On Thu, Jul 31, 2008 at 13:10, cte <cestreich@xxxxxxxxx> wrote:
>> I'm not worried about the interfaces changing; the gui is tied to a
>> particular version of git, and I will update the code that calls into
>> libgit I pull new changes from the mainline into my local clone.
>
> You should be ;). Unless you are planning to learn a lot of C very
> fast, you should be worried about the interfaces changing. That is, if
> you want your GUI to be able to stay up to date with the current git
> version.

That is the plan.

>> who's to say that the output of the various commands won't change
>> formats with future releases of git?
>
> Junio is to say. Plumbing output format is git's API.

Using output from the command line utilities as an API has its own set
of problems. For instance, check out some of the difficulties that
gitk and qgit have had to deal with:
http://kerneltrap.org/mailarchive/git/2007/11/2/379067. Digging into
the git internals and reusing its core functions will always be more
powerful and flexible than parsing command line output. Of course, it
is not always easy; git wasn't written to be easily compiled into a
library and reused (graceful error handling and memory management are
problematic). But I think the right thing to do is to work towards
making the awesome git internals easier to use for other developers so
great tools can continue to be built on top of git.

>> There is no correct solution if
>> you are worried about forward compatibility, unless a well defined API
>> is created (which would be sweet btw, but is probably not a priority).
>
> There is, use the plumbing, forward compatibility is 95% assured. With
> the exception of major releases, for which any plumbing
> output/behavior changes will be announced in the changelog, usually
> including an explanation on how to change your code to match.

95% assured != correct, IMO :)

> In short, use the forc-... errr, plumbing ;).
>
> --
> Cheers,
>
> Sverre Rabbelier
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux