aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge branch 'j6t/mingw'Junio C Hamano2008-07-02
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * j6t/mingw: (38 commits) compat/pread.c: Add a forward declaration to fix a warning Windows: Fix ntohl() related warnings about printf formatting Windows: TMP and TEMP environment variables specify a temporary directory. Windows: Make 'git help -a' work. Windows: Work around an oddity when a pipe with no reader is written to. Windows: Make the pager work. When installing, be prepared that template_dir may be relative. Windows: Use a relative default template_dir and ETC_GITCONFIG Windows: Compute the fallback for exec_path from the program invocation. Turn builtin_exec_path into a function. Windows: Use a customized struct stat that also has the st_blocks member. Windows: Add a custom implementation for utime(). Windows: Add a new lstat and fstat implementation based on Win32 API. Windows: Implement a custom spawnve(). Windows: Implement wrappers for gethostbyname(), socket(), and connect(). Windows: Work around incompatible sort and find. Windows: Implement asynchronous functions as threads. Windows: Disambiguate DOS style paths from SSH URLs. Windows: A rudimentary poll() emulation. Windows: Implement start_command(). ...
| * compat/pread.c: Add a forward declaration to fix a warningSteffen Prohaska2008-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_in_full()'s is used in compat/pread.c. read_in_full() is declared in cache.h. But we can't include cache.h because too many macros are defined there. Using read_in_full() without including cache.h is dangerous because we wouldn't recognize if its prototyp changed. gcc issues a warning about that. This commit adds a forward declaration to git-compat-util.h. git-compat-util.h is included by compat/pread.c _and_ cache.h. Hence, changes in cache.h would be detected. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Fix ntohl() related warnings about printf formattingSteffen Prohaska2008-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, ntohl() returns unsigned long. On Unix it returns uint32_t. This makes choosing a suitable printf format string hard. This commit introduces a mingw specific helper function git_ntohl() that casts to unsigned int before returning. This makes gcc's printf format check happy. It should be safe because we expect ntohl to use 32-bit numbers. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: TMP and TEMP environment variables specify a temporary directory.Johannes Sixt2008-06-26
| | | | | | | | Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Make 'git help -a' work.Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git help -a scans the PATH for git commands. On Windows it failed for two reasons: - The PATH separator is ';', not ':' on Windows. - stat() does not set the executable bit. We now open the file and guess whether it is executable. The result of the guess is good enough for the list of git commands, but it is of no use for a general stat() implementation because (1) it is a guess, (2) the user has no way to influence the outcome (via chmod or similar), and (3) it would reduce stat() performance by an unacceptable amount. Therefore, this strategy is a special-case local to help.c. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Work around an oddity when a pipe with no reader is written to.Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | | | On Windows, write() is implemented using WriteFile(). After the reader closed its end of the pipe, the first WriteFile() returns ERROR_BROKEN_PIPE (which translates to EPIPE), subsequent WriteFile()s return ERROR_NO_DATA, which is translated to EINVAL. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Make the pager work.Johannes Sixt2008-06-26
| | | | | | | | | | | | | | Since we have neither fork() nor exec(), we have to spawn the pager and feed it with the program's output. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * When installing, be prepared that template_dir may be relative.Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | | | Since the Makefile in the template/ subdirectory is only used to install the templates, we do not simply pass down the setting of template_dir when it is relative, but construct the intended destination in a new variable: A relative template_dir is relative to gitexecdir. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Use a relative default template_dir and ETC_GITCONFIGJohannes Sixt2008-06-26
| | | | | | | | | | | | | | With this definition the templates and system config file will be found irrespective of the installation location. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Compute the fallback for exec_path from the program invocation.Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | Since on Windows the user is fairly free where to install programs, we cannot rely on a hard-coded path. We use the program name to derive the installation directory and use that as exec_path. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Turn builtin_exec_path into a function.Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | | | builtin_exec_path returns the hard-coded installation path, which is used as the ultimate fallback to look for git commands. Making it into a function enables us in a follow-up patch to return a computed value instead of just a constant string. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Use a customized struct stat that also has the st_blocks member.Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | | | | | Windows's struct stat does not have a st_blocks member. Since we already have our own stat/lstat/fstat implementations, we can just as well use a customized struct stat. This patch introduces just that, and also fills in the st_blocks member. On the other hand, we don't provide members that are never used. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Add a custom implementation for utime().Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | | | | | This is a necessary pendant to our lstat implementation: MSVCRT's implementations of lstat and utime do some adjustments if daylight saving time is in effect, but our lstat implementation doesn't do these adjustments and report the correct UTC time. With this implementation we omit the adjustments in utime() as well and always write UTC. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Add a new lstat and fstat implementation based on Win32 API.Marius Storm-Olsen2008-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives us a significant speedup when adding, committing and stat'ing files. Also, since Windows doesn't really handle symlinks, we let stat just uses lstat. We also need to replace fstat, since our implementation and the standard stat() functions report slightly different timestamps, possibly due to timezones. We simply report UTC in our implementation, and do our FILETIME to time_t conversion based on the document at http://support.microsoft.com/kb/167296. With Moe's repo structure (100K files in 100 dirs, containing 2-4 bytes) mkdir bummer && cd bummer; for ((i=0;i<100;i++)); do mkdir $i && pushd $i; for ((j=0;j<1000;j++)); do echo "$j" >$j; done; popd; done We get the following performance boost: With normal lstat & stat Custom lstat/fstat ------------------------ ------------------------ Command: git init Command: git init ------------------------ ------------------------ real 0m 0.047s real 0m 0.063s user 0m 0.031s user 0m 0.015s sys 0m 0.000s sys 0m 0.015s ------------------------ ------------------------ Command: git add . Command: git add . ------------------------ ------------------------ real 0m19.390s real 0m12.031s 1.6x user 0m 0.015s user 0m 0.031s sys 0m 0.030s sys 0m 0.000s ------------------------ ------------------------ Command: git commit -a.. Command: git commit -a.. ------------------------ ------------------------ real 0m30.812s real 0m16.875s 1.8x user 0m 0.015s user 0m 0.015s sys 0m 0.000s sys 0m 0.015s ------------------------ ------------------------ 3x Command: git-status 3x Command: git-status ------------------------ ------------------------ real 0m11.860s real 0m 5.266s 2.2x user 0m 0.015s user 0m 0.015s sys 0m 0.015s sys 0m 0.015s real 0m11.703s real 0m 5.234s user 0m 0.015s user 0m 0.015s sys 0m 0.000s sys 0m 0.000s real 0m11.672s real 0m 5.250s user 0m 0.031s user 0m 0.015s sys 0m 0.000s sys 0m 0.000s ------------------------ ------------------------ Command: git commit... Command: git commit... (single file) (single file) ------------------------ ------------------------ real 0m14.234s real 0m 7.735s 1.8x user 0m 0.015s user 0m 0.031s sys 0m 0.000s sys 0m 0.000s Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Implement a custom spawnve().Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem with Windows's own implementation is that it tries to be clever when a console program is invoked from a GUI application: In this case it sometimes automatically allocates a new console window. As a consequence, the IO channels of the spawned program are directed to the console, but the invoking application listens on channels that are now directed to nowhere. In this implementation we use the lowlevel facilities of CreateProcess(), which offers a flag to tell the system not to open a console. As a side effect, only stdin, stdout, and stderr channels will be accessible from C programs that are spawned. Other channels (file handles, pipe handles, etc.) are still inherited by the spawned program, but it doesn't get enough information to access them. Johannes Schindelin integrated path quoting and unified the various *execv* and *spawnv* helpers. Eric Raible suggested to also quote '{'. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Implement wrappers for gethostbyname(), socket(), and connect().Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gethostbyname() is the first function that calls into the Winsock library, and it is wrapped only to initialize the library. socket() is wrapped for two reasons: - Windows's socket() creates things that are like low-level file handles, and they must be converted into file descriptors first. - And these handles cannot be used with plain ReadFile()/WriteFile() because they are opened for "overlapped IO". We have to use WSASocket() to create non-overlapped IO sockets. connect() must be wrapped because Windows's connect() expects the low-level sockets, not file descriptors, and we must first unwrap the file descriptor before we can pass it on to Windows's connect(). Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Work around incompatible sort and find.Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | | | If the PATH lists the Windows system directories before the MSYS directories, Windows's own incompatible sort and find commands would be picked up. We implement these commands as functions and call the real tools by absolute path. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Implement asynchronous functions as threads.Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | In upload-pack we must explicitly close the output channel of rev-list. (On Unix, the channel is closed automatically because process that runs rev-list terminates.) Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Disambiguate DOS style paths from SSH URLs.Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | If on Windows a path is specified as C:/path, then this is also a valid SSH URL. To disambiguate between the two interpretations we take an URL that looks like a path with a drive letter as a local URL. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: A rudimentary poll() emulation.Johannes Sixt2008-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This emulation of poll() is by far not general. It assumes that the fds that are to be waited for are connected to pipes. The pipes are polled in a loop until data becomes available in at least one of them. If only a single fd is waited for, the implementation actually does not wait at all, but assumes that a subsequent read() will block. In order not to needlessly burn CPU time, the CPU is yielded to other processes before the next round in the poll loop using Sleep(0). Note that any sleep timeout greater than zero will reduce the efficiency by a magnitude. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Implement start_command().Johannes Sixt2008-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, we have spawnv() variants to run a child process instead of fork()/exec(). In order to attach pipe ends to stdin, stdout, and stderr, we have to use this idiom: save1 = dup(1); dup2(pipe[1], 1); spawnv(); dup2(save1, 1); close(pipe[1]); assuming that the descriptors created by pipe() are not inheritable. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: A pipe() replacement whose ends are not inherited to children.Johannes Sixt2008-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Unix the idiom to use a pipe is as follows: pipe(fd); pid = fork(); if (!pid) { dup2(fd[1], 1); close(fd[1]); close(fd[0]); ... } close(fd[1]); i.e. the child process closes the both pipe ends after duplicating one to the file descriptors where they are needed. On Windows, which does not have fork(), we never have an opportunity to (1) duplicate a pipe end in the child, (2) close unused pipe ends. Instead, we must use this idiom: save1 = dup(1); pipe(fd); dup2(fd[1], 1); spawn(...); dup2(save1, 1); close(fd[1]); i.e. save away the descriptor at the destination slot, replace by the pipe end, spawn process, restore the saved file. But there is a problem: Notice that the child did not only inherit the dup2()ed descriptor, but also *both* original pipe ends. Although the one end that was dup()ed could be closed before the spawn(), we cannot close the other end - the child inherits it, no matter what. The solution is to generate non-inheritable pipes. At the first glance, this looks strange: The purpose of pipes is usually to be inherited to child processes. But notice that in the course of actions as outlined above, the pipe descriptor that we want to inherit to the child is dup2()ed, and as it so happens, Windows's dup2() creates inheritable duplicates. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Wrap execve so that shell scripts can be invoked.Johannes Sixt2008-06-23
| | | | | | | | | | | | | | | | | | | | | | | | When an external git command is invoked, it can be a Bourne shell script. This patch looks into the command file to see whether it is one. In this case, the command line is rearranged to invoke the shell with the proper arguments. With this change, scripted git commands work. Command line arguments to those scripts cannot be complex (contain spaces or double-quotes), yet. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Implement setitimer() and sigaction().Johannes Sixt2008-06-23
| | | | | | | | | | | | | | | | | | | | The timer is implemented using a thread that calls the signal handler at regular intervals. We also replace Windows's signal() function because we must intercept that SIGALRM is set (which is used when a timer is canceled). Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Fix PRIuMAX definition.Johannes Sixt2008-06-23
| | | | | | | | | | | | | | | | Since GIT calls into Microsoft's MSVCRT.DLL, it must use the printf format that this DLL uses for 64-bit integers, which is %I64u instead of %llu. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Implement gettimeofday().Johannes Sixt2008-06-23
| | | | | | | | Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Make my_mktime() public and rename it to tm_to_time_t()Johannes Sixt2008-06-23
| | | | | | | | | | | | We will use it from the MinGW port's gettimeofday() substitution. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Work around misbehaved rename().Johannes Sixt2008-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Windows's rename() is based on the MoveFile() API, which fails if the destination exists. Here we work around the problem by using MoveFileEx(). Furthermore, the posixly correct error is returned if the destination is a directory. The implementation is still slightly incomplete, however, because of the missing error code translation: We assume that the failure is due to permissions. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: always chmod(, 0666) before unlink().Johannes Schindelin2008-06-23
| | | | | | | | | | | | | | | | | | On Windows, read-only files cannot be deleted. To make sure that deletion does not fail because of this, always call chmod() before unlink(). Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: A minimal implemention of getpwuid().Johannes Sixt2008-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | getpwuid() is implemented just enough that GIT does not issue errors. Since the information that it returns is not very useful, users are required to set up user.name and user.email configuration. All uses of getpwuid() are like getpwuid(getuid()), hence, the return value of getuid() is irrelevant and the uid parameter is not even looked at. Side note: getpwnam() is only used to resolve '~' and '~username' paths, which is an idiom not known on Windows, hence, we don't implement it. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Implement a wrapper of the open() function.Johannes Sixt2008-06-23
| | | | | | | | | | | | | | | | | | The wrapper does two things: - Requests to open /dev/null are redirected to open the nul pseudo file. - A request to open a file that currently exists as a directory on Windows fails with EACCES; this is changed to EISDIR. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Strip ".exe" from the program name.Johannes Sixt2008-06-23
| | | | | | | | | | | | | | | | | | | | Before we can successfully parse a builtin command from the program name we must strip off unneeded parts, that is, the file extension. Furthermore, we must take Windows style path names into account when we parse the program name. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Handle absolute paths in safe_create_leading_directories().Johannes Sixt2008-06-23
| | | | | | | | | | | | | | In this function we must be careful to handle drive-local paths else there is a danger that it runs into an infinite loop. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Treat Windows style path names.Johannes Sixt2008-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GIT's guts work with a forward slash as a path separators. We do not change that. Rather we make sure that only "normalized" paths enter the depths of the machinery. We have to translate backslashes to forward slashes in the prefix and in command line arguments. Fortunately, all of them are passed through functions in setup.c. A macro has_dos_drive_path() is defined that checks whether a path begins with a drive letter+colon combination. This predicate is always false on Unix. Another macro is_dir_sep() abstracts that a backslash is also a directory separator on Windows. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * setup.c: Prepare for Windows directory separators.Johannes Sixt2008-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This turns two switch/case statements into an if-else-if cascade because we later do not want to have case '/': #ifdef __MINGW32__ case '\\': #endif but use a predicate is_dir_sep(foo) in order to check for the directory separator. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Windows: Use the Windows style PATH separator ';'.Johannes Sixt2008-06-22
| | | | | | | | Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Add target architecture MinGW.Johannes Sixt2008-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change GIT can be compiled and linked using MinGW. Builtins that only read the repository such as the log family and grep already work. Simple stubs are provided for a number of functions that the Windows C runtime does not offer. They will be completed in later patches. However, a fix for the snprintf/vsnprintf replacement is applied here to avoid buffer overflows. Dmitry Kakurin pointed out that access(..., X_OK) would always fails on Vista and suggested the -D__USE_MINGW_ACCESS workaround. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Compile some programs only conditionally.Johannes Sixt2008-06-22
| | | | | | | | | | | | | | These programs depend on difficult to emulate POSIX functionality. On Windows, we won't compile them. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
| * Add compat/regex.[ch] and compat/fnmatch.[ch].Johannes Sixt2008-06-22
| | | | | | | | | | | | | | | | | | | | | | | | We don't have fnmatch and regular expressions on Windows. We borrow fnmatch.[ch] from the GNU C library (license is LGPL 2 or later) and GNU regexp (regexp.c[ch], license is GPL 2 or later). Note that regexp.c was changed slightly to avoid warnings with gcc. We make the addition of these files an extra commit so as not to clutter the next commits. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
* | Merge branch 'maint'Junio C Hamano2008-07-02
|\ \ | | | | | | | | | | | | * maint: Fix describe --tags --long so it does not segfault
| * \ Merge branch 'js/maint-clone-insteadof' into maintJunio C Hamano2008-07-02
| |\ \ | | | | | | | | | | | | | | | | | | | | * js/maint-clone-insteadof: clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig clone: respect url.insteadOf setting in global configs
| * \ \ Merge branch 'jk/maint-fetch-ref-hier' into maintJunio C Hamano2008-07-02
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * jk/maint-fetch-ref-hier: fetch: give a hint to the user when local refs fail to update fetch: report local storage errors in status table
| * \ \ \ Merge branch 'jc/maint-reset' into maintJunio C Hamano2008-07-02
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/maint-reset: Allow "git-reset path" when unambiguous
| * | | | | Fix describe --tags --long so it does not segfaultShawn O. Pearce2008-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we match a lightweight (non-annotated tag) as the name to output and --long was requested we do not have a tag, nor do we have a tagged object to display. Instead we must use the object we were passed as input for the long format display. Reported-by: Mark Burton <markb@ordern.com> Backtraced-by: Mikael Magnusson <mikachu@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git fetch-pack: do not complain about "no common commits" in an empty repoJohannes Schindelin2008-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the repo is empty, it is obvious that there are no common commits when fetching from _anywhere_. So there is no use in saying it in that case, and it can even be annoying. Therefore suppress the message unilaterally if the repository is empty prior to the fetch. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Documentation: Point to gitcli(7) from git(1)Brian Gernhardt2008-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Update draft release notes for 1.6.0Junio C Hamano2008-07-01
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | gitcli: Document meaning of --cached and --indexNanako Shiraishi2008-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We saw this explanation repeated on the mailing list a few times. Even though the description of individual options to particular commands are explained in their manual pages, the reason behind choosing which is which has not been clearly explained in any of the documentation. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Documentation formatting and cleanupJonathan Nieder2008-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following what appears to be the predominant style, format names of commands and commandlines both as `teletype text`. While we're at it, add articles ("a" and "the") in some places, italicize the name of the command in the manual page synopsis line, and add a comma or two where it seems appropriate. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Documentation: be consistent about "git-" versus "git "Jonathan Nieder2008-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the git-* commands are not installed in $(bindir), using "git-command <parameters>" in examples in the documentation is not a good idea. On the other hand, it is nice to be able to refer to each command using one hyphenated word. (There is no escaping it, anyway: man page names cannot have spaces in them.) This patch retains the dash in naming an operation, command, program, process, or action. Complete command lines that can be entered at a shell (i.e., without options omitted) are made to use the dashless form. The changes consist only of replacing some spaces with hyphens and vice versa. After a "s/ /-/g", the unpatched and patched versions are identical. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>