<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/var.c, branch main</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=main</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2010-01-22T06:04:42Z</updated>
<entry>
<title>make "git var" a built-in</title>
<updated>2010-01-22T06:04:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-01-22T04:21:55Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=55b6745d633b9501576eb02183da0b0fb1cee964'/>
<id>urn:sha1:55b6745d633b9501576eb02183da0b0fb1cee964</id>
<content type='text'>
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Teach git var about GIT_PAGER</title>
<updated>2009-11-13T20:20:47Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2009-10-31T01:41:27Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6361824589bc2d32989a9a33f985d09a368436a3'/>
<id>urn:sha1:6361824589bc2d32989a9a33f985d09a368436a3</id>
<content type='text'>
Expose the command found by setup_pager() for scripts to use.
Scripts can use this to avoid repeating the logic to look for a
proper pager in each command.

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>Teach git var about GIT_EDITOR</title>
<updated>2009-11-13T20:17:00Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2009-11-12T00:01:27Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=44fcb4977cbae67f4698306ccfe982420ceebcbf'/>
<id>urn:sha1:44fcb4977cbae67f4698306ccfe982420ceebcbf</id>
<content type='text'>
Expose the command used by launch_editor() for scripts to use.
This should allow one to avoid searching for a proper editor
separately in each command.

git_editor(void) uses the logic to decide which editor to use
that used to live in launch_editor().  The function returns NULL
if there is no suitable editor; the caller is expected to issue
an error message when appropriate.

launch_editor() uses git_editor() and gives the error message the
same way as before when EDITOR is not set.

"git var GIT_EDITOR" gives the editor name, or an error message
when there is no appropriate one.

"git var -l" gives GIT_EDITOR=name only if there is an
appropriate editor.

Originally-submitted-by: Johannes Sixt &lt;j6t@kdbg.org&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>Suppress warnings from "git var -l"</title>
<updated>2009-11-13T20:16:30Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2009-11-11T23:57:36Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=c27b39252ff713db414b8dbbfb263d0468031fab'/>
<id>urn:sha1:c27b39252ff713db414b8dbbfb263d0468031fab</id>
<content type='text'>
For scripts using "git var -l" to read all logical variables at
once, not all per-variable warnings will be relevant.  So suppress
them.

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>Style fixes, add a space after if/for/while.</title>
<updated>2009-09-01T06:26:28Z</updated>
<author>
<name>Brian Gianforcaro</name>
<email>b.gianfo@gmail.com</email>
</author>
<published>2009-09-01T05:35:10Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=eeefa7c90e1b754a2b01d73fd93aaf90afdc4914'/>
<id>urn:sha1:eeefa7c90e1b754a2b01d73fd93aaf90afdc4914</id>
<content type='text'>
The majority of code in core git appears to use a single
space after if/for/while. This is an attempt to bring more
code to this standard. These are entirely cosmetic changes.

Signed-off-by: Brian Gianforcaro &lt;b.gianfo@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add calls to git_extract_argv0_path() in programs that call git_config_*</title>
<updated>2009-01-26T08:26:05Z</updated>
<author>
<name>Steffen Prohaska</name>
<email>prohaska@zib.de</email>
</author>
<published>2009-01-18T12:00:12Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=2fb3f6db96492b680899f9e40f434eeb4c778a84'/>
<id>urn:sha1:2fb3f6db96492b680899f9e40f434eeb4c778a84</id>
<content type='text'>
Programs that use git_config need to find the global configuration.
When runtime prefix computation is enabled, this requires that
git_extract_argv0_path() is called early in the program's main().

This commit adds the necessary calls.

Signed-off-by: Steffen Prohaska &lt;prohaska@zib.de&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Replace uses of "git-var" with "git var"</title>
<updated>2008-07-30T18:42:01Z</updated>
<author>
<name>Todd Zullinger</name>
<email>tmz@pobox.com</email>
</author>
<published>2008-07-30T17:48:33Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=5354a56fe70420c147f930e0f7f1decbae685d19'/>
<id>urn:sha1:5354a56fe70420c147f930e0f7f1decbae685d19</id>
<content type='text'>
Signed-off-by: Todd Zullinger &lt;tmz@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Provide git_config with a callback-data parameter</title>
<updated>2008-05-14T19:34:44Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>Johannes.Schindelin@gmx.de</email>
</author>
<published>2008-05-14T17:46:53Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=ef90d6d4208a5130185b04f06e5f90a5f9959fe3'/>
<id>urn:sha1:ef90d6d4208a5130185b04f06e5f90a5f9959fe3</id>
<content type='text'>
git_config() only had a function parameter, but no callback data
parameter.  This assumes that all callback functions only modify
global variables.

With this patch, every callback gets a void * parameter, and it is hoped
that this will help the libification effort.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>var: Don't require to be in a git repository.</title>
<updated>2008-03-15T08:43:56Z</updated>
<author>
<name>Frank Lichtenheld</name>
<email>frank@lichtenheld.de</email>
</author>
<published>2008-03-14T17:29:27Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=2fba8366ed1e77685c83bbb0fa353c11624f0121'/>
<id>urn:sha1:2fba8366ed1e77685c83bbb0fa353c11624f0121</id>
<content type='text'>
git var works fine even when not called in a git repository. So
don't require it.

This will make it possible to remove this pre-condition for some
other git commands as well.

Signed-off-by: Frank Lichtenheld &lt;frank@lichtenheld.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Re-fix "builtin-commit: fix --signoff"</title>
<updated>2007-12-09T08:55:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2007-12-09T01:32:08Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=774751a8bc594a5b56039bbdc43c45e3882dd804'/>
<id>urn:sha1:774751a8bc594a5b56039bbdc43c45e3882dd804</id>
<content type='text'>
An earlier fix to the said commit was incomplete; it mixed up the
meaning of the flag parameter passed to the internal fmt_ident()
function, so this corrects it.

git_author_info() and git_committer_info() can be told to issue a
warning when no usable user information is found, and optionally can be
told to error out.  Operations that actually use the information to
record a new commit or a tag will still error out, but the caller to
leave reflog record will just silently use bogus user information.

Not warning on misconfigured user information while writing a reflog
entry is somewhat debatable, but it is probably nicer to the users to
silently let it pass, because the only information you are losing is who
checked out the branch.

 * git_author_info() and git_committer_info() used to take 1 (positive
   int) to error out with a warning on misconfiguration; this is now
   signalled with a symbolic constant IDENT_ERROR_ON_NO_NAME.

 * These functions used to take -1 (negative int) to warn but continue;
   this is now signalled with a symbolic constant IDENT_WARN_ON_NO_NAME.

 * fmt_ident() function implements the above error reporting behaviour
   common to git_author_info() and git_committer_info().  A symbolic
   constant IDENT_NO_DATE can be or'ed in to the flag parameter to make
   it return only the "Name &lt;email@address.xz&gt;".

 * fmt_name() is a thin wrapper around fmt_ident() that always passes
   IDENT_ERROR_ON_NO_NAME and IDENT_NO_DATE.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
