git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: [PATCH 2/2] rebase: turn on progress option by default for format-patch

From
KWKevin Willford <kewillf@microsoft.com>
Date
May 31, 2017, 19:46 UTC
Message-ID
<SN2PR03MB23331225571F62753E88572CB7F10@SN2PR03MB2333.namprd03.prod.outlook.com>
In-Reply-To
<CAGZ79kYns3CWS5acxGRk67mqdfBvPC=hngnNyovrOkjRRwhRCA@mail.gmail.com>
Show 17 quoted lines
> -----Original Message-----
> From: Stefan Beller [mailto:sbeller@google.com]
> Sent: Wednesday, May 31, 2017 1:09 PM
> To: Kevin Willford <kcwillford@gmail.com>
> Cc: git@vger.kernel.org; Junio C Hamano <gitster@pobox.com>; Kevin
> Willford <kewillf@microsoft.com>
> Subject: Re: [PATCH 2/2] rebase: turn on progress option by default for
> format-patch
> 
> On Wed, May 31, 2017 at 8:04 AM, Kevin Willford <kcwillford@gmail.com>
> wrote:
> > This change passes the progress option of format-patch by default and
> > passes the -q --quiet option through to the format-patch call so that
> > it is respected as well.
> 
> This is not conflicting with Johannes rewrite of rebase in C?
> (rebase is a huge beast IIUC)

I will check with Johannes and see what possible conflicts there could be. Since these are flags that get passed to the format-patch code, it shouldn't take much to put it in the C code as well.

Show 6 quoted lines
> 
> When passing the progress option by default to formatting patches, maybe
> we should use start_progress_delay in the previous patch instead to omit
> the progress for short lived patch formatting sessions?
> (say a delay of one second?)
> 
I thought about that and certainly could do it but I have found it nice to have the number of patches that are generated in the output even for a small number or commits.  For example when I run a `git rebase master` and expect there to be only 2 commits, the message "Generating patch: 100% (2/2), done."  Gives me that good feeling that I did it right and didn't mess something up.  I'm good either way though.
Show 49 quoted lines
> Thanks,
> Stefan
> 
> >
> > Signed-off-by: Kevin Willford <kewillf@microsoft.com>
> > ---
> >  git-rebase--am.sh | 5 +++--
> >  git-rebase.sh     | 2 ++
> >  2 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/git-rebase--am.sh b/git-rebase--am.sh index
> > 375239341f..ab2be30abf 100644
> > --- a/git-rebase--am.sh
> > +++ b/git-rebase--am.sh
> > @@ -51,8 +51,9 @@ then
> >  else
> >         rm -f "$GIT_DIR/rebased-patches"
> >
> > -       git format-patch -k --stdout --full-index --cherry-pick --right-only \
> > -               --src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter \
> > +       git format-patch $git_format_patch_opt -k --stdout --full-index \
> > +               --cherry-pick --right-only --src-prefix=a/ --dst-prefix=b/ \
> > +               --no-renames --no-cover-letter --progress \
> >                 "$revisions" ${restrict_revision+^$restrict_revision} \
> >                 >"$GIT_DIR/rebased-patches"
> >         ret=$?
> > diff --git a/git-rebase.sh b/git-rebase.sh index
> > db1deed846..b72e319ac9 100755
> > --- a/git-rebase.sh
> > +++ b/git-rebase.sh
> > @@ -73,6 +73,7 @@ test "$(git config --bool rebase.stat)" = true &&
> > diffstat=t  autostash="$(git config --bool rebase.autostash || echo false)"
> >  fork_point=auto
> >  git_am_opt=
> > +git_format_patch_opt=
> >  rebase_root=
> >  force_rebase=
> >  allow_rerere_autoupdate=
> > @@ -308,6 +309,7 @@ do
> >         --quiet)
> >                 GIT_QUIET=t
> >                 git_am_opt="$git_am_opt -q"
> > +               git_format_patch_opt="$git_format_patch_opt -q"
> >                 verbose=
> >                 diffstat=
> >                 ;;
> > --
> > 2.13.0.92.g73a4ce6a77
> >
Previous: Stefan BellerNext: Stefan Beller
Message 11 of 34 in “Add progress to format-patch and rebase”
  1. 0/2 Add progress to format-patch and rebaseKevin Willford, May 31, 2017
  2. 1/2 format-patch: have progress option while generating patchesKevin Willford, May 31, 2017
  3. Stefan BellerMay 31, 2017
  4. Kevin WillfordMay 31, 2017
  5. Jeff KingMay 31, 2017
  6. Junio C HamanoJun 1, 2017
  7. Johannes SchindelinJun 1, 2017
  8. Jeff KingJun 1, 2017
  9. 2/2 rebase: turn on progress option by default for format-patchKevin Willford, May 31, 2017
  10. Stefan BellerMay 31, 2017
  11. Kevin WillfordMay 31, 2017
  12. Stefan BellerMay 31, 2017
  13. Johannes SchindelinJun 1, 2017
  14. Jeff KingMay 31, 2017
  15. Junio C HamanoJun 3, 2017
  16. 0/2 Add progress for format-patch and rebaseKevin Willford, Aug 10, 2017
  17. 2/2 rebase: turn on progress option by default for format-patchKevin Willford, Aug 10, 2017
  18. Junio C HamanoAug 11, 2017
  19. 1/2 format-patch: have progress option while generating patchesKevin Willford, Aug 10, 2017
  20. Jeff KingAug 10, 2017
  21. Junio C HamanoAug 11, 2017
  22. Philip OakleyAug 12, 2017
  23. Jeff KingAug 13, 2017
  24. Junio C HamanoAug 14, 2017
  25. Junio C HamanoAug 14, 2017
  26. Jeff KingAug 14, 2017
  27. Junio C HamanoAug 14, 2017
  28. Jeff KingAug 14, 2017
  29. Junio C HamanoAug 14, 2017
  30. progress: simplify "delayed" progress APIJunio C Hamano, Aug 19, 2017
  31. Junio C HamanoAug 19, 2017
  32. Jeff KingAug 20, 2017
  33. Junio C HamanoAug 10, 2017
  34. Jeff KingAug 10, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.