The meaning of x~0 and x~ as rev-spec.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Testing suggests that <name>~0 and <name>~ are the same and are just
synonyms for <name> as rev-specs. Is that correct? Is that by design, or
by accident?

Shouldn't <name>~0 have [the same] special meaning as <name>^0?

Shouldn't <name>~ be a short-cut for <name>~1, similar to <name>^?

Anyway, I think that at least <name>~0 (useful for scripting) should be
explicitly documented, provided that <name>^0 has special (and
documented) meaning.

[
The question arose when I wanted to write something like this to
automate reverting of a few last revisions:

  for i in 0 1 2 3; do
      git revert -n HEAD~$i
  done
  git commit -a
]
 
-- Sergei.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux