sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Rugged::Index#merge_file

Return merge_file (in memory) from the ancestor, our side and their side of
the conflict at +path+.

If +:ancestor+, +:ours+ or +:theirs+ is +nil+, that indicates that +path+
did not exist in the respective tree.

Returns nil if no conflict is present at +path+.

The following options can be passed in the +options+ Hash:

:ancestor_label ::
  The name of the ancestor branch used to decorate conflict markers.

:our_label ::
  The name of our branch used to decorate conflict markers.

:their_label ::
  The name of their branch used to decorate conflict markers.

:favor ::
  Specifies how and if conflicts are auto-resolved by favoring a specific
  file output. Can be one of `:normal`, `:ours`, `:theirs` or `:union`.
  Defaults to `:normal`.

:style ::
  Specifies the type of merge file to produce. Can be one of `:standard`, `:diff3`. Defaults to `:standard`

:simplify ::
  If true, the merge file is simplified by condensing non-alphanumeric regions.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_index.c

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rugged--Index-merge_file-for-pr


# Commit to git

git add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_index.cgit commit -m "better docs for Rugged::Index#merge_file"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Rugged--Index-merge_file-for-pr

hub pull-request


# Celebrate!