Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple examples #932

Merged
merged 10 commits into from
Jul 17, 2023
Merged

A couple examples #932

merged 10 commits into from
Jul 17, 2023

Commits on Jul 16, 2023

  1. A git ls-tree example

    - Implements some of the functionality provided by `git ls-tree`.
    - Given the additional parsing of arguments, copying what libgit2 did
      and use `structopt` as an additional dev-dependencies.
    metatoaster committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    6f4b431 View commit details
    Browse the repository at this point in the history
  2. A git log example

    - A rather naive first cut.
    metatoaster committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    03b3423 View commit details
    Browse the repository at this point in the history
  3. git log example now shows merge parents

    - Also, output updated to be equivalent to the one produced by running
      `git log --full-history <commit> <path>`.
    - Shouldn't have mixed author/commit time (it was always author time
      being displayed by default).
    metatoaster committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    5cbb6a7 View commit details
    Browse the repository at this point in the history
  4. git log example iterator now properly lazy

    - Unless reverse is required - the git log DAG is unidirectional, the
      whole graph must be read in order for it to be reversed - libgit2 does
      this internally when the `GIT_SORT_REVERSE` is specified.
    
      See: https://github.com/libgit2/libgit2/blob/v1.6.4/src/libgit2/revwalk.c#L659-L669
    - Include some comments that might hopefully help future readers.
    metatoaster committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    8a6f1e8 View commit details
    Browse the repository at this point in the history
  5. git log example filter for min/max parents

    - This set of filters will report (non)merge commits by filtering out
      commits with min/max number of parents
    - Also refactored the path filter logic and restructure the layout of
      the code block plus add in comments to make fit as an example.
    metatoaster committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    01e9c29 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0df9f70 View commit details
    Browse the repository at this point in the history
  7. git log example include empty parents and paths

    - Also remember to test for empty list of paths and permit that through
      the filter as `any()` returns false on empty - likewise this applies
      to the check on list of parent_ids.
    metatoaster committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    bd59bbe View commit details
    Browse the repository at this point in the history
  8. cargo fmt

    metatoaster committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    6121b8f View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. feat: top-level examples that represent fully-fledged command-line ap…

    …plications.
    
    Please note that these are just examples, which aren't necessarily
    production ready in terms of quality or performance.
    Byron committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    c05eb22 View commit details
    Browse the repository at this point in the history
  2. refactor

    Byron committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    908f784 View commit details
    Browse the repository at this point in the history