* [PATCH] git-rebase.txt: add another hook to the hooks section, and explain more @ 2020-04-03 4:35 Elijah Newren via GitGitGadget 2020-04-03 19:35 ` Junio C Hamano 2020-04-04 1:30 ` [PATCH v2] " Elijah Newren via GitGitGadget 0 siblings, 2 replies; 6+ messages in thread From: Elijah Newren via GitGitGadget @ 2020-04-03 4:35 UTC (permalink / raw) To: git Cc: jrnieder, emilyshaffer, phillip.wood123, Johannes.Schindelin, Elijah Newren, Elijah Newren From: Elijah Newren <newren@gmail.com> For more discussion about these hooks, their history relative to rebase, and logical consistency between different types of operations, see https://lore.kernel.org/git/CABPp-BG0bFKUage5cN_2yr2DkmS04W2Z9Pg5WcROqHznV3XBdw@mail.gmail.com/ and the links to some threads referenced therein. Signed-off-by: Elijah Newren <newren@gmail.com> --- git-rebase.txt: add another hook to the hooks section, and explain more I'm particularly interested in opinions on the last sentence added to the manpage, which is based on the thread mentioned in the commit message. Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-749%2Fnewren%2Frebase-and-hooks-v1 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-749/newren/rebase-and-hooks-v1 Pull-Request: https://github.com/git/git/pull/749 Documentation/git-rebase.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index f7a6033607f..5c518ca0ccf 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -684,9 +684,15 @@ Hooks ~~~~~ The apply backend has not traditionally called the post-commit hook, -while the merge backend has. However, this was by accident of -implementation rather than by design. Both backends should have the -same behavior, though it is not clear which one is correct. +while the merge backend has. In contrast, the apply backend has +traditionally called the post-checkout hook while the merge backend +has not. However, the calling of these hooks in both cases was by +accident of implementation rather than by design (both backends were +originally implemented as shell scripts and happened to invoke other +commands like 'git checkout' or 'git commit' that would call the +hooks). Both backends should have the same behavior, though it is not +entirely clear which, if any, is correct. We will likely remove both +of these hooks in the future. Interruptability ~~~~~~~~~~~~~~~~ base-commit: 274b9cc25322d9ee79aa8e6d4e86f0ffe5ced925 -- gitgitgadget ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] git-rebase.txt: add another hook to the hooks section, and explain more 2020-04-03 4:35 [PATCH] git-rebase.txt: add another hook to the hooks section, and explain more Elijah Newren via GitGitGadget @ 2020-04-03 19:35 ` Junio C Hamano 2020-04-03 19:52 ` Elijah Newren 2020-04-04 1:30 ` [PATCH v2] " Elijah Newren via GitGitGadget 1 sibling, 1 reply; 6+ messages in thread From: Junio C Hamano @ 2020-04-03 19:35 UTC (permalink / raw) To: Elijah Newren via GitGitGadget Cc: git, jrnieder, emilyshaffer, phillip.wood123, Johannes.Schindelin, Elijah Newren "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes: > The apply backend has not traditionally called the post-commit hook, > +while the merge backend has. In contrast, the apply backend has > +traditionally called the post-checkout hook while the merge backend > +has not. However, the calling of these hooks in both cases was by > +accident of implementation rather than by design (both backends were > +originally implemented as shell scripts and happened to invoke other > +commands like 'git checkout' or 'git commit' that would call the > +hooks). Both backends should have the same behavior, though it is not > +entirely clear which, if any, is correct. We will likely remove both > +of these hooks in the future. I'd phrase, instead of "remove", "stop calling from 'git rebase'". These hooks will still be called from their intended context ;-) ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] git-rebase.txt: add another hook to the hooks section, and explain more 2020-04-03 19:35 ` Junio C Hamano @ 2020-04-03 19:52 ` Elijah Newren 0 siblings, 0 replies; 6+ messages in thread From: Elijah Newren @ 2020-04-03 19:52 UTC (permalink / raw) To: Junio C Hamano Cc: Elijah Newren via GitGitGadget, Git Mailing List, Jonathan Nieder, Emily Shaffer, Phillip Wood, Johannes Schindelin On Fri, Apr 3, 2020 at 12:35 PM Junio C Hamano <gitster@pobox.com> wrote: > > "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > The apply backend has not traditionally called the post-commit hook, > > +while the merge backend has. In contrast, the apply backend has > > +traditionally called the post-checkout hook while the merge backend > > +has not. However, the calling of these hooks in both cases was by > > +accident of implementation rather than by design (both backends were > > +originally implemented as shell scripts and happened to invoke other > > +commands like 'git checkout' or 'git commit' that would call the > > +hooks). Both backends should have the same behavior, though it is not > > +entirely clear which, if any, is correct. We will likely remove both > > +of these hooks in the future. > > I'd phrase, instead of "remove", "stop calling from 'git rebase'". > These hooks will still be called from their intended context ;-) Makes sense; I'll update it. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] git-rebase.txt: add another hook to the hooks section, and explain more 2020-04-03 4:35 [PATCH] git-rebase.txt: add another hook to the hooks section, and explain more Elijah Newren via GitGitGadget 2020-04-03 19:35 ` Junio C Hamano @ 2020-04-04 1:30 ` Elijah Newren via GitGitGadget 2020-04-04 9:33 ` Phillip Wood 2020-04-05 0:00 ` [PATCH v3] " Elijah Newren via GitGitGadget 1 sibling, 2 replies; 6+ messages in thread From: Elijah Newren via GitGitGadget @ 2020-04-04 1:30 UTC (permalink / raw) To: git Cc: jrnieder, emilyshaffer, phillip.wood123, Johannes.Schindelin, Elijah Newren, Elijah Newren From: Elijah Newren <newren@gmail.com> For more discussion about these hooks, their history relative to rebase, and logical consistency between different types of operations, see https://lore.kernel.org/git/CABPp-BG0bFKUage5cN_2yr2DkmS04W2Z9Pg5WcROqHznV3XBdw@mail.gmail.com/ and the links to some threads referenced therein. Signed-off-by: Elijah Newren <newren@gmail.com> --- git-rebase.txt: add another hook to the hooks section, and explain more Changes since v1: * Updated the wording of the last sentence as per Junio's suggestion. Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-749%2Fnewren%2Frebase-and-hooks-v2 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-749/newren/rebase-and-hooks-v2 Pull-Request: https://github.com/git/git/pull/749 Range-diff vs v1: 1: 29a1ff520ba ! 1: 45a5c1c1ff9 git-rebase.txt: add another hook to the hooks section, and explain more @@ Documentation/git-rebase.txt: Hooks +originally implemented as shell scripts and happened to invoke other +commands like 'git checkout' or 'git commit' that would call the +hooks). Both backends should have the same behavior, though it is not -+entirely clear which, if any, is correct. We will likely remove both -+of these hooks in the future. ++entirely clear which, if any, is correct. We will likely make rebase ++stop calling either of these hooks in the future. Interruptability ~~~~~~~~~~~~~~~~ Documentation/git-rebase.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index f7a6033607f..5e0fcd4e9bd 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -684,9 +684,15 @@ Hooks ~~~~~ The apply backend has not traditionally called the post-commit hook, -while the merge backend has. However, this was by accident of -implementation rather than by design. Both backends should have the -same behavior, though it is not clear which one is correct. +while the merge backend has. In contrast, the apply backend has +traditionally called the post-checkout hook while the merge backend +has not. However, the calling of these hooks in both cases was by +accident of implementation rather than by design (both backends were +originally implemented as shell scripts and happened to invoke other +commands like 'git checkout' or 'git commit' that would call the +hooks). Both backends should have the same behavior, though it is not +entirely clear which, if any, is correct. We will likely make rebase +stop calling either of these hooks in the future. Interruptability ~~~~~~~~~~~~~~~~ base-commit: 274b9cc25322d9ee79aa8e6d4e86f0ffe5ced925 -- gitgitgadget ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] git-rebase.txt: add another hook to the hooks section, and explain more 2020-04-04 1:30 ` [PATCH v2] " Elijah Newren via GitGitGadget @ 2020-04-04 9:33 ` Phillip Wood 2020-04-05 0:00 ` [PATCH v3] " Elijah Newren via GitGitGadget 1 sibling, 0 replies; 6+ messages in thread From: Phillip Wood @ 2020-04-04 9:33 UTC (permalink / raw) To: Elijah Newren via GitGitGadget, git Cc: jrnieder, emilyshaffer, Johannes.Schindelin, Elijah Newren Hi Elijah On 04/04/2020 02:30, Elijah Newren via GitGitGadget wrote: > From: Elijah Newren <newren@gmail.com> > > For more discussion about these hooks, their history relative to rebase, > and logical consistency between different types of operations, see > https://lore.kernel.org/git/CABPp-BG0bFKUage5cN_2yr2DkmS04W2Z9Pg5WcROqHznV3XBdw@mail.gmail.com/ > and the links to some threads referenced therein. > > Signed-off-by: Elijah Newren <newren@gmail.com> > --- > git-rebase.txt: add another hook to the hooks section, and explain more > > Changes since v1: > > * Updated the wording of the last sentence as per Junio's suggestion. > > Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-749%2Fnewren%2Frebase-and-hooks-v2 > Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-749/newren/rebase-and-hooks-v2 > Pull-Request: https://github.com/git/git/pull/749 > > Range-diff vs v1: > > 1: 29a1ff520ba ! 1: 45a5c1c1ff9 git-rebase.txt: add another hook to the hooks section, and explain more > @@ Documentation/git-rebase.txt: Hooks > +originally implemented as shell scripts and happened to invoke other > +commands like 'git checkout' or 'git commit' that would call the > +hooks). Both backends should have the same behavior, though it is not > -+entirely clear which, if any, is correct. We will likely remove both > -+of these hooks in the future. > ++entirely clear which, if any, is correct. We will likely make rebase > ++stop calling either of these hooks in the future. > > Interruptability > ~~~~~~~~~~~~~~~~ > > > Documentation/git-rebase.txt | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt > index f7a6033607f..5e0fcd4e9bd 100644 > --- a/Documentation/git-rebase.txt > +++ b/Documentation/git-rebase.txt > @@ -684,9 +684,15 @@ Hooks > ~~~~~ > > The apply backend has not traditionally called the post-commit hook, > -while the merge backend has. However, this was by accident of > -implementation rather than by design. Both backends should have the > -same behavior, though it is not clear which one is correct. > +while the merge backend has. In contrast, the apply backend has > +traditionally called the post-checkout hook while the merge backend > +has not. This is not correct - both backends call the post-checkout hook, but the merge backend suppresses any output from it - see https://public-inbox.org/git/6c413abc-f48d-5a02-ac8b-09a0fa80b98d@gmail.com/ Best Wishes Phillip > However, the calling of these hooks in both cases was by > +accident of implementation rather than by design (both backends were > +originally implemented as shell scripts and happened to invoke other > +commands like 'git checkout' or 'git commit' that would call the > +hooks). Both backends should have the same behavior, though it is not > +entirely clear which, if any, is correct. We will likely make rebase > +stop calling either of these hooks in the future. > > Interruptability > ~~~~~~~~~~~~~~~~ > > base-commit: 274b9cc25322d9ee79aa8e6d4e86f0ffe5ced925 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3] git-rebase.txt: add another hook to the hooks section, and explain more 2020-04-04 1:30 ` [PATCH v2] " Elijah Newren via GitGitGadget 2020-04-04 9:33 ` Phillip Wood @ 2020-04-05 0:00 ` Elijah Newren via GitGitGadget 1 sibling, 0 replies; 6+ messages in thread From: Elijah Newren via GitGitGadget @ 2020-04-05 0:00 UTC (permalink / raw) To: git Cc: jrnieder, emilyshaffer, phillip.wood123, Johannes.Schindelin, Elijah Newren, Elijah Newren From: Elijah Newren <newren@gmail.com> For more discussion about these hooks, their history relative to rebase, and logical consistency between different types of operations, see https://lore.kernel.org/git/CABPp-BG0bFKUage5cN_2yr2DkmS04W2Z9Pg5WcROqHznV3XBdw@mail.gmail.com/ and the links to some threads referenced therein. Signed-off-by: Elijah Newren <newren@gmail.com> --- git-rebase.txt: add another hook to the hooks section, and explain more Changes since v2: * Corrections to the text pointed out by Phillip. Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-749%2Fnewren%2Frebase-and-hooks-v3 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-749/newren/rebase-and-hooks-v3 Pull-Request: https://github.com/git/git/pull/749 Range-diff vs v2: 1: 45a5c1c1ff9 ! 1: 22fb6ff7080 git-rebase.txt: add another hook to the hooks section, and explain more @@ Documentation/git-rebase.txt: Hooks -while the merge backend has. However, this was by accident of -implementation rather than by design. Both backends should have the -same behavior, though it is not clear which one is correct. -+while the merge backend has. In contrast, the apply backend has -+traditionally called the post-checkout hook while the merge backend -+has not. However, the calling of these hooks in both cases was by -+accident of implementation rather than by design (both backends were -+originally implemented as shell scripts and happened to invoke other -+commands like 'git checkout' or 'git commit' that would call the -+hooks). Both backends should have the same behavior, though it is not -+entirely clear which, if any, is correct. We will likely make rebase -+stop calling either of these hooks in the future. ++while the merge backend has. Both have called the post-checkout hook, ++though the merge backend has squelched its output. Further, both ++backends only call the post-checkout hook with the starting point ++commit of the rebase, not the intermediate commits nor the final ++commit. In each case, the calling of these hooks was by accident of ++implementation rather than by design (both backends were originally ++implemented as shell scripts and happened to invoke other commands ++like 'git checkout' or 'git commit' that would call the hooks). Both ++backends should have the same behavior, though it is not entirely ++clear which, if any, is correct. We will likely make rebase stop ++calling either of these hooks in the future. Interruptability ~~~~~~~~~~~~~~~~ Documentation/git-rebase.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index f7a6033607f..5a756b5b3a6 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -684,9 +684,17 @@ Hooks ~~~~~ The apply backend has not traditionally called the post-commit hook, -while the merge backend has. However, this was by accident of -implementation rather than by design. Both backends should have the -same behavior, though it is not clear which one is correct. +while the merge backend has. Both have called the post-checkout hook, +though the merge backend has squelched its output. Further, both +backends only call the post-checkout hook with the starting point +commit of the rebase, not the intermediate commits nor the final +commit. In each case, the calling of these hooks was by accident of +implementation rather than by design (both backends were originally +implemented as shell scripts and happened to invoke other commands +like 'git checkout' or 'git commit' that would call the hooks). Both +backends should have the same behavior, though it is not entirely +clear which, if any, is correct. We will likely make rebase stop +calling either of these hooks in the future. Interruptability ~~~~~~~~~~~~~~~~ base-commit: 274b9cc25322d9ee79aa8e6d4e86f0ffe5ced925 -- gitgitgadget ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-05 0:00 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-04-03 4:35 [PATCH] git-rebase.txt: add another hook to the hooks section, and explain more Elijah Newren via GitGitGadget 2020-04-03 19:35 ` Junio C Hamano 2020-04-03 19:52 ` Elijah Newren 2020-04-04 1:30 ` [PATCH v2] " Elijah Newren via GitGitGadget 2020-04-04 9:33 ` Phillip Wood 2020-04-05 0:00 ` [PATCH v3] " Elijah Newren via GitGitGadget
Code repositories for project(s) associated with this public inbox https://80x24.org/mirrors/git.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).