Re: [PATCH v3 3/6] libgit-sys: add repo initialization and config access

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

 



On 2024.09.06 18:53, Eric Sunshine wrote:
> On Fri, Sep 6, 2024 at 6:21 PM Calvin Wan <calvinwan@xxxxxxxxxx> wrote:
> > Wrap a few repo setup and config access functions in libgit-sys. These
> > were selected as proof-of-concept items to show that we can access local
> > config from Rust.
> >
> > Co-authored-by: Josh Steadmon <steadmon@xxxxxxxxxx>
> > Signed-off-by: Calvin Wan <calvinwan@xxxxxxxxxx>
> 
> Josh's sign-off is missing?
> 
> > ---
> > diff --git a/contrib/libgit-rs/libgit-sys/src/lib.rs b/contrib/libgit-rs/libgit-sys/src/lib.rs
> > @@ -1,8 +1,19 @@
> >  extern "C" {
> > +    pub fn libgit_setup_git_directory() -> *const c_char;
> > +
> > +    // From config.c
> > +    pub fn libgit_config_get_int(key: *const c_char, dest: *mut c_int) -> c_int;
> 
> Perhaps add a comment above libgit_setup_git_directory() stating its
> origin, as you do for the other functions mentioned here?
> 
>     // From setup.c
>     pub fn libgit_setup_git_directory() -> *const c_char;
> 
> (Nit: I would probably drop the word "From" from these comments, as it
> doesn't seem to add value and ends up being noise. Even better, drop
> the comments altogether since they don't really add value and can
> easily become outdated if code is ever moved around.)

Removed in V4.

> > +
> > +    // From common-init.c
> > +    pub fn libgit_init_git(argv: *const *const c_char);
> > +
> > +    // From parse.c
> > +    pub fn libgit_parse_maybe_bool(val: *const c_char) -> c_int;




[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