# doc bug: update-ref --create-reflog also works with --stdin

2 messages from 2019-04-20 to 2019-04-21. Participants: Chris Jerdonek, Junio C Hamano.
Thread: https://gitlist.dev/t/50957

## Chris Jerdonek, 2019-04-20 01:01

Subject: doc bug: update-ref --create-reflog also works with --stdin
Message-ID: <CAOTb1wc=qBmD4k4DH1bMckrYzc3ZzB=bBYDk7QUQWxKdtsXCHQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAOTb1wc%3DqBmD4k4DH1bMckrYzc3ZzB%3DbBYDk7QUQWxKdtsXCHQ%40mail.gmail.com

```
This is to report a bug in the docs, or at least suggest an improvement.

The update-ref documentation says that --create-reflog can only be
passed when providing a new ref to create and doesn't say it can also
be used with --stdin:

'git update-ref' [-m <reason>] [--no-deref] (-d <ref> [<oldvalue>] |
[--create-reflog] <ref> <newvalue> [<oldvalue>] | --stdin [-z])

from: https://github.com/git/git/blob/ffac537e6cbbf934b08745a378932722df287a53/Documentation/git-update-ref.txt#L11

My testing shows that it also works with --stdin, so it seems like it
would help to document this.

Thanks,
--Chris

```

## Junio C Hamano, 2019-04-21 05:13

Subject: Re: doc bug: update-ref --create-reflog also works with --stdin
Message-ID: <xmqqlg04c54c.fsf@gitster-ct.c.googlers.com>
URL: https://gitlist.dev/e/xmqqlg04c54c.fsf%40gitster-ct.c.googlers.com
In-Reply-To: <CAOTb1wc=qBmD4k4DH1bMckrYzc3ZzB=bBYDk7QUQWxKdtsXCHQ@mail.gmail.com>

```
Chris Jerdonek <chris.jerdonek@gmail.com> writes:

> The update-ref documentation says that --create-reflog can only be
> passed when providing a new ref to create and doesn't say it can also
> be used with --stdin:

True.  It instead should say that it only makes sense when creating
a new ref; it does not matter where the names of new refs come from.

```
