Giter Club home page Giter Club logo

Comments (1)

przemoc avatar przemoc commented on June 12, 2024

metastore is only a tool for storing or applying metadata.
In examples/ directory you can find some scripts helping to some extent using it in scenarios you describe. Check their descriptions:

  • git-metapull:
    # This script can be used instead of git pull when updating from
    # a remote repo to make sure the metadata matches what is stored in
    # the repo.
    # It will do a git pull, show a list of changes to be made to
    # the metadata, and after getting confirmation, apply the changes.
  • git hook: post-checkout
    # An example hook script to set metadata information using
    # metastore after each checkout.
  • git hook: pre-commit
    # An example hook script to store metadata information using
    # metastore on each commit.
    #
    # WARNING:
    #
    # If the commit is aborted (e.g. by not entering any synopsis),
    # then updated metastore file (.metadata by default) is not reverted,
    # so its new version remains in the index.
    # To undo any changes in metastore file written since HEAD commit,
    # you may want to reset and checkout HEAD version of the file:
    #
    # git reset HEAD -- .metadata
    # git checkout HEAD -- .metadata

There is no metastore documentation regarding this topic beside above mentioned comments in scripts and one paragraph in README file:

metastore/README

Lines 34 to 41 in d2a1530

If you want to use metastore within git repository, then consider
copying exemplary scripts from examples/hooks/ directory to hooks
subdirectory in your git directory, and make them executable.
You can also tune them if it's necessary. But.
Before using, please read the warning in the comments of pre-commit hook.
Mind that merge conflicts can only be solved manually, because metastore
file is binary in its current form (there's a plan to fix it in future).
Dump action can be really helpful in such cases.

There is issue #33 for tracking that. Patches are welcomed.

But, I wrote "to some extent", because collisions are effectively merge conflicts (or local forms of them, i.e. how users should integrate their changes with regards to metadata), which need manual intervention/decision, especially if you want some particular behavior.
How to handle merge conflicts is up to the user. Dump action has been introduced in metastore to help investigate stuff (you can dump state stored in .metadata or in file system for given path).

What we also lack is proper textual format (#6) that would help in such cases, because then you could resolve conflicts using your favorite tools (meld, kdiff3, you name it). Binary formats are not really handy for that.

from metastore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.