git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Slight inconsistency between ref delete commands.
@ 2014-05-21 10:35 Sergei Organov
  2014-05-21 16:49 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Sergei Organov @ 2014-05-21 10:35 UTC (permalink / raw)
  To: git

Hello,

Was writing conversion script from CVS to git for my repo and noticed
slight inconsistency in git-tag, git-branch, and git-update-ref behavior:

$ git --version
git version 1.9.3
$ git tag -d && echo success
success
$ git branch -d && echo success
fatal: branch name required
$ git update-ref -d && echo success
usage: git update-ref [options] -d <refname> [<oldval>]
   or: git update-ref [options]    <refname> <newval> [<oldval>]
   or: git update-ref [options] --stdin [-z]

    -m <reason>           reason of the update
    -d                    delete the reference
    --no-deref            update <refname> not the one it points to
    -z                    stdin has NUL-terminated arguments
    --stdin               read updates from stdin


Noticed when used xargs without -r switch, like this:

git for-each-ref --format="%(refname)" "refs/tags/*-merge" | xargs -n 1 git update-ref -d

-- Sergey.

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

end of thread, other threads:[~2014-05-21 16:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-21 10:35 Slight inconsistency between ref delete commands Sergei Organov
2014-05-21 16:49 ` Jeff King

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).