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

Re: git checkout does not warn about tags without corresponding commits

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 3, 2009, 11:53 UTC
Message-ID
<7vbpuo7ghz.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vr63k8vvf.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> I haven't looked at the code very closely, but I think this should fix
> it.  Thorough reviewing (not just running the test suite) is much
> appreciated.

Just for fun, this will apply to 782c2d6 (Build in checkout, 2008-02-07) and seems to fix the issue ;-)

No, I am not going to issue a maintenance release for 1.5.5 just to include this fix, even though I could. I do not think this is a grave enough regression to warrant a backport beyond 1.6.0 series.

 builtin-checkout.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git i/builtin-checkout.c w/builtin-checkout.c
index 59a0ef4..1d0de68 100644
--- i/builtin-checkout.c
+++ w/builtin-checkout.c
@@ -435,6 +435,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 			argv++;
 			argc--;
 		} else if ((source_tree = parse_tree_indirect(rev))) {
+			new.name = arg;
 			argv++;
 			argc--;
 		}
Previous: Junio C HamanoNext: Henrik Austad
Message 6 of 8 in “git checkout does not warn about tags without corresponding commits”
  1. Henrik AustadJan 2, 2009
  2. Miklos VajnaJan 2, 2009
  3. Junio C HamanoJan 2, 2009
  4. Henrik AustadJan 3, 2009
  5. Junio C HamanoJan 3, 2009
  6. Junio C HamanoJan 3, 2009
  7. Henrik AustadJan 3, 2009
  8. Daniel BarkalowJan 3, 2009

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.