mbox series

[v3,0/2] Object ID support for git merge-file

Message ID 20231101192419.794162-1-sandals@crustytoothpaste.net (mailing list archive)
Headers show
Series Object ID support for git merge-file | expand

Message

brian m. carlson Nov. 1, 2023, 7:24 p.m. UTC
This series introduces an --object-id option to git merge-file such
that, instead of reading and writing from files on the system, it reads
from and writes to the object store using blobs.

Changes from v2:
* Include a patch from Martin to pre-improve the documentation
* Remove incorrect portion of commit message

Changes from v1:
* Improve error handling
* Re-add `-p` argument for documentation

Martin Ă…gren (1):
  git-merge-file doc: drop "-file" from argument placeholders

brian m. carlson (1):
  merge-file: add an option to process object IDs

 Documentation/git-merge-file.txt | 38 ++++++++++++++------
 builtin/merge-file.c             | 62 +++++++++++++++++++++++---------
 t/t6403-merge-file.sh            | 58 ++++++++++++++++++++++++++++++
 3 files changed, 132 insertions(+), 26 deletions(-)

Range-diff against v2:
-:  ---------- > 1:  21a96acf42 git-merge-file doc: drop "-file" from argument placeholders
1:  9cd4220a3b ! 2:  b1978a7b5c merge-file: add an option to process object IDs
    @@ Commit message
         Teach it an `--object-id` option which means that its arguments are
         object IDs and not files to allow it to do so.
     
    -    Since we obviously won't be writing the data to the first argument,
    -    imply the -p option so we write to standard output.
    -
         We handle the empty blob specially since read_mmblob doesn't read it
         directly and otherwise users cannot specify an empty ancestor.
     
    @@ Commit message
     
      ## Documentation/git-merge-file.txt ##
     @@ Documentation/git-merge-file.txt: SYNOPSIS
    + [verse]
      'git merge-file' [-L <current-name> [-L <base-name> [-L <other-name>]]]
      	[--ours|--theirs|--union] [-p|--stdout] [-q|--quiet] [--marker-size=<n>]
    - 	[--[no-]diff3] <current-file> <base-file> <other-file>
    -+'git merge-file' --object-id [-L <current-name> [-L <base-name> [-L <other-name>]]]
    -+	[--ours|--theirs|--union] [-p|--stdout] [-q|--quiet] [--marker-size=<n>]
    -+	[--[no-]diff3] <current-oid> <base-oid> <other-oid>
    +-	[--[no-]diff3] <current> <base> <other>
    ++	[--[no-]diff3] [--object-id] <current> <base> <other>
      
      
      DESCRIPTION
    -@@ Documentation/git-merge-file.txt: however, these conflicts are resolved favouring lines from `<current-file>`,
    - lines from `<other-file>`, or lines from both respectively.  The length of the
    +@@ Documentation/git-merge-file.txt: however, these conflicts are resolved favouring lines from `<current>`,
    + lines from `<other>`, or lines from both respectively.  The length of the
      conflict markers can be given with the `--marker-size` option.
      
     +If `--object-id` is specified, exactly the same behavior occurs, except that

Comments

Junio C Hamano Nov. 1, 2023, 11:55 p.m. UTC | #1
"brian m. carlson" <sandals@crustytoothpaste.net> writes:

> This series introduces an --object-id option to git merge-file such
> that, instead of reading and writing from files on the system, it reads
> from and writes to the object store using blobs.
>
> Changes from v2:
> * Include a patch from Martin to pre-improve the documentation
> * Remove incorrect portion of commit message

Looking good.  Will replace.  Shall we mark the topic ready for
'next'?

Thanks.