atom/git-utils

Update deps/libgit2 to v0.21.0

Closed this issue · 7 comments

This fixes atom/tree-view#53 among other things. Needs some changes to build file as well as repository.cc. Currently doing some testing.

I'm a bit short on time at the moment. 👎

Here's some sort of todo:

  • git_repository_set_head() added two params
  • git_index_entry->oid is now git_index_entry->id
  • gypfile needs update (let's use '<!@(ls -1 deps/libgit2/src/*.c)' instead)
  • git_checkout_opts type renamed to git_checkout_options
  • git_branch_create() added two params
  • testing (only build tested on os x so far)

Here's a gypfile that should get anyone going: https://gist.github.com/jbergstroem/f513a1febba6bb5bf2f4

@jbergstroem Thanks for getting this started, I've continued it over in #30

Actions speak louder than words 🚢

Test suite runs fine for me.

Would you be interested in accepting a patch for simplifying the gypfile? Something like:

      'sources': [
        '<!@(ls -1 deps/libgit2/src/*.c)',
        '<!@(ls -1 deps/libgit2/src/transports/*.c)',
        '<!@(ls -1 deps/libgit2/src/xdiff/*.c)',
        'deps/libgit2/src/hash/hash_generic.c',
      ],

@jbergstroem Does that work on Windows?

@kevinsawicki: Assuming no. I think GN has bigger plans for stuff like this. Sorry for the noise.