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

[PATCH 2/3] git-svn: Disambiguate rev-list arguments to improve error message

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Jun 18, 2011, 06:47 UTC
Message-ID
<1308379680-17188-3-git-send-email-mhagger@alum.mit.edu>
In-Reply-To
<1308379680-17188-1-git-send-email-mhagger@alum.mit.edu>

Add "--" in the "git rev-list" command line so that if there is a bug and the revisions cannot be found, the error message is a bit less cryptic.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 git-svn.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index da3fea8..2cc9242 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3141,9 +3141,9 @@ sub check_cherry_pick {
 	my $parents = shift;
 	my @ranges = @_;
 	my %commits = map { $_ => 1 }
-		_rev_list("--no-merges", $tip, "--not", $base, @$parents);
+		_rev_list("--no-merges", $tip, "--not", $base, @$parents, "--");
 	for my $range ( @ranges ) {
-		delete @commits{_rev_list($range)};
+		delete @commits{_rev_list($range, "--")};
 	}
 	for my $commit (keys %commits) {
 		if (has_no_changes($commit)) {
-- 
1.7.5.4
Previous: Michael HaggertyNext: Michael Haggerty
Message 3 of 5 in “git-svn: Handle git root commits in mergeinfo ranges”
  1. 0/3 git-svn: Handle git root commits in mergeinfo rangesMichael Haggerty, Jun 18, 2011
  2. 1/3 git-svn: Demonstrate a bug with root commits in mergeinfo rangesMichael Haggerty, Jun 18, 2011
  3. 2/3 git-svn: Disambiguate rev-list arguments to improve error messageMichael Haggerty, Jun 18, 2011
  4. 3/3 git-svn: Correctly handle root commits in mergeinfo rangesMichael Haggerty, Jun 18, 2011
  5. Eric WongJun 28, 2011

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.