summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* diff --no-index: support /dev/null as filenameJohannes Schindelin2007-03-041-17/+17
| | | | | | | | This allows us to create "new file" and "delete file" patches. It also cleans up the code. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff-ni: fix the diff with standard inputJunio C Hamano2007-03-042-21/+40
| | | | | | | | | | | | | | The earlier commit to read from stdin was full of problems, and this corrects them. - The mode bits should have been set to satisify S_ISREG(); we forgot to the S_IFREG bits and hardcoded 0644; - We did not give escape hatch to name a path whose name is really "-". Allow users to say "./-" for that; - Use of xread() was not prepared to see short read (e.g. reading from tty) nor handing read errors. Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff: support reading a file from stdin via "-"Johannes Schindelin2007-03-042-5/+31
| | | | | | | | | | | | This allows you to say echo Hello World | git diff x - to compare the contents of file "x" with the line "Hello World". This automatically switches to --no-index mode. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff-ni: allow running from a subdirectory.Junio C Hamano2007-03-041-1/+13
| | | | | | | When run from a subdirectory of a repository, the command forgot to adjust paths given to it with prefix. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'js/diff-ni' (early part)Junio C Hamano2007-03-044-2/+64
|\ | | | | | | | | * 'js/diff-ni' (early part): diff: make more cases implicit --no-index
| * diff: make more cases implicit --no-indexJohannes Schindelin2007-03-014-2/+64
| | | | | | | | | | | | | | | | | | When specifying an absolute path, or a relative path pointing outside the working tree, do not fail, but roll your own diffopt parsing, and execute a --no-index diff. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'maint'Junio C Hamano2007-03-049-12/+37
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Unset NO_C99_FORMAT on Cygwin. Fix a "pointer type missmatch" warning. Fix some "comparison is always true/false" warnings. Fix an "implicit function definition" warning. Fix a "label defined but unreferenced" warning. Document the config variable format.suffix git-merge: fail correctly when we cannot fast forward. builtin-archive: use RUN_SETUP Fix git-gc usage note
| * | Unset NO_C99_FORMAT on Cygwin.Ramsay Jones2007-03-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should only be set based on the capability of your compiler/library to support c99 format specifiers. In this case the version of gcc/newlib and indirectly the version of Cygwin. It should probably only be set in your config.mak file. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix a "pointer type missmatch" warning.Ramsay Jones2007-03-042-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, the second parameter in the call to iconv() will cause this warning if your library declares iconv() with the second (input buffer pointer) parameter of type const char **. This is the old prototype, which is none-the-less used by the current version of newlib on Cygwin. (It appears in old versions of glibc too). Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix some "comparison is always true/false" warnings.Ramsay Jones2007-03-041-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Cygwin the wchar_t type is an unsigned short (16-bit) int. This results in the above warnings from the return statement in the wcwidth() function (in particular, the expressions involving constants with values larger than 0xffff). Simply replace the use of wchar_t with an unsigned int, typedef-ed as ucs_char_t. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix an "implicit function definition" warning.Ramsay Jones2007-03-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The function at issue being initgroups() from the <grp.h> header file. On Cygwin, setting _XOPEN_SOURCE suppresses the definition of initgroups(), which causes the warning while compiling daemon.c. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix a "label defined but unreferenced" warning.Ramsay Jones2007-03-041-0/+2
| | | | | | | | | | | | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Document the config variable format.suffixJohannes Schindelin2007-03-041-0/+5
| | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-merge: fail correctly when we cannot fast forward.Junio C Hamano2007-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we cannot fast forward the working tree and the current branch, git-merge did not exit with non-zero status. Noticed by Larry Streepy, the section to be fixed identfied by Johannes Schindelin. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | builtin-archive: use RUN_SETUPJohannes Schindelin2007-03-032-3/+1
| | | | | | | | | | | | | | | | | | | | | It used to roll its own setup. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Fix git-gc usage noteMatthias Kestenholz2007-03-031-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'maint'Junio C Hamano2007-03-031-1/+1
|\| | | | | | | | | | | | | | * maint: Fix quoting in update hook template
| * | Fix quoting in update hook templateGerrit Pape2007-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | By default allowunannotated is unset in the repo config, hence $allowunannotated is empty, and must be quoted to not break the syntax. Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | git-branch: document new --no-abbrev optionJulian Phillips2007-03-031-1/+5
| | | | | | | | | | | | | | | | | | | | | Add the new --no-abbrev option to the man page for the git-branch command. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | git-branch: improve abbreviation of sha1s in verbose modeJulian Phillips2007-03-031-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-branch has an --abbrev= command line option, but it does no checking of the input. Take the argument parsing code from setup_revisions in revisions.c, and also the code for parsing the --no-abbrev option. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | print_wrapped_text: fix output for negative indentJohannes Schindelin2007-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | When providing a negative indent, it means that -indent columns were already printed. Fix a bug where the function ate the first character if already the first word did not fit into the first line. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Sample update hook: typofix and modernization to use "git log"Andy Parkins2007-03-031-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using antiquated "git-rev-parse | git-rev-list" pipeline, it is easier to use "git-rev-list" or "git-log" these days, as Linus points out. While we are at it, fix the typo on variable name $newref that should be $newrev. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'js/commit-format'Junio C Hamano2007-03-028-16/+268
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * js/commit-format: show_date(): rename the "relative" parameter to "mode" Actually make print_wrapped_text() useful pretty-formats: add 'format:<string>'
| * | | show_date(): rename the "relative" parameter to "mode"Johannes Schindelin2007-02-282-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, show_date() can print three different kinds of dates: normal, relative and short (%Y-%m-%s) dates. To achieve this, the "int relative" was changed to "enum date_mode mode", which has three states: DATE_NORMAL, DATE_RELATIVE and DATE_SHORT. Since existing users of show_date() only call it with relative_date being either 0 or 1, and DATE_NORMAL and DATE_RELATIVE having these values, no behaviour is changed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Actually make print_wrapped_text() usefulJohannes Schindelin2007-02-282-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, it returns the current column, does not add a newline, and you can pass a negative indent, to indicate that the indent was already printed. With this, you can actually continue in the middle of a paragraph, not having to print everything into a buffer first. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | pretty-formats: add 'format:<string>'Johannes Schindelin2007-02-234-1/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, $ git show -s \ --pretty=format:' Ze komit %h woss%n dunn buy ze great %an' shows something like Ze komit 04c5c88 woss dunn buy ze great Junio C Hamano The supported placeholders are: '%H': commit hash '%h': abbreviated commit hash '%T': tree hash '%t': abbreviated tree hash '%P': parent hashes '%p': abbreviated parent hashes '%an': author name '%ae': author email '%ad': author date '%aD': author date, RFC2822 style '%ar': author date, relative '%at': author date, UNIX timestamp '%cn': committer name '%ce': committer email '%cd': committer date '%cD': committer date, RFC2822 style '%cr': committer date, relative '%ct': committer date, UNIX timestamp '%e': encoding '%s': subject '%b': body '%Cred': switch color to red '%Cgreen': switch color to green '%Cblue': switch color to blue '%Creset': reset color '%n': newline Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'maint'Junio C Hamano2007-03-026-20/+20
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Another memory overrun in http-push.c fetch.o depends on the headers, too. Documentation: Correct minor typo in git-add documentation. Documentation/git-send-email.txt: Fix labeled list formatting Documentation/git-quiltimport.txt: Fix labeled list formatting Documentation/build-docdep.perl: Fix dependencies for included asciidoc files
| * | | Another memory overrun in http-push.cEygene Ryabinkin2007-03-021-3/+7
| | | | | | | | | | | | | | | | | | | | Use of strlcpy() are wrong, as the source buffer at these locations may not be NUL-terminated.
| * | | fetch.o depends on the headers, too.Johannes Schindelin2007-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Documentation: Correct minor typo in git-add documentation.Christian Schlotter2007-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Christian Schlotter <schlotter@users.sourceforge.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Documentation/git-send-email.txt: Fix labeled list formattingSergey Vlasov2007-03-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark continuation paragraphs of list entries as such to avoid getting literal paragraphs instead. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Documentation/git-quiltimport.txt: Fix labeled list formattingSergey Vlasov2007-03-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark the continuation paragraph of a list entry as such to avoid getting a literal paragraph instead. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Documentation/build-docdep.perl: Fix dependencies for included asciidoc filesSergey Vlasov2007-03-011-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding dependencies on included files to the generated man pages is wrong - includes are processed by asciidoc, therefore the intermediate Docbook XML files really depend on included files. Because of these wrong dependencies the man pages were not rebuilt properly if the intermediate XML files were left in the tree. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Documentation/git-svn.txt: Fix formatting errorsSergey Vlasov2007-03-011-52/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix some formatting problems: - Some list labels were missing their "::" characters. - Some of continuation paragraphs in labeled lists were incorrectly formatted as literal paragraphs. - In one case "[verse]" was missing before the config key list. - The "Basic Examples" section was incorrectly nested inside the "Config File-Only Options" section. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | fix various doc typosMichael Coleman2007-03-013-6/+6
| |_|/ |/| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Add recent changes to draft 1.5.1 release notes.Junio C Hamano2007-03-011-1/+64
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'js/commit-by-name'Junio C Hamano2007-02-282-0/+65
|\ \ \ | | | | | | | | | | | | | | | | * js/commit-by-name: object name: introduce ':/<oneline prefix>' notation
| * | | object name: introduce ':/<oneline prefix>' notationJohannes Schindelin2007-02-242-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To name a commit, you can now say $ git rev-parse ':/Initial revision of "git"' and it will return the hash of the youngest commit whose commit message (the oneline) begins with the given prefix. For future extension, a leading exclamation mark is treated specially: if you want to match a commit message starting with a '!', just repeat the exclamation mark. So, to match a commit which starts with '!Hello World', use $ git show ':/!!Hello World' Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'js/bundle'Junio C Hamano2007-02-2812-4/+611
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/bundle: bundle: reword missing prerequisite error message git-bundle: record commit summary in the prerequisite data git-bundle: fix 'create --all' git-bundle: avoid fork() in verify_bundle() git-bundle: assorted fixes Add git-bundle: move objects and references by archive
| * | | | bundle: reword missing prerequisite error messageJunio C Hamano2007-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As suggested by Mark Levedahl. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | git-bundle: record commit summary in the prerequisite dataJohannes Schindelin2007-02-231-3/+4
| | | | |
| * | | | git-bundle: fix 'create --all'Johannes Schindelin2007-02-231-1/+1
| | | | |
| * | | | git-bundle: avoid fork() in verify_bundle()Johannes Schindelin2007-02-231-27/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use the revision walker easily for checking if the prerequisites are met, instead of fork()ing off a rev-list, which would list only the first unmet prerequisite. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | git-bundle: assorted fixesJohannes Schindelin2007-02-232-49/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes issues mentioned by Junio, Nico and Simon: - I forgot to convert the usage string when removing the "--" from the subcommands, - a style fix in the bundle_header, - use xread() instead of read(), - use write_or_die() instead of write(), - make the bundle header extensible, - fail if the whitespace after a sha1 of a reference is missing, - close() the fds passed to a subprocess, - in verify_bundle(), do not use "rev-list --stdin", but rather pass the revs directly (avoiding a fork()), - fix a corrupted comment in show_object(), and - fix the size check in index_pack. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Add git-bundle: move objects and references by archiveJohannes Schindelin2007-02-2311-4/+575
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some workflows require use of repositories on machines that cannot be connected, preventing use of git-fetch / git-push to transport objects and references between the repositories. git-bundle provides an alternate transport mechanism, effectively allowing git-fetch and git-pull to operate using sneakernet transport. `git-bundle create` allows the user to create a bundle containing one or more branches or tags, but with specified basis assumed to exist on the target repository. At the receiving end, git-bundle acts like git-fetch-pack, allowing the user to invoke git-fetch or git-pull using the bundle file as the URL. git-fetch and git-ls-remote determine they have a bundle URL by checking that the URL points to a file, but are otherwise unchanged in operation with bundles. The original patch was done by Mark Levedahl <mdl123@verizon.net>. It was updated to make git-bundle a builtin, and get rid of the tar format: now, the first line is supposed to say "# v2 git bundle", the next lines either contain a prerequisite ("-" followed by the hash of the needed commit), or a ref (the hash of a commit, followed by the name of the ref), and finally the pack. As a result, the bundle argument can be "-" now. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'maint'Junio C Hamano2007-02-287-15/+106
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Start preparing Release Notes for 1.5.0.3 Documentation: git-remote add [-t <branch>] [-m <branch>] [-f] name url Include config.mak in doc/Makefile git.el: Set the default commit coding system from the repository config. git-archimport: support empty summaries, put summary on a single line. http-push.c::lock_remote(): validate all remote refs. git-cvsexportcommit: don't cleanup .msg if not yet committed to cvs.
| * | | Start preparing Release Notes for 1.5.0.3Junio C Hamano2007-02-282-1/+56
| | | |
| * | | Documentation: git-remote add [-t <branch>] [-m <branch>] [-f] name urlJunio C Hamano2007-02-281-3/+14
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Include config.mak in doc/MakefileUwe Kleine-König2007-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config.mak.autogen is already there. Without this change it is not possible to override mandir in config.mak. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git.el: Set the default commit coding system from the repository config.Alexandre Julliard2007-02-281-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If not otherwise specified, take the default coding system for commits from the 'i18n.commitencoding' repository configuration value. Also set the buffer-file-coding-system variable in the log buffer to make the selected coding system visible on the modeline. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>