<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-check-ref-format.txt, branch v2.37.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.37.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.37.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-04-02T04:57:00Z</updated>
<entry>
<title>doc: promote "git switch"</title>
<updated>2019-04-02T04:57:00Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-03-29T10:39:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=328c6cb853d7237098569de9f94bc3d259846a08'/>
<id>urn:sha1:328c6cb853d7237098569de9f94bc3d259846a08</id>
<content type='text'>
The new command "git switch" is added to avoid the confusion of
one-command-do-all "git checkout" for new users. They are also helpful
to avoid ambiguation context.

For these reasons, promote it everywhere possible. This includes
documentation, suggestions/advice from other commands...

The "Checking out files" progress line in unpack-trees.c is also updated
to "Updating files" to be neutral to both git-checkout and git-switch.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Doc/check-ref-format: clarify information about @{-N} syntax</title>
<updated>2017-12-19T18:00:45Z</updated>
<author>
<name>Kaartic Sivaraam</name>
<email>kaartic.sivaraam@gmail.com</email>
</author>
<published>2017-12-16T08:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c6342e052535a5097a5bebe270e01b3cc9014bc3'/>
<id>urn:sha1:c6342e052535a5097a5bebe270e01b3cc9014bc3</id>
<content type='text'>
When the N-th previous thing checked out syntax (@{-N}) is used
with '--branch' option of check-ref-format the result may not be
the name of a branch that currently exists or ever existed. This
is because @{-N} is used to refer to the N-th last checked out
"thing", which might be a commit object name if the previous check
out was a detached HEAD state; or a branch name, otherwise. The
documentation thus does a wrong thing by promoting it as the
"previous branch syntax".

State that @{-N} is the syntax for specifying "N-th last thing
checked out" and also state that the result of using @{-N} might
also result in an commit object name.

Signed-off-by: Kaartic Sivaraam &lt;kaartic.sivaraam@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>check-ref-format doc: --branch validates and expands &lt;branch&gt;</title>
<updated>2017-10-17T23:01:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-10-17T07:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=89dd32aedcb52a77240f3923a687edc8a61662e7'/>
<id>urn:sha1:89dd32aedcb52a77240f3923a687edc8a61662e7</id>
<content type='text'>
"git check-ref-format --branch $name" feature was originally
introduced (and was advertised) as a way for scripts to take any
end-user supplied string (like "master", "@{-1}" etc.) and see if it
is usable when Git expects to see a branch name, and also obtain the
concrete branch name that the at-mark magic expands to.

Emphasize that "see if it is usable" role in the description and
clarify that the @{...} expansion only occurs when run from within a
repository.

[jn: split out from a larger patch]

Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-check-ref-format: clarify documentation for --normalize</title>
<updated>2017-02-21T21:02:42Z</updated>
<author>
<name>Damien Regad</name>
<email>dregad@mantisbt.org</email>
</author>
<published>2017-02-19T22:32:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=115a40add6140577978bdd3742f63eb3fdd00c80'/>
<id>urn:sha1:115a40add6140577978bdd3742f63eb3fdd00c80</id>
<content type='text'>
Use of 'iff' may be confusing to people not familiar with this term.

Improving the --normalize option's documentation to remove the use of
'iff', and clearly describe what happens when the condition is not met.

Signed-off-by: Damien Regad &lt;dregad@mantisbt.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-check-ref-format.txt: fixup documentation</title>
<updated>2016-09-21T18:12:41Z</updated>
<author>
<name>Elia Pinto</name>
<email>gitter.spiros@gmail.com</email>
</author>
<published>2016-09-20T07:33:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=92dece7024fc0152c6de41a65cfb0df469c747e5'/>
<id>urn:sha1:92dece7024fc0152c6de41a65cfb0df469c747e5</id>
<content type='text'>
die is not a standard shell function. Use
a different shell code for the example.

Signed-off-by: Elia Pinto &lt;gitter.spiros@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/doc-check-ref-format-typo'</title>
<updated>2015-12-10T20:36:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-12-10T20:36:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=56d63d0eabd2f975bf7c5c456c383252b1e7e300'/>
<id>urn:sha1:56d63d0eabd2f975bf7c5c456c383252b1e7e300</id>
<content type='text'>
* nd/doc-check-ref-format-typo:
  git-check-ref-format.txt: typo, s/avoids/avoid/
</content>
</entry>
<entry>
<title>git-check-ref-format.txt: typo, s/avoids/avoid/</title>
<updated>2015-12-04T21:09:48Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2015-12-04T18:09:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=56a8aea0c61c26e2644514ede24cec35b06ee0d0'/>
<id>urn:sha1:56a8aea0c61c26e2644514ede24cec35b06ee0d0</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: loosen restriction on wildcard "*" refspecs</title>
<updated>2015-07-27T16:21:31Z</updated>
<author>
<name>Jacob Keller</name>
<email>jacob.keller@gmail.com</email>
</author>
<published>2015-07-22T21:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cd377f45c9d06e8ab3e87d5a687ed22ab34e1c48'/>
<id>urn:sha1:cd377f45c9d06e8ab3e87d5a687ed22ab34e1c48</id>
<content type='text'>
Loosen restrictions on refspecs by allowing patterns that have a "*"
within a component instead of only as the whole component.

Remove the logic to accept a single "*" as a whole component from
check_refname_format(), and implement an extended form of that logic
in check_refname_component().  Pass the pointer to the flags argument
to the latter, as it has to clear REFNAME_REFSPEC_PATTERN bit when
it sees "*".

Teach check_refname_component() function to allow an asterisk "*"
only when REFNAME_REFSPEC_PATTERN is set in the flags, and drop the
bit after seeing a "*", to ensure that one side of a refspec
contains at most one asterisk.

This will allow us to accept refspecs such as `for/bar*:foo/baz*`.
Any refspec which functioned before shall continue functioning with
the new logic.

Signed-off-by: Jacob Keller &lt;jacob.keller@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add new @ shortcut for HEAD</title>
<updated>2013-09-12T21:39:34Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2013-09-02T06:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ba89f484e023827eca6ad44baf69af37dac4db3'/>
<id>urn:sha1:9ba89f484e023827eca6ad44baf69af37dac4db3</id>
<content type='text'>
Typing 'HEAD' is tedious, especially when we can use '@' instead.

The reason for choosing '@' is that it follows naturally from the
ref@op syntax (e.g. HEAD@{u}), except we have no ref, and no
operation, and when we don't have those, it makes sens to assume
'HEAD'.

So now we can use 'git show @~1', and all that goody goodness.

Until now '@' was a valid name, but it conflicts with this idea, so
let's make it invalid. Probably very few people, if any, used this name.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Revert "Add new @ shortcut for HEAD"</title>
<updated>2013-08-14T22:04:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-08-14T17:57:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2c2b6646c2723459dbd334c7ced6f77ffb0d596e'/>
<id>urn:sha1:2c2b6646c2723459dbd334c7ced6f77ffb0d596e</id>
<content type='text'>
This reverts commit cdfd94837b27c220f70f032b596ea993d195488f, as it
does not just apply to "@" (and forms with modifiers like @{u}
applied to it), but also affects e.g. "refs/heads/@/foo", which it
shouldn't.

The basic idea of giving a short-hand might be good, and the topic
can be retried later, but let's revert to avoid affecting existing
use cases for now for the upcoming release.
</content>
</entry>
</feed>
