All of lore.kernel.org
 help / color / mirror / Atom feed
* bug: git name-rev --stdin --no-undefined on detached head
@ 2021-12-22 10:05 Erik Cervin Edin
  2021-12-23 18:39 ` John Cai
  0 siblings, 1 reply; 8+ messages in thread
From: Erik Cervin Edin @ 2021-12-22 10:05 UTC (permalink / raw)
  To: git

Hey all!

I ran into a situation that I think may be a bug
using git name-rev for detached heads.

Steps to reproduce:
Create a detached head
  git checkout --detached
  git commit --allow-empty -m foo

Expected results:
My understanding is that
  git name-rev $(git rev-list -1 HEAD)
  git rev-list -1 HEAD | git name-rev --stdin
should yield the same result.

As well as combining with other flags
like --name-only / --no-undefined

Actual results:
Where this fails as expected
  git name-rev --no-undefined $(git rev-list HEAD)
this just prints the SHA wo failing
  git rev-list -1 HEAD |  git name-rev --stdin --no-undefined

"name-only" is also affected
  git rev-list -1 HEAD |  git name-rev --stdin --name-only
returns the SHA and not the name

Tested on
git version 2.34.1.windows.1
-- 
Erik Cervin-Edin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-12-31 17:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 10:05 bug: git name-rev --stdin --no-undefined on detached head Erik Cervin Edin
2021-12-23 18:39 ` John Cai
2021-12-24  6:09   ` John Cai
2021-12-24 11:44     ` Erik Cervin Edin
2021-12-24 19:42   ` Junio C Hamano
2021-12-24 20:09     ` John Cai
2021-12-25  0:35     ` Junio C Hamano
2021-12-31 17:16     ` Philip Oakley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.