<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/help.c, branch v1.7.7.4</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.7.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.7.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-07-22T21:43:21Z</updated>
<entry>
<title>Merge branch 'ms/help-unknown'</title>
<updated>2011-07-22T21:43:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-07-22T21:43:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c8409e716a8a117ee37fb0c4b8ecbfcc4bac3fe9'/>
<id>urn:sha1:c8409e716a8a117ee37fb0c4b8ecbfcc4bac3fe9</id>
<content type='text'>
* ms/help-unknown:
  help_unknown_cmd: do not propose an "unknown" cmd
</content>
</entry>
<entry>
<title>help_unknown_cmd: do not propose an "unknown" cmd</title>
<updated>2011-07-08T15:59:44Z</updated>
<author>
<name>Michael Schubert</name>
<email>mschub@elegosoft.com</email>
</author>
<published>2011-07-08T10:08:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=823e0ded8a319425496967dcb284e7e3ce2b6c29'/>
<id>urn:sha1:823e0ded8a319425496967dcb284e7e3ce2b6c29</id>
<content type='text'>
When executing an external shell script like `git foo` with a bad
shebang, e.g. "#!/usr/bin/not/existing", execvp returns 127 (ENOENT).

Since help_unknown_cmd proposes the use of all external commands similar
to the name of the "unknown" command, it suggests the just failed command
again. Stop it and give some advice to the user.

Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Michael Schubert &lt;mschub@elegosoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help.c: Fix detection of custom merge strategy on cygwin</title>
<updated>2011-06-16T22:02:31Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2011-06-16T20:22:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=b8a9733377a648483958bf5472158f7c01641420'/>
<id>urn:sha1:b8a9733377a648483958bf5472158f7c01641420</id>
<content type='text'>
Test t7606-merge-custom.sh fails on cygwin when git-merge fails
with an "Could not find merge strategy 'theirs'" error, despite
the test correctly preparing an (executable) git-merge-theirs
script.

The cause of the failure is the mis-detection of the executable
status of the script, by the is_executable() function, while the
load_command_list() function is searching the path for additional
merge strategy programs.

Note that the l/stat() "functions" on cygwin are somewhat
schizophrenic (see commits adbc0b6, 7faee6b and 7974843), and
their behaviour depends on the timing of various git setup and
config function calls. In particular, until the "git_dir" has
been set (have_git_dir() returns true), the real cygwin (POSIX
emulating) l/stat() functions are called. Once "git_dir" has
been set, the "native Win32 API" implementations of l/stat()
may, or may not, be called depending on the setting of the
core.filemode and core.ignorecygwinfstricks config variables.

We also note that, since commit c869753, core.filemode is forced
to false, even on NTFS, by git-init and git-clone. A user (or a
test) can, of course, reset core.filemode to true explicitly if
the filesystem supports it (and he doesn't use any problematic
windows software). The test-suite currently runs all tests on
cygwin with core.filemode set to false.

Given the above, we see that the built-in merge strategies are
correctly detected as executable, since they are checked for
before "git_dir" is set, whereas all custom merge strategies are
not, since they are checked for after "git_dir" is set.

In order to fix the mis-detection problem, we change the code in
is_executable() to re-use the conditional WIN32 code section,
which actually looks at the content of the file to determine if
the file is executable. On cygwin we also make the additional
code conditional on the executable bit of the file mode returned
by the initial stat() call. (only the real cygwin function would
set the executable bit in the file mode.)

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: always suggest common-cmds if prefix of cmd</title>
<updated>2010-12-05T20:15:12Z</updated>
<author>
<name>Erik Faye-Lund</name>
<email>kusmabite@gmail.com</email>
</author>
<published>2010-11-26T16:00:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=6612b9e471a3e25079dac5257ead8cf6abe68575'/>
<id>urn:sha1:6612b9e471a3e25079dac5257ead8cf6abe68575</id>
<content type='text'>
If someone runs "git st", the command "git status" is not suggested
because it's not one of the closest levenshtein-neighbour.

Reserve the distance of 0 for common commands where the entered command
is a prefixe, as these are often more likely to be what the user meant.

This way, "git status" is the first suggestion, while a list of possible
typos are still suggested as well.

Signed-off-by: Erik Faye-Lund &lt;kusmabite@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Remove hyphen from "git-command" in two error messages</title>
<updated>2010-02-16T02:20:54Z</updated>
<author>
<name>Pete Harlan</name>
<email>pgit@pcharlan.com</email>
</author>
<published>2010-02-15T23:33:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7283bbc70a55d7364fbeaefc1009c03fcfc8d929'/>
<id>urn:sha1:7283bbc70a55d7364fbeaefc1009c03fcfc8d929</id>
<content type='text'>
Signed-off-by: Pete Harlan &lt;pgit@pcharlan.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help.autocorrect: do not run a command if the command given is junk</title>
<updated>2009-12-16T00:21:51Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2009-12-15T07:57:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=06500a029953164a3110c705ae579ef43548d006'/>
<id>urn:sha1:06500a029953164a3110c705ae579ef43548d006</id>
<content type='text'>
If a given command is not found, then help.c tries to guess which one the
user could have meant. If help.autocorrect is 0 or unset, then a list of
suggestions is given as long as the dissimilarity between the given command
and the candidates is not excessively high. But if help.autocorrect was
non-zero (i.e., a delay after which the command is run automatically), the
latter restriction on dissimilarity was not obeyed.

In my case, this happened:

 $ git ..daab02
 WARNING: You called a Git command named '..daab02', which does not exist.
 Continuing under the assumption that you meant 'read-tree'
 in 4.0 seconds automatically...

The patch reuses the similarity limit that is also applied when the list of
suggested commands is printed.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Test for WIN32 instead of __MINGW32_</title>
<updated>2009-09-19T03:00:42Z</updated>
<author>
<name>Frank Li</name>
<email>lznuaa@gmail.com</email>
</author>
<published>2009-09-16T08:20:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=71064e3f86fbf2eb5c2b55a3024051f9542ae229'/>
<id>urn:sha1:71064e3f86fbf2eb5c2b55a3024051f9542ae229</id>
<content type='text'>
The code which is conditional on MinGW32 is actually conditional on Windows.
Use the WIN32 symbol, which is defined by the MINGW32 and MSVC environments,
but not by Cygwin.

Define SNPRINTF_SIZE_CORR=1 for MSVC too, as its vsnprintf function does
not add NUL at the end of the buffer if the result fits the buffer size
exactly.

Signed-off-by: Frank Li &lt;lznuaa@gmail.com&gt;
Signed-off-by: Marius Storm-Olsen &lt;mstormo@gmail.com&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>Avoid declaration after statement</title>
<updated>2009-09-19T03:00:41Z</updated>
<author>
<name>Frank Li</name>
<email>lznuaa@gmail.com</email>
</author>
<published>2009-09-16T08:20:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=0d30ad71fa094dd89ae31b3381c2e63a41119c76'/>
<id>urn:sha1:0d30ad71fa094dd89ae31b3381c2e63a41119c76</id>
<content type='text'>
MSVC does not understand this C99 style.

Signed-off-by: Frank Li &lt;lznuaa@gmail.com&gt;
Signed-off-by: Marius Storm-Olsen &lt;mstormo@gmail.com&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>Merge branch 'maint-1.6.3' into maint</title>
<updated>2009-08-12T23:15:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-08-12T23:15:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2cd9c2aff0d65bbce704a68d9cbe7a17e02257fe'/>
<id>urn:sha1:2cd9c2aff0d65bbce704a68d9cbe7a17e02257fe</id>
<content type='text'>
* maint-1.6.3:
  Change mentions of "git programs" to "git commands"
  Documentation: merge: one &lt;remote&gt; is required
  help.c: give correct structure's size to memset()
</content>
</entry>
<entry>
<title>Change mentions of "git programs" to "git commands"</title>
<updated>2009-08-12T23:14:41Z</updated>
<author>
<name>Ori Avtalion</name>
<email>ori@avtalion.name</email>
</author>
<published>2009-08-07T14:24:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=57f6ec029090f64377ec5c0926b6e2e39b0caa4f'/>
<id>urn:sha1:57f6ec029090f64377ec5c0926b6e2e39b0caa4f</id>
<content type='text'>
Most of the docs and printouts refer to "commands" when discussing what
the end users call via the "git" top-level program. We should refer them
as "git programs" when we discuss the fact that the commands are
implemented as separate programs, but in other contexts, it is better to
use the term "git commands" consistently.

Signed-off-by: Ori Avtalion &lt;ori@avtalion.name&gt;
Signed-off-by: Nanako Shiraishi &lt;nanako3@lavabit.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
