[v4,00/13] Add --pathspec-from-file option
mbox series

Message ID pull.445.v4.git.1575381738.gitgitgadget@gmail.com
Headers show
Series
  • Add --pathspec-from-file option
Related show

Message

Derrick Stolee via GitGitGadget Dec. 3, 2019, 2:02 p.m. UTC
Changes from V3:
================

The branch was rebased onto latest master. These patches remain unchanged
since they were accepted in V3: parse-options.h: add new options 
--pathspec-from-file, --pathspec-file-nulpathspec: add new function to parse
file doc: reset: synchronize description reset: support the 
--pathspec-from-file option doc: commit: synchronize description commit:
support the --pathspec-from-file option These patches are new, extending
support to more git commands: cmd_add: prepare for next patch add: support
the --pathspec-from-file option doc: checkout: remove duplicate synopsis
doc: checkout: fix broken text reference doc: checkout: synchronize 
description doc: restore: synchronize description checkout, restore: support
the --pathspec-from-file option

Cc: Phillip Wood phillip.wood123@gmail.com [phillip.wood123@gmail.com]

Alexandr Miloslavskiy (13):
  parse-options.h: add new options `--pathspec-from-file`,
    `--pathspec-file-nul`
  pathspec: add new function to parse file
  doc: reset: synchronize <pathspec> description
  reset: support the `--pathspec-from-file` option
  doc: commit: synchronize <pathspec> description
  commit: support the --pathspec-from-file option
  cmd_add: prepare for next patch
  add: support the --pathspec-from-file option
  doc: checkout: remove duplicate synopsis
  doc: checkout: fix broken text reference
  doc: checkout: synchronize <pathspec> description
  doc: restore: synchronize <pathspec> description
  checkout, restore: support the --pathspec-from-file option

 Documentation/git-add.txt         |  16 ++-
 Documentation/git-checkout.txt    |  50 +++++++---
 Documentation/git-commit.txt      |  29 ++++--
 Documentation/git-reset.txt       |  48 ++++++---
 Documentation/git-restore.txt     |  26 ++++-
 builtin/add.c                     |  60 ++++++++----
 builtin/checkout.c                |  31 +++++-
 builtin/commit.c                  |  25 ++++-
 builtin/reset.c                   |  25 ++++-
 parse-options.h                   |   2 +
 pathspec.c                        |  38 ++++++++
 pathspec.h                        |  10 ++
 t/t2026-checkout-pathspec-file.sh | 139 +++++++++++++++++++++++++++
 t/t2072-restore-pathspec-file.sh  | 139 +++++++++++++++++++++++++++
 t/t3704-add-pathspec-file.sh      | 127 ++++++++++++++++++++++++
 t/t7107-reset-pathspec-file.sh    | 155 ++++++++++++++++++++++++++++++
 t/t7526-commit-pathspec-file.sh   | 130 +++++++++++++++++++++++++
 t/t9902-completion.sh             |   2 +
 18 files changed, 982 insertions(+), 70 deletions(-)
 create mode 100755 t/t2026-checkout-pathspec-file.sh
 create mode 100755 t/t2072-restore-pathspec-file.sh
 create mode 100755 t/t3704-add-pathspec-file.sh
 create mode 100755 t/t7107-reset-pathspec-file.sh
 create mode 100755 t/t7526-commit-pathspec-file.sh


base-commit: 228f53135a4a41a37b6be8e4d6e2b6153db4a8ed
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-445%2FSyntevoAlex%2F%230207_pathspec_from_file-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-445/SyntevoAlex/#0207_pathspec_from_file-v4
Pull-Request: https://github.com/gitgitgadget/git/pull/445

Range-diff vs v3:

  1:  19b80326ea =  1:  cca5aee392 parse-options.h: add new options `--pathspec-from-file`, `--pathspec-file-nul`
  2:  55a7c6ec3c =  2:  fea64dfbf9 pathspec: add new function to parse file
  3:  d9f32e523c =  3:  1182ba3953 doc: reset: synchronize <pathspec> description
  4:  8a10ff881b =  4:  cea470fc91 reset: support the `--pathspec-from-file` option
  5:  0b79797e77 =  5:  0e1ac7e8a7 doc: commit: synchronize <pathspec> description
  6:  7e48212002 =  6:  c877866c13 commit: support the --pathspec-from-file option
  -:  ---------- >  7:  a97910cb55 cmd_add: prepare for next patch
  -:  ---------- >  8:  9a62da3470 add: support the --pathspec-from-file option
  -:  ---------- >  9:  5e449c8d29 doc: checkout: remove duplicate synopsis
  -:  ---------- > 10:  a498dda97b doc: checkout: fix broken text reference
  -:  ---------- > 11:  fd166755aa doc: checkout: synchronize <pathspec> description
  -:  ---------- > 12:  9e37a740e6 doc: restore: synchronize <pathspec> description
  -:  ---------- > 13:  c4dd4eaf13 checkout, restore: support the --pathspec-from-file option

Comments

Junio C Hamano Dec. 3, 2019, 4:55 p.m. UTC | #1
"Alexandr Miloslavskiy via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> Changes from V3:

Yikes, perhaps our mails crossed or something?  I think the previous
round is already in 'next'.

Let's wait and see they cook enough to graduate to 'master', and
build a separate series on top to teach other commands the option
using the facility introduced by the current series (which is the
first 6 patches you sent here).

Thanks.
Alexandr Miloslavskiy Dec. 3, 2019, 5:06 p.m. UTC | #2
On 03.12.2019 17:55, Junio C Hamano wrote:

>> Changes from V3:
> 
> Yikes, perhaps our mails crossed or something?  I think the previous
> round is already in 'next'.
> 
> Let's wait and see they cook enough to graduate to 'master', and
> build a separate series on top to teach other commands the option
> using the facility introduced by the current series (which is the
> first 6 patches you sent here).

My intent is to support more commands, so I was working on other patches 
in the background. Today more patches were ready and I wasn't sure 
whether to submit another topic or continue the old one. After some 
thinking, I decided to continue the old one.

Apparently, I guessed wrong :) Roger: I will wait until the first part 
graduates to 'master', then submit more patches.

Please give me an advice: when the time comes, shall I prepare even more 
patches and submit a massive branch, or shall I submit today's remaining 
patches, then wait again? I imagine that massive branches are scary and 
will deter reviewers?
Junio C Hamano Dec. 4, 2019, 7:25 p.m. UTC | #3
Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com> writes:

> On 03.12.2019 17:55, Junio C Hamano wrote:
>
>>> Changes from V3:
>>
>> Yikes, perhaps our mails crossed or something?  I think the previous
>> round is already in 'next'.
>>
>> Let's wait and see they cook enough to graduate to 'master', and
>> build a separate series on top to teach other commands the option
>> using the facility introduced by the current series (which is the
>> first 6 patches you sent here).
>
> My intent is to support more commands, so I was working on other
> patches in the background. Today more patches were ready and I wasn't
> sure whether to submit another topic or continue the old one. After
> some thinking, I decided to continue the old one.

Well I've split the new patches into its own topic to queue on the
am/pathspec-f-f-checkout branch, that builds directly on top of the
am/pathspec-from-file branch, for now.  I suspect that they may want
to be two topics (i.e. for "add" and for "checkout/restore"), but
I'd like to keep them out of 'next' either way for a while until the
base topic proves to be solid enough.

> Please give me an advice: when the time comes, shall I prepare even
> more patches and submit a massive branch, or shall I submit today's
> remaining patches, then wait again? I imagine that massive branches
> are scary and will deter reviewers?

Scary will probably not be an issue for the follow-up topics around
the pathspec-from-file theme, but a huge topic tends to wear out the
author and the reviewers, inviting trivial bugs that would otherwise
be found easily go unnoticed.

Thanks.
Alexandr Miloslavskiy Dec. 5, 2019, 10:43 a.m. UTC | #4
On 04.12.2019 20:25, Junio C Hamano wrote:

> Scary will probably not be an issue for the follow-up topics around
> the pathspec-from-file theme, but a huge topic tends to wear out the
> author and the reviewers, inviting trivial bugs that would otherwise
> be found easily go unnoticed.

OK, thanks! I will pause for now and wait until existing patches are in 
`master`.