aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* git-push.txt: Describe --repo option in more detailJohannes Sixt2008-10-08
| | | | | | | | | | | The --repo option was described in a way that the reader would have to assume that it is the same as the <repository> parameter. But it actually servers a purpose, which is now written down. Furthermore, the --mirror option was missing from the synopsis. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* git rm: refresh index before up-to-date checkJohannes Schindelin2008-10-08
| | | | | | | | Since "git rm" is supposed to be porcelain, we should convince it to be user friendly by refreshing the index itself. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Fix a few typos in relnotesMikael Magnusson2008-10-07
| | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Update release notes for 1.6.0.3Shawn O. Pearce2008-10-06
| | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Teach rebase -i to honor pre-rebase hookNanako Shiraishi2008-10-06
| | | | | | | | | The original git-rebase honored pre-rebase hook so that public branches can be protected from getting rebased, but rebase --interactive ignored the hook entirely. This fixes it. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* docs: describe pre-rebase hookNanako Shiraishi2008-10-06
| | | | | | | | | Documentation/git-rebase.txt talks about pre-rebase hook, but it appears that Documentation/git-hooks.txt does not have corresponding entry for it. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* do not segfault if make_cache_entry failedDmitry Potapov2008-10-06
| | | | | Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* make prefix_path() never return NULLDmitry Potapov2008-10-06
| | | | | | | | | | | | | | | | There are 9 places where prefix_path is called, and only in one of them the returned pointer was checked to be non-zero and only to call exit(128) as it is usually done by die(). In other 8 places, the returned value was not checked and it caused SIGSEGV when a path outside of the working tree was used. For instance, running git update-index --add /some/path/outside caused SIGSEGV. This patch changes prefix_path() to die if the path is outside of the repository, so it never returns NULL. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* fix bogus "diff --git" header from "diff --no-index"Linus Torvalds2008-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When "git diff --no-index" is given an absolute pathname, it would generate a diff header with the absolute path prepended by the prefix, like: diff --git a/dev/null b/foo Not only is this nonsensical, and not only does it violate the description of diffs given in git-diff(1), but it would produce broken binary diffs. Unlike text diffs, the binary diffs don't contain the filenames anywhere else, and so "git apply" relies on this header to figure out the filename. This patch just refuses to use an invalid name for anything visible in the diff. Now, this fixes the "git diff --no-index --binary a /dev/null" kind of case (and we'll end up using "a" as the basename), but some other insane cases are impossible to handle. If you do git diff --no-index --binary a /bin/echo you'll still get a patch like diff --git a/a b/bin/echo old mode 100644 new mode 100755 index ... and "git apply" will refuse to apply it for a couple of reasons, and the diff is simply bogus. And that, btw, is no longer a bug, I think. It's impossible to know whethe the user meant for the patch to be a rename or not. And as such, refusing to apply it because you don't know what name you should use is probably _exactly_ the right thing to do! Original problem reported by Imre Deak. Test script and problem description by Jeff King. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Fix fetch/clone --quiet when stdout is connectedTuncer Ayaz2008-10-06
| | | | | | | | | | | | | | | | Fixes the `git clone --quiet` issue raised by Dave Jones in http://marc.info/?l=git&m=121529226023180&w=2 With this simple patch applied we no longer see the following remote messages as no-progress is correctly sent to the remote site: remote: Counting objects: 84102, done. remote: Compressing objects: 100% (24720/24720), done. remote: Total 84102 (delta 60949), reused 80810 (delta 57900) Signed-off-by: Tuncer Ayaz <tuncer.ayaz@gmail.com> Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* builtin-blame: Fix blame -C -C with submodules.Alexander Gavrilov2008-10-05
| | | | | | | | | | When performing copy detection, git-blame tries to read gitlinks as blobs, which causes it to die. This patch adds a check to skip them. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* bash: remove fetch, push, pull dashed form leftoversSZEDER Gábor2008-10-05
| | | | | | | | | We don't provide complation for git-commands in dashed form anymore, so there is no need to keep those cases. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Tested-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* gitweb: Add path_info tests to t/t9500-gitweb-standalone-no-errors.shJakub Narebski2008-10-02
| | | | | | | | | | Note that those tests only check that there are no errors nor warnings from Perl; they do not check for example if gitweb doesn't use ARRAY(0x8e3cc20) instead of correct value in links, etc. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* gitweb: Fix two 'uninitialized value' warnings in git_tree()Jakub Narebski2008-10-02
| | | | | | | | | | | | | | | | | | | | If we did try to access nonexistent directory or file, which means that git_get_hash_by_path() returns `undef`, uninitialized $hash variable was passed to 'open' call. Now we fail early with "404 Not Found - No such tree" error. (If we try to access something which does not resolve to tree-ish, for example a file / 'blob' object, the error will be caught later, as "404 Not Found - Reading tree failed" error). If we tried to use 'tree' action without $file_name ('f' parameter) set, which means either tree given by hash or a top tree (and we currently cannot distinguish between those two cases), we cannot print path breadcrumbs with git_print_page_path(). Fix this by moving call to git_print_page_path() inside conditional. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Solaris: Use OLD_ICONV to avoid compile warningsDavid Soria Parra2008-10-02
| | | | | | | | | | Solaris systems use the old styled iconv(3) call and therefore the OLD_ICONV variable should be set. Otherwise we get annoying compile warnings. Signed-off-by: David Soria Parra <dsp@php.net> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* gitweb: remove PATH_INFO from $my_url and $my_uriGiuseppe Bilotta2008-10-02
| | | | | | | | | | | This patch fixes PATH_INFO handling by removing the relevant part from $my_url and $my_uri, thus making it unnecessary to specify them by hand in the gitweb configuration. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Acked-by: Jakub Narebski <jnareb@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Improve git-log documentation wrt file filtersmartin f. krafft2008-10-01
| | | | | | | | | | | | The need for "--" in the git-log synopsis was previously unclear and confusing. This patch makes it a little clearer. Thanks to hyy <yiyihu@gmail.com> for his help. [sp: Changed -- to \-- per prior commit e1ccf53.] Signed-off-by: martin f. krafft <madduck@madduck.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Documentation: remove '\' in front of short optionsSZEDER Gábor2008-10-01
| | | | | | | | | | | ... because they show up in the man and html outputs. This escaping is only needed for double dashes to be compatible with older asciidoc versions; see commit e1ccf53 ([PATCH] Escape asciidoc's built-in em-dash replacement, 2005-09-12). Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* git-svn: call 'fatal' correctly in set-treeLuc Heinrich2008-09-30
| | | | | | | When doing a set-tree and there is no revision to commit to, the following unrelated error message is displayed: "Undefined subroutine &Git::SVN::fatal called at /opt/local/libexec/git-core/git-svn line 2575." The following patch fixes the problem and allows the real error message to be shown. Signed-off-by: Luc Heinrich <luc@honk-honk.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Replace svn.foo.org with svn.example.com in git-svn docs (RFC 2606)Michael Prokop2008-09-30
| | | | | | | | foo.org is an existing domain, use RFC 2606 complying example.com instead as used in other docs as well. Signed-off-by: Michael Prokop <mika@grml.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* t0024: add executable permissionSZEDER Gábor2008-09-30
| | | | | Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Merge branch 'bc/maint-diff-hunk-header-fix' into maintShawn O. Pearce2008-09-29
|\ | | | | | | | | | | | | | | | | | | | | | | | | * bc/maint-diff-hunk-header-fix: t4018-diff-funcname: test syntax of builtin xfuncname patterns diff hunk pattern: fix misconverted "\{" tex macro introducers diff: use extended regexp to find hunk headers diff.*.xfuncname which uses "extended" regex's for hunk header selection diff.c: associate a flag with each pattern and use it for compiling regex diff.c: return pattern entry pointer rather than just the hunk header pattern Conflicts: Documentation/gitattributes.txt
| * t4018-diff-funcname: test syntax of builtin xfuncname patternsBrandon Casey2008-09-22
| | | | | | | | | | Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * diff hunk pattern: fix misconverted "\{" tex macro introducersJunio C Hamano2008-09-20
| | | | | | | | | | | | Pointed out by Brandon Casey. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * diff: use extended regexp to find hunk headersJunio C Hamano2008-09-19
| | | | | | | | | | | | | | Using ERE elements such as "|" (alternation) by backquoting in BRE is a GNU extension and should not be done in portable programs. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * diff.*.xfuncname which uses "extended" regex's for hunk header selectionBrandon Casey2008-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the hunk headers produced by 'diff -p' are customizable by setting the diff.*.funcname option in the config file. The 'funcname' option takes a basic regular expression. This functionality was designed using the GNU regex library which, by default, allows using backslashed versions of some extended regular expression operators, even in Basic Regular Expression mode. For example, the following characters, when backslashed, are interpreted according to the extended regular expression rules: ?, +, and |. As such, the builtin funcname patterns were created using some extended regular expression operators. Other platforms which adhere more strictly to the POSIX spec do not interpret the backslashed extended RE operators in Basic Regular Expression mode. This causes the pattern matching for the builtin funcname patterns to fail on those platforms. Introduce a new option 'xfuncname' which uses extended regular expressions, and advertise it _instead_ of funcname. Since most users are on GNU platforms, the majority of funcname patterns are created and tested there. Advertising only xfuncname should help to avoid the creation of non-portable patterns which work with GNU regex but not elsewhere. Additionally, the extended regular expressions may be less ugly and complicated compared to the basic RE since many common special operators do not need to be backslashed. For example, the GNU Basic RE: ^[ ]*\\(\\(public\\|static\\).*\\)$ becomes the following Extended RE: ^[ ]*((public|static).*)$ Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * diff.c: associate a flag with each pattern and use it for compiling regexBrandon Casey2008-09-18
| | | | | | | | | | | | | | This is in preparation for allowing extended regular expression patterns. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * diff.c: return pattern entry pointer rather than just the hunk header patternBrandon Casey2008-09-18
| | | | | | | | | | | | | | | | | | This is in preparation for associating a flag with each pattern which will control how the pattern is interpreted. For example, as a basic or extended regular expression. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'mg/maint-remote-fix' into maintShawn O. Pearce2008-09-29
|\ \ | | | | | | | | | | | | * mg/maint-remote-fix: make "git remote" report multiple URLs
| * | make "git remote" report multiple URLsMichael J Gruber2008-09-22
| |/ | | | | | | | | | | | | | | | | This patch makes "git remote -v" and "git remote show" report multiple URLs rather than warn about them. Multiple URLs are OK for pushing into multiple repos simultaneously. Without "-v" each repo is shown once only. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Clarify commit error message for unmerged filesRafael Garcia-Suarez2008-09-29
| | | | | | | | | | | | | | | | | | | | Currently, trying to use git-commit with unmerged files in the index will show the message "Error building trees", which can be a bit obscure to the end user. This patch makes the error message clearer, and consistent with what git-write-tree reports in a similar situation. Signed-off-by: Rafael Garcia-Suarez <rgarciasuarez@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | Use strchrnul() instead of strchr() plus manual workaroundJohan Herland2008-09-29
| | | | | | | | | | | | | | Also gets rid of a C++ comment. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | Use remove_path from dir.c instead of own implementationAlex Riesen2008-09-29
| | | | | | | | | | | | | | | | Besides, it fixes a memleak (builtin-rm.c) and accidental change of the input const argument (builtin-merge-recursive.c). Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | Add remove_path: a function to remove as much as possible of a pathAlex Riesen2008-09-29
| | | | | | | | | | | | | | | | | | The function has two potential users which both managed to get wrong their implementations (the one in builtin-rm.c one has a memleak, and builtin-merge-recursive.c scribles over its const argument). Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | git-submodule: Fix "Unable to checkout" for the initial 'update'Ping Yin2008-09-29
| | | | | | | | | | | | | | | | | | | | | | Since commit 55218("checkout: do not lose staged removal"), in cmd_add/cmd_update, "git checkout <commit>" following "git clone -n" may fail if <commit> is different from HEAD. So Use "git checkout -f <commit>" to fix this. Signed-off-by: Ping Yin <pkufranky@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | Clarify how the user can satisfy stash's 'dirty state' check.Stephen Haberman2008-09-29
| | | | | | | | | | Signed-off-by: Stephen Haberman <stephen@exigencecorp.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | Remove empty directories in recursive mergeAlex Riesen2008-09-26
| | | | | | | | | | | | | | | | The code was actually supposed to do that, but was accidentally broken. Noticed by Anders Melchiorsen. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | Documentation: clarify the details of overriding LESS via core.pagerChris Frey2008-09-26
| | | | | | | | | | | | | | | | | | The process of overriding the default LESS options using only git-specific methods is rather obscure. Show the end user how to do it in a step-by-step manner. Signed-off-by: Chris Frey <cdfrey@foursquare.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | Update release notes for 1.6.0.3Shawn O. Pearce2008-09-25
| | | | | | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | checkout: Do not show local changes when in quiet modeJonas Fonseca2008-09-25
| | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | for-each-ref: Fix --format=%(subject) for log message without newlinesJohan Herland2008-09-24
| | | | | | | | | | | | | | | | | | | | | | 'git for-each-ref --format=%(subject)' currently returns an empty string if the log message does not contain a newline. This patch teaches 'git for-each-ref' to return the entire log message (instead of an empty string) if there is no newline in the log message. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | git-stash.sh: don't default to refs/stash if invalid ref suppliedBrandon Casey2008-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apply_stash() and show_stash() each call rev-parse with '--default refs/stash' as an argument. This option causes rev-parse to operate on refs/stash if it is not able to successfully operate on any element of the command line. This includes failure to supply a "valid" revision. This has the effect of causing 'stash apply' and 'stash show' to operate as if stash@{0} had been supplied when an invalid revision is supplied. e.g. 'git stash apply stash@{1}' would fall back to 'git stash apply stash@{0}' This patch modifies these two functions so that they avoid using the --default option of rev-parse. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | maint: check return of split_cmdline to avoid bad config stringsDeskin Miller2008-09-24
| | | | | | | | | | | | | | | | | | | | | | As the testcase demonstrates, it's possible for split_cmdline to return -1 and deallocate any memory it's allocated, if the config string is missing an end quote. In both the cases below, which are the only calling sites, the return isn't checked, and using the pointer causes a pretty immediate segfault. Signed-off-by: Deskin Miller <deskinm@umich.edu> Acked-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | builtin-prune.c: prune temporary packs in <object_dir>/pack directoryBrandon Casey2008-09-23
| | | | | | | | | | Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Do not perform cross-directory renames when creating packsPetr Baudis2008-09-22
| | | | | | | | | | | | | | | | | | | | | | | | A comment on top of create_tmpfile() describes caveats ('can have problems on various systems (FAT, NFS, Coda)') that should apply in this situation as well. This in the end did not end up solving any of my personal problems, but it might be a useful cleanup patch nevertheless. Signed-off-by: Petr Baudis <pasky@suse.cz> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Use dashless git commands in setgitperms.perlTodd Zullinger2008-09-22
| | | | | | | | | | Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-remote: do not use user input in a printf format stringJohannes Sixt2008-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'git remote show' substituted the remote name into a string that was later used as a printf format string. If a remote name contains a printf format specifier like this: $ git remote add foo%sbar . then the command $ git remote show foo%sbar would print garbage (if you are lucky) or crash. This fixes it. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Start draft release notes for 1.6.0.3Junio C Hamano2008-09-19
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-repack uses --no-repack-object, not --no-repack-delta.Mikael Magnusson2008-09-19
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Typo "bogos" in format-patch error message.Mikael Magnusson2008-09-19
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>