* rev-list --ancestry-path with arg - bug or undocumented requirement
@ 2024-11-19 21:53 Kai Koponen
2024-11-20 3:22 ` Elijah Newren
0 siblings, 1 reply; 15+ messages in thread
From: Kai Koponen @ 2024-11-19 21:53 UTC (permalink / raw)
To: git
What did you do before the bug happened? (Steps to reproduce your issue)
Create a toy repo with commits in the following structure:
A - B - C
\
D
Run `git rev-list --ancestry-path=D A..C`.
What did you expect to happen? (Expected behavior)
Commits A and B should be listed.
What happened instead? (Actual behavior)
No commits listed.
What's different between what you expected and what actually happened?
--ancestry-path with a commit arg seems to return 0 results unless the
specified commit is itself part of the range. The rev-list documentation
does not mention that this is a requirement.
[System Info]
git version:
git version 2.47.0.338.g60cca15819-goog
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
libcurl: 8.8.0
OpenSSL: OpenSSL 3.3.2 3 Sep 2024
zlib: 1.3
compiler info: gnuc: 13.2
libc info: glibc: 2.38
$SHELL (typically, interactive shell): /bin/bash
[Enabled Hooks]
commit-msg
pre-commit
prepare-commit-msg
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: rev-list --ancestry-path with arg - bug or undocumented requirement 2024-11-19 21:53 rev-list --ancestry-path with arg - bug or undocumented requirement Kai Koponen @ 2024-11-20 3:22 ` Elijah Newren 2024-12-02 19:45 ` Kai Koponen 0 siblings, 1 reply; 15+ messages in thread From: Elijah Newren @ 2024-11-20 3:22 UTC (permalink / raw) To: Kai Koponen; +Cc: git On Tue, Nov 19, 2024 at 1:53 PM Kai Koponen <kaikoponen@google.com> wrote: > > What did you do before the bug happened? (Steps to reproduce your issue) > Create a toy repo with commits in the following structure: > A - B - C > \ > D > > Run `git rev-list --ancestry-path=D A..C`. > > What did you expect to happen? (Expected behavior) > Commits A and B should be listed. > > What happened instead? (Actual behavior) > No commits listed. > > What's different between what you expected and what actually happened? > --ancestry-path with a commit arg seems to return 0 results unless the > specified commit is itself part of the range. The rev-list documentation > does not mention that this is a requirement. Yeah, the commit message that introduced --ancestry-path=COMMIT did document this in its commit message (see 257418c59040c13bfa839e01922e21833cda6a52257418c59040 (revision: allow --ancestry-path to take an argument, 2022-08-19)), and I think my original documentation patch was a little clearer on this point, but when Jonathan suggested an alternative for the documentation (https://lore.kernel.org/git/20220818222416.3567602-1-jonathantanmy@google.com/), I didn't think about someone attempting a commit outside the ancestry-path as the argument. My bad. Based on the references above, would you like to suggest a documentation patch to ensure this requirement is documented? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: rev-list --ancestry-path with arg - bug or undocumented requirement 2024-11-20 3:22 ` Elijah Newren @ 2024-12-02 19:45 ` Kai Koponen 2024-12-02 23:48 ` Elijah Newren 2024-12-03 1:05 ` Junio C Hamano 0 siblings, 2 replies; 15+ messages in thread From: Kai Koponen @ 2024-12-02 19:45 UTC (permalink / raw) To: Elijah Newren; +Cc: git From 447a2367f8d3318e69adccc1b011b0d04792e438 Mon Sep 17 00:00:00 2001 From: Kai Koponen <kaikoponen@google.com> Date: Mon, 2 Dec 2024 19:32:25 +0000 Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions Signed-off-by: Kai Koponen <kaikopone@google.com> --- Documentation/rev-list-options.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 00ccf68744..1c678294af 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -412,12 +412,13 @@ Default mode:: --ancestry-path[=<commit>]:: When given a range of commits to display (e.g. 'commit1..commit2' - or 'commit2 {caret}commit1'), only display commits in that range - that are ancestors of <commit>, descendants of <commit>, or - <commit> itself. If no commit is specified, use 'commit1' (the - excluded part of the range) as <commit>. Can be passed multiple - times; if so, a commit is included if it is any of the commits - given or if it is an ancestor or descendant of one of them. + or 'commit2 {caret}commit1'), and a commit <commit> in that range, + only display commits in that range that are ancestors of <commit>, + descendants of <commit>, or <commit> itself. If no commit is + specified, use 'commit1' (the excluded part of the range) as + <commit>. Can be passed multiple times; if so, a commit is + included if it is any of the commits given or if it is an ancestor + or descendant of one of them. A more detailed explanation follows. -- 2.47.0.338.g60cca15819-goog On Tue, Nov 19, 2024 at 10:22 PM Elijah Newren <newren@gmail.com> wrote: > > On Tue, Nov 19, 2024 at 1:53 PM Kai Koponen <kaikoponen@google.com> wrote: > > > > What did you do before the bug happened? (Steps to reproduce your issue) > > Create a toy repo with commits in the following structure: > > A - B - C > > \ > > D > > > > Run `git rev-list --ancestry-path=D A..C`. > > > > What did you expect to happen? (Expected behavior) > > Commits A and B should be listed. > > > > What happened instead? (Actual behavior) > > No commits listed. > > > > What's different between what you expected and what actually happened? > > --ancestry-path with a commit arg seems to return 0 results unless the > > specified commit is itself part of the range. The rev-list documentation > > does not mention that this is a requirement. > > Yeah, the commit message that introduced --ancestry-path=COMMIT did > document this in its commit message (see > 257418c59040c13bfa839e01922e21833cda6a52257418c59040 (revision: allow > --ancestry-path to take an argument, 2022-08-19)), and I think my > original documentation patch was a little clearer on this point, but > when Jonathan suggested an alternative for the documentation > (https://lore.kernel.org/git/20220818222416.3567602-1-jonathantanmy@google.com/), > I didn't think about someone attempting a commit outside the > ancestry-path as the argument. My bad. > > Based on the references above, would you like to suggest a > documentation patch to ensure this requirement is documented? ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: rev-list --ancestry-path with arg - bug or undocumented requirement 2024-12-02 19:45 ` Kai Koponen @ 2024-12-02 23:48 ` Elijah Newren 2024-12-03 1:05 ` Junio C Hamano 1 sibling, 0 replies; 15+ messages in thread From: Elijah Newren @ 2024-12-02 23:48 UTC (permalink / raw) To: Kai Koponen; +Cc: git On Mon, Dec 2, 2024 at 11:45 AM Kai Koponen <kaikoponen@google.com> wrote: > > From 447a2367f8d3318e69adccc1b011b0d04792e438 Mon Sep 17 00:00:00 2001 > From: Kai Koponen <kaikoponen@google.com> > Date: Mon, 2 Dec 2024 19:32:25 +0000 > Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions > > Signed-off-by: Kai Koponen <kaikopone@google.com> > --- > Documentation/rev-list-options.txt | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/Documentation/rev-list-options.txt > b/Documentation/rev-list-options.txt > index 00ccf68744..1c678294af 100644 > --- a/Documentation/rev-list-options.txt > +++ b/Documentation/rev-list-options.txt > @@ -412,12 +412,13 @@ Default mode:: > > --ancestry-path[=<commit>]:: > When given a range of commits to display (e.g. 'commit1..commit2' > - or 'commit2 {caret}commit1'), only display commits in that range > - that are ancestors of <commit>, descendants of <commit>, or > - <commit> itself. If no commit is specified, use 'commit1' (the > - excluded part of the range) as <commit>. Can be passed multiple > - times; if so, a commit is included if it is any of the commits > - given or if it is an ancestor or descendant of one of them. > + or 'commit2 {caret}commit1'), and a commit <commit> in that range, > + only display commits in that range that are ancestors of <commit>, > + descendants of <commit>, or <commit> itself. If no commit is > + specified, use 'commit1' (the excluded part of the range) as > + <commit>. Can be passed multiple times; if so, a commit is > + included if it is any of the commits given or if it is an ancestor > + or descendant of one of them. where the changes are the insertion of the phrase "and a commit <commit> in that range,", which nicely captures the restriction. This patch looks good to me, thanks. > > A more detailed explanation follows. > > -- > 2.47.0.338.g60cca15819-goog ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: rev-list --ancestry-path with arg - bug or undocumented requirement 2024-12-02 19:45 ` Kai Koponen 2024-12-02 23:48 ` Elijah Newren @ 2024-12-03 1:05 ` Junio C Hamano 2024-12-03 17:14 ` [PATCH] doc: mention rev-list --ancestry-path restrictions Kai Koponen 1 sibling, 1 reply; 15+ messages in thread From: Junio C Hamano @ 2024-12-03 1:05 UTC (permalink / raw) To: Kai Koponen; +Cc: Elijah Newren, git Kai Koponen <kaikoponen@google.com> writes: > From 447a2367f8d3318e69adccc1b011b0d04792e438 Mon Sep 17 00:00:00 2001 Do not include this line. It is not a part of message, but merely added as a mark that a new message starts here in case there are two or more patch e-mail messages in a file. Since you are sending one patch per one e-mail message, you do not want it. > From: Kai Koponen <kaikoponen@google.com> Let your MUA have it on the From: header of your message; you do not want this line when your MUA is configured correctly (and yours is; we see From: header saying the same thing). > Date: Mon, 2 Dec 2024 19:32:25 +0000 You do not want this, either. Your MUA records on Date: header the time general public saw this change for the first time. > Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions Put this in the e-mail header. We add [PATCH] for a very good reason: make it easier to find patches in the mailing list traffic. > Here is where you "sell" your changes by explaining why we are making this change (like "existing text allows misinterpretation that makes it sound like doing this and that are possible, which is not true"). Please do not leave it empty. > Signed-off-by: Kai Koponen <kaikopone@google.com> > --- > Documentation/rev-list-options.txt | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/Documentation/rev-list-options.txt > b/Documentation/rev-list-options.txt > index 00ccf68744..1c678294af 100644 > --- a/Documentation/rev-list-options.txt > +++ b/Documentation/rev-list-options.txt > @@ -412,12 +412,13 @@ Default mode:: > > --ancestry-path[=<commit>]:: > When given a range of commits to display (e.g. 'commit1..commit2' > - or 'commit2 {caret}commit1'), only display commits in that range > - that are ancestors of <commit>, descendants of <commit>, or > - <commit> itself. If no commit is specified, use 'commit1' (the > - excluded part of the range) as <commit>. Can be passed multiple > - times; if so, a commit is included if it is any of the commits > - given or if it is an ancestor or descendant of one of them. > + or 'commit2 {caret}commit1'), and a commit <commit> in that range, > + only display commits in that range that are ancestors of <commit>, > + descendants of <commit>, or <commit> itself. If no commit is > + specified, use 'commit1' (the excluded part of the range) as > + <commit>. Can be passed multiple times; if so, a commit is > + included if it is any of the commits given or if it is an ancestor > + or descendant of one of them. As these files in Documentation/ are input to formatting programs, please do not reflow the text unnecessarily so that what you changed stand out, instead of forcing reviewers to go word-by-word to sift through the changes to see what got really changed. Thanks. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] doc: mention rev-list --ancestry-path restrictions 2024-12-03 1:05 ` Junio C Hamano @ 2024-12-03 17:14 ` Kai Koponen 2024-12-03 17:38 ` Kristoffer Haugsbakk 2024-12-03 23:24 ` Junio C Hamano 0 siblings, 2 replies; 15+ messages in thread From: Kai Koponen @ 2024-12-03 17:14 UTC (permalink / raw) To: git; +Cc: Elijah Newren, Junio C Hamano The rev-list documentation doesn't mention that the given commit must be in the specified commit range, leading to unexpected results. Signed-off-by: Kai Koponen <kaikopone@google.com> --- Documentation/rev-list-options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 00ccf68744..f0a46f9da5 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -412,7 +412,7 @@ Default mode:: --ancestry-path[=<commit>]:: When given a range of commits to display (e.g. 'commit1..commit2' - or 'commit2 {caret}commit1'), only display commits in that range + or 'commit2 {caret}commit1'), and a commit <commit> in that range, only display commits in that range that are ancestors of <commit>, descendants of <commit>, or <commit> itself. If no commit is specified, use 'commit1' (the excluded part of the range) as <commit>. Can be passed multiple -- 2.47.0.338.g60cca15819-goog On Mon, Dec 2, 2024 at 8:05 PM Junio C Hamano <gitster@pobox.com> wrote: > > Kai Koponen <kaikoponen@google.com> writes: > > > From 447a2367f8d3318e69adccc1b011b0d04792e438 Mon Sep 17 00:00:00 2001 > > Do not include this line. > > It is not a part of message, but merely added as a mark that a new > message starts here in case there are two or more patch e-mail > messages in a file. Since you are sending one patch per one e-mail > message, you do not want it. > > > From: Kai Koponen <kaikoponen@google.com> > > Let your MUA have it on the From: header of your message; you do not > want this line when your MUA is configured correctly (and yours is; > we see From: header saying the same thing). > > > Date: Mon, 2 Dec 2024 19:32:25 +0000 > > You do not want this, either. Your MUA records on Date: header the > time general public saw this change for the first time. > > > Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions > > Put this in the e-mail header. We add [PATCH] for a very good reason: > make it easier to find patches in the mailing list traffic. > > > > > Here is where you "sell" your changes by explaining why we are > making this change (like "existing text allows misinterpretation > that makes it sound like doing this and that are possible, which is > not true"). Please do not leave it empty. > > > Signed-off-by: Kai Koponen <kaikopone@google.com> > > --- > > Documentation/rev-list-options.txt | 13 +++++++------ > > 1 file changed, 7 insertions(+), 6 deletions(-) > > > > diff --git a/Documentation/rev-list-options.txt > > b/Documentation/rev-list-options.txt > > index 00ccf68744..1c678294af 100644 > > --- a/Documentation/rev-list-options.txt > > +++ b/Documentation/rev-list-options.txt > > @@ -412,12 +412,13 @@ Default mode:: > > > > --ancestry-path[=<commit>]:: > > When given a range of commits to display (e.g. 'commit1..commit2' > > - or 'commit2 {caret}commit1'), only display commits in that range > > - that are ancestors of <commit>, descendants of <commit>, or > > - <commit> itself. If no commit is specified, use 'commit1' (the > > - excluded part of the range) as <commit>. Can be passed multiple > > - times; if so, a commit is included if it is any of the commits > > - given or if it is an ancestor or descendant of one of them. > > + or 'commit2 {caret}commit1'), and a commit <commit> in that range, > > + only display commits in that range that are ancestors of <commit>, > > + descendants of <commit>, or <commit> itself. If no commit is > > + specified, use 'commit1' (the excluded part of the range) as > > + <commit>. Can be passed multiple times; if so, a commit is > > + included if it is any of the commits given or if it is an ancestor > > + or descendant of one of them. > > As these files in Documentation/ are input to formatting programs, > please do not reflow the text unnecessarily so that what you changed > stand out, instead of forcing reviewers to go word-by-word to sift > through the changes to see what got really changed. > > Thanks. ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] doc: mention rev-list --ancestry-path restrictions 2024-12-03 17:14 ` [PATCH] doc: mention rev-list --ancestry-path restrictions Kai Koponen @ 2024-12-03 17:38 ` Kristoffer Haugsbakk 2024-12-03 17:59 ` Kai Koponen 2024-12-03 23:33 ` Junio C Hamano 2024-12-03 23:24 ` Junio C Hamano 1 sibling, 2 replies; 15+ messages in thread From: Kristoffer Haugsbakk @ 2024-12-03 17:38 UTC (permalink / raw) To: Kai Koponen, git; +Cc: Elijah Newren, Junio C Hamano Hello Kai On Tue, Dec 3, 2024, at 18:14, Kai Koponen wrote: > The rev-list documentation doesn't mention that the given > commit must be in the specified commit range, leading > to unexpected results. > > Signed-off-by: Kai Koponen <kaikopone@google.com> > --- > Documentation/rev-list-options.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I couldn’t apply this patch to `master` (cc01bad4a9f (The twelfth batch, 2024-11-27)). It looks like it is because.. > > diff --git a/Documentation/rev-list-options.txt > b/Documentation/rev-list-options.txt > index 00ccf68744..f0a46f9da5 100644 > --- a/Documentation/rev-list-options.txt > +++ b/Documentation/rev-list-options.txt > @@ -412,7 +412,7 @@ Default mode:: > > --ancestry-path[=<commit>]:: > When given a range of commits to display (e.g. 'commit1..commit2' > - or 'commit2 {caret}commit1'), only display commits in that range > + or 'commit2 {caret}commit1'), and a commit <commit> in that range, > only display commits in that range This line got corrupted (linebreak). I see that you used git-send-email(1). Did you edit the patch file manually in order to add the quotation from Junio below? I’m guessing the editor then broke that line since it is 102 characters when combined/joined. I guess you could use cat(1) instead. I like to use Git Notes. You can add a note to the commit and then use that default namespace (commits) when making the patch. git notes edit git format-patch --notes=commits ... Although in this case it might be better to add a linebreak since the line gets so long. You can add one short line so that you don’t get the reflow-paragraph problem from the previous version: (these are with space indentation instead of tabs) --ancestry-path[=<commit>]:: When given a range of commits to display (e.g. 'commit1..commit2' - or 'commit2 {caret}commit1'), only display commits in that range + or 'commit2 {caret}commit1'), only display commits in that range, + and a commit <commit> in that range, that are ancestors of <commit>, descendants of <commit>, or <commit> itself. If no commit is specified, use 'commit1' (the excluded part of the range) as <commit>. Can be passed multiple ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] doc: mention rev-list --ancestry-path restrictions 2024-12-03 17:38 ` Kristoffer Haugsbakk @ 2024-12-03 17:59 ` Kai Koponen 2024-12-03 20:21 ` Kai Koponen 2024-12-03 23:33 ` Junio C Hamano 1 sibling, 1 reply; 15+ messages in thread From: Kai Koponen @ 2024-12-03 17:59 UTC (permalink / raw) To: Kristoffer Haugsbakk; +Cc: git, Elijah Newren, Junio C Hamano Apologies, I made a mistake while copying the patch in manually from format-patch; my git install doesn't have send-email available, I'll fix that. On Tue, Dec 3, 2024 at 12:39 PM Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote: > > Hello Kai > > On Tue, Dec 3, 2024, at 18:14, Kai Koponen wrote: > > The rev-list documentation doesn't mention that the given > > commit must be in the specified commit range, leading > > to unexpected results. > > > > Signed-off-by: Kai Koponen <kaikopone@google.com> > > --- > > Documentation/rev-list-options.txt | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > I couldn’t apply this patch to `master` (cc01bad4a9f (The twelfth batch, > 2024-11-27)). It looks like it is because.. > > > > > diff --git a/Documentation/rev-list-options.txt > > b/Documentation/rev-list-options.txt > > index 00ccf68744..f0a46f9da5 100644 > > --- a/Documentation/rev-list-options.txt > > +++ b/Documentation/rev-list-options.txt > > @@ -412,7 +412,7 @@ Default mode:: > > > > --ancestry-path[=<commit>]:: > > When given a range of commits to display (e.g. 'commit1..commit2' > > - or 'commit2 {caret}commit1'), only display commits in that range > > + or 'commit2 {caret}commit1'), and a commit <commit> in that range, > > only display commits in that range > > This line got corrupted (linebreak). > > I see that you used git-send-email(1). Did you edit the patch file > manually in order to add the quotation from Junio below? I’m guessing > the editor then broke that line since it is 102 characters when > combined/joined. I guess you could use cat(1) instead. I like to use > Git Notes. You can add a note to the commit and then use that default > namespace (commits) when making the patch. > > git notes edit > git format-patch --notes=commits ... > > Although in this case it might be better to add a linebreak since the > line gets so long. You can add one short line so that you don’t get the > reflow-paragraph problem from the previous version: > > (these are with space indentation instead of tabs) > > --ancestry-path[=<commit>]:: > When given a range of commits to display (e.g. 'commit1..commit2' > - or 'commit2 {caret}commit1'), only display commits in that range > + or 'commit2 {caret}commit1'), only display commits in that range, > + and a commit <commit> in that range, > that are ancestors of <commit>, descendants of <commit>, or > <commit> itself. If no commit is specified, use 'commit1' (the > excluded part of the range) as <commit>. Can be passed multiple ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] doc: mention rev-list --ancestry-path restrictions 2024-12-03 17:59 ` Kai Koponen @ 2024-12-03 20:21 ` Kai Koponen 0 siblings, 0 replies; 15+ messages in thread From: Kai Koponen @ 2024-12-03 20:21 UTC (permalink / raw) To: Kristoffer Haugsbakk; +Cc: git, Elijah Newren, Junio C Hamano Re-trying via GitGitGadget at https://lore.kernel.org/git/pull.1838.git.git.1733257083739.gitgitgadget@gmail.com/ On Tue, Dec 3, 2024 at 12:59 PM Kai Koponen <kaikoponen@google.com> wrote: > > Apologies, I made a mistake while copying the patch in manually from > format-patch; my git install doesn't have send-email available, I'll > fix that. > > On Tue, Dec 3, 2024 at 12:39 PM Kristoffer Haugsbakk > <kristofferhaugsbakk@fastmail.com> wrote: > > > > Hello Kai > > > > On Tue, Dec 3, 2024, at 18:14, Kai Koponen wrote: > > > The rev-list documentation doesn't mention that the given > > > commit must be in the specified commit range, leading > > > to unexpected results. > > > > > > Signed-off-by: Kai Koponen <kaikopone@google.com> > > > --- > > > Documentation/rev-list-options.txt | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > I couldn’t apply this patch to `master` (cc01bad4a9f (The twelfth batch, > > 2024-11-27)). It looks like it is because.. > > > > > > > > diff --git a/Documentation/rev-list-options.txt > > > b/Documentation/rev-list-options.txt > > > index 00ccf68744..f0a46f9da5 100644 > > > --- a/Documentation/rev-list-options.txt > > > +++ b/Documentation/rev-list-options.txt > > > @@ -412,7 +412,7 @@ Default mode:: > > > > > > --ancestry-path[=<commit>]:: > > > When given a range of commits to display (e.g. 'commit1..commit2' > > > - or 'commit2 {caret}commit1'), only display commits in that range > > > + or 'commit2 {caret}commit1'), and a commit <commit> in that range, > > > only display commits in that range > > > > This line got corrupted (linebreak). > > > > I see that you used git-send-email(1). Did you edit the patch file > > manually in order to add the quotation from Junio below? I’m guessing > > the editor then broke that line since it is 102 characters when > > combined/joined. I guess you could use cat(1) instead. I like to use > > Git Notes. You can add a note to the commit and then use that default > > namespace (commits) when making the patch. > > > > git notes edit > > git format-patch --notes=commits ... > > > > Although in this case it might be better to add a linebreak since the > > line gets so long. You can add one short line so that you don’t get the > > reflow-paragraph problem from the previous version: > > > > (these are with space indentation instead of tabs) > > > > --ancestry-path[=<commit>]:: > > When given a range of commits to display (e.g. 'commit1..commit2' > > - or 'commit2 {caret}commit1'), only display commits in that range > > + or 'commit2 {caret}commit1'), only display commits in that range, > > + and a commit <commit> in that range, > > that are ancestors of <commit>, descendants of <commit>, or > > <commit> itself. If no commit is specified, use 'commit1' (the > > excluded part of the range) as <commit>. Can be passed multiple ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] doc: mention rev-list --ancestry-path restrictions 2024-12-03 17:38 ` Kristoffer Haugsbakk 2024-12-03 17:59 ` Kai Koponen @ 2024-12-03 23:33 ` Junio C Hamano 2024-12-03 23:36 ` Kai Koponen 1 sibling, 1 reply; 15+ messages in thread From: Junio C Hamano @ 2024-12-03 23:33 UTC (permalink / raw) To: Kristoffer Haugsbakk; +Cc: Kai Koponen, git, Elijah Newren "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes: > Hello Kai > > I couldn’t apply this patch to `master` (cc01bad4a9f (The twelfth batch, > 2024-11-27)). It looks like it is because.. yes it is heavily whitespace damaged. Here is what I applied after manually reconstructing. --- >8 --- From: Kai Koponen <kaikoponen@google.com> Date: Tue, 3 Dec 2024 12:14:34 -0500 Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions The rev-list documentation doesn't mention that the given commit must be in the specified commit range, leading to unexpected results. Signed-off-by: Kai Koponen <kaikopone@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> --- Documentation/rev-list-options.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 0d90d5b154..9d5243e0aa 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -401,7 +401,8 @@ Default mode:: --ancestry-path[=<commit>]:: When given a range of commits to display (e.g. 'commit1..commit2' - or 'commit2 {caret}commit1'), only display commits in that range + or 'commit2 {caret}commit1'), and a commit <commit> in that range, + only display commits in that range that are ancestors of <commit>, descendants of <commit>, or <commit> itself. If no commit is specified, use 'commit1' (the excluded part of the range) as <commit>. Can be passed multiple -- 2.47.1-529-gecd20ec0f1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] doc: mention rev-list --ancestry-path restrictions 2024-12-03 23:33 ` Junio C Hamano @ 2024-12-03 23:36 ` Kai Koponen 0 siblings, 0 replies; 15+ messages in thread From: Kai Koponen @ 2024-12-03 23:36 UTC (permalink / raw) To: Junio C Hamano; +Cc: Kristoffer Haugsbakk, git, Elijah Newren Thanks for fixing the mangling, pickiness is definitely called for a huge project like this with lots of work on the maintainers. Wish gmail didn't eat tabs in plain text mode... the github app was easier to use than I expected though. On Tue, Dec 3, 2024 at 6:33 PM Junio C Hamano <gitster@pobox.com> wrote: > > "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes: > > > Hello Kai > > > > I couldn’t apply this patch to `master` (cc01bad4a9f (The twelfth batch, > > 2024-11-27)). It looks like it is because.. > > yes it is heavily whitespace damaged. Here is what I applied after > manually reconstructing. > > --- >8 --- > From: Kai Koponen <kaikoponen@google.com> > Date: Tue, 3 Dec 2024 12:14:34 -0500 > Subject: [PATCH] doc: mention rev-list --ancestry-path restrictions > > The rev-list documentation doesn't mention that the given > commit must be in the specified commit range, leading > to unexpected results. > > Signed-off-by: Kai Koponen <kaikopone@google.com> > Signed-off-by: Junio C Hamano <gitster@pobox.com> > --- > Documentation/rev-list-options.txt | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt > index 0d90d5b154..9d5243e0aa 100644 > --- a/Documentation/rev-list-options.txt > +++ b/Documentation/rev-list-options.txt > @@ -401,7 +401,8 @@ Default mode:: > > --ancestry-path[=<commit>]:: > When given a range of commits to display (e.g. 'commit1..commit2' > - or 'commit2 {caret}commit1'), only display commits in that range > + or 'commit2 {caret}commit1'), and a commit <commit> in that range, > + only display commits in that range > that are ancestors of <commit>, descendants of <commit>, or > <commit> itself. If no commit is specified, use 'commit1' (the > excluded part of the range) as <commit>. Can be passed multiple > -- > 2.47.1-529-gecd20ec0f1 > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] doc: mention rev-list --ancestry-path restrictions 2024-12-03 17:14 ` [PATCH] doc: mention rev-list --ancestry-path restrictions Kai Koponen 2024-12-03 17:38 ` Kristoffer Haugsbakk @ 2024-12-03 23:24 ` Junio C Hamano 1 sibling, 0 replies; 15+ messages in thread From: Junio C Hamano @ 2024-12-03 23:24 UTC (permalink / raw) To: Kai Koponen; +Cc: git, Elijah Newren Kai Koponen <kaikoponen@google.com> writes: > The rev-list documentation doesn't mention that the given > commit must be in the specified commit range, leading > to unexpected results. > > Signed-off-by: Kai Koponen <kaikopone@google.com> > --- > Documentation/rev-list-options.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/rev-list-options.txt > b/Documentation/rev-list-options.txt > index 00ccf68744..f0a46f9da5 100644 > --- a/Documentation/rev-list-options.txt > +++ b/Documentation/rev-list-options.txt > @@ -412,7 +412,7 @@ Default mode:: > > --ancestry-path[=<commit>]:: > When given a range of commits to display (e.g. 'commit1..commit2' > - or 'commit2 {caret}commit1'), only display commits in that range > + or 'commit2 {caret}commit1'), and a commit <commit> in that range, > only display commits in that range > that are ancestors of <commit>, descendants of <commit>, or > <commit> itself. If no commit is specified, use 'commit1' (the > excluded part of the range) as <commit>. Can be passed multiple Thanks for accomodating my pickyness ;-) This version reads very well. Will queue. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] doc: mention rev-list --ancestry-path restrictions
@ 2024-12-03 20:18 Kai Koponen via GitGitGadget
2024-12-03 22:22 ` Elijah Newren
2024-12-04 0:10 ` Junio C Hamano
0 siblings, 2 replies; 15+ messages in thread
From: Kai Koponen via GitGitGadget @ 2024-12-03 20:18 UTC (permalink / raw)
To: git; +Cc: Elijah Newren, Kristoffer Haugsbakk, Kai Koponen, Kai Koponen
From: Kai Koponen <kaikoponen@google.com>
The rev-list documention doesn't mention that the given
commit must be in the specified commit range, leading
to unexpected results.
Signed-off-by: Kai Koponen <kaikoponen@google.com>
---
doc: mention rev-list --ancestry-path restrictions
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1838%2Fgkaikoponen%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1838/gkaikoponen/master-v1
Pull-Request: https://github.com/git/git/pull/1838
Documentation/rev-list-options.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 00ccf687441..459e5a02f52 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -412,7 +412,8 @@ Default mode::
--ancestry-path[=<commit>]::
When given a range of commits to display (e.g. 'commit1..commit2'
- or 'commit2 {caret}commit1'), only display commits in that range
+ or 'commit2 {caret}commit1'), and a commit <commit> in that range,
+ only display commits in that range
that are ancestors of <commit>, descendants of <commit>, or
<commit> itself. If no commit is specified, use 'commit1' (the
excluded part of the range) as <commit>. Can be passed multiple
base-commit: cc01bad4a9f566cf4453c7edd6b433851b0835e2
--
gitgitgadget
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH] doc: mention rev-list --ancestry-path restrictions 2024-12-03 20:18 Kai Koponen via GitGitGadget @ 2024-12-03 22:22 ` Elijah Newren 2024-12-04 0:10 ` Junio C Hamano 1 sibling, 0 replies; 15+ messages in thread From: Elijah Newren @ 2024-12-03 22:22 UTC (permalink / raw) To: Kai Koponen via GitGitGadget; +Cc: git, Kristoffer Haugsbakk, Kai Koponen On Tue, Dec 3, 2024 at 12:18 PM Kai Koponen via GitGitGadget <gitgitgadget@gmail.com> wrote: > > From: Kai Koponen <kaikoponen@google.com> > > The rev-list documention doesn't mention that the given > commit must be in the specified commit range, leading > to unexpected results. > > Signed-off-by: Kai Koponen <kaikoponen@google.com> > --- > doc: mention rev-list --ancestry-path restrictions > > Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1838%2Fgkaikoponen%2Fmaster-v1 > Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1838/gkaikoponen/master-v1 > Pull-Request: https://github.com/git/git/pull/1838 > > Documentation/rev-list-options.txt | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt > index 00ccf687441..459e5a02f52 100644 > --- a/Documentation/rev-list-options.txt > +++ b/Documentation/rev-list-options.txt > @@ -412,7 +412,8 @@ Default mode:: > > --ancestry-path[=<commit>]:: > When given a range of commits to display (e.g. 'commit1..commit2' > - or 'commit2 {caret}commit1'), only display commits in that range > + or 'commit2 {caret}commit1'), and a commit <commit> in that range, > + only display commits in that range > that are ancestors of <commit>, descendants of <commit>, or > <commit> itself. If no commit is specified, use 'commit1' (the > excluded part of the range) as <commit>. Can be passed multiple > > base-commit: cc01bad4a9f566cf4453c7edd6b433851b0835e2 > -- > gitgitgadget Might be worth linking to the thread where this was discussed (in single-commit gitgitgadget PRs, that'd be done in the PR description), over here: https://lore.kernel.org/git/CADYQcGpXm=RTEYyxqdSowQ4Vg9jmXuCzOOpd-TgDX8U814BReg@mail.gmail.com/ Anyway, patch looks good to me. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] doc: mention rev-list --ancestry-path restrictions 2024-12-03 20:18 Kai Koponen via GitGitGadget 2024-12-03 22:22 ` Elijah Newren @ 2024-12-04 0:10 ` Junio C Hamano 1 sibling, 0 replies; 15+ messages in thread From: Junio C Hamano @ 2024-12-04 0:10 UTC (permalink / raw) To: Kai Koponen via GitGitGadget Cc: git, Elijah Newren, Kristoffer Haugsbakk, Kai Koponen "Kai Koponen via GitGitGadget" <gitgitgadget@gmail.com> writes: > From: Kai Koponen <kaikoponen@google.com> > > The rev-list documention doesn't mention that the given > commit must be in the specified commit range, leading > to unexpected results. > > Signed-off-by: Kai Koponen <kaikoponen@google.com> > --- > doc: mention rev-list --ancestry-path restrictions Thanks. ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-12-04 0:10 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-11-19 21:53 rev-list --ancestry-path with arg - bug or undocumented requirement Kai Koponen 2024-11-20 3:22 ` Elijah Newren 2024-12-02 19:45 ` Kai Koponen 2024-12-02 23:48 ` Elijah Newren 2024-12-03 1:05 ` Junio C Hamano 2024-12-03 17:14 ` [PATCH] doc: mention rev-list --ancestry-path restrictions Kai Koponen 2024-12-03 17:38 ` Kristoffer Haugsbakk 2024-12-03 17:59 ` Kai Koponen 2024-12-03 20:21 ` Kai Koponen 2024-12-03 23:33 ` Junio C Hamano 2024-12-03 23:36 ` Kai Koponen 2024-12-03 23:24 ` Junio C Hamano -- strict thread matches above, loose matches on Subject: below -- 2024-12-03 20:18 Kai Koponen via GitGitGadget 2024-12-03 22:22 ` Elijah Newren 2024-12-04 0:10 ` Junio C Hamano
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 NNTP newsgroup(s).