summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitweb: Add path_info tests to t/t9500-gitweb-standalone-no-errors.shJakub Narebski2008-10-021-0/+49
| | | | | | | | | | 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-021-1/+2
| | | | | | | | | | | | | | | | | | | | 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-021-0/+1
| | | | | | | | | | 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-021-0/+7
| | | | | | | | | | | 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-011-3/+6
| | | | | | | | | | | | 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-012-6/+6
| | | | | | | | | | | ... 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-301-1/+1
| | | | | | | 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-301-4/+4
| | | | | | | | 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-301-0/+0
| | | | | 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-295-49/+72
|\ | | | | | | | | | | | | | | | | | | | | | | | | * 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-221-0/+11
| | | | | | | | | | 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-201-2/+2
| | | | | | | | | | | | 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-191-14/+17
| | | | | | | | | | | | | | 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-183-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-183-12/+15
| | | | | | | | | | | | | | 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-181-27/+28
| | | | | | | | | | | | | | | | | | 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-291-8/+15
|\ \ | | | | | | | | | | | | * mg/maint-remote-fix: make "git remote" report multiple URLs
| * | make "git remote" report multiple URLsMichael J Gruber2008-09-221-8/+15
| |/ | | | | | | | | | | | | | | | | 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-291-1/+1
| | | | | | | | | | | | | | | | | | | | 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-291-3/+1
| | | | | | | | | | | | | | 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-293-49/+5
| | | | | | | | | | | | | | | | 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-292-0/+23
| | | | | | | | | | | | | | | | | | 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-291-2/+7
| | | | | | | | | | | | | | | | | | | | | | 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-291-1/+1
| | | | | | | | | | 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-262-3/+12
| | | | | | | | | | | | | | | | 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-261-2/+11
| | | | | | | | | | | | | | | | | | 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-251-1/+17
| | | | | | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | checkout: Do not show local changes when in quiet modeJonas Fonseca2008-09-251-1/+1
| | | | | | | | | | 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-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | '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-241-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-243-0/+14
| | | | | | | | | | | | | | | | | | | | | | 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-231-10/+12
| | | | | | | | | | 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-224-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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-221-2/+2
| | | | | | | | | | 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-221-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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-192-1/+30
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-repack uses --no-repack-object, not --no-repack-delta.Mikael Magnusson2008-09-192-2/+2
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Typo "bogos" in format-patch error message.Mikael Magnusson2008-09-191-1/+1
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | builtin-clone: fix typoFabrizio Chiarello2008-09-191-1/+1
| | | | | | | | | | Signed-off-by: Fabrizio Chiarello <ponch@autistici.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Bust the ghost of long-defunct diffcore-pathspec.Yann Dirson2008-09-192-34/+22
| | | | | | | | | | | | | | | | This concept was retired by 77882f6 (Retire diffcore-pathspec., 2006-04-10), more than 2 years ago. Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | completion: git commit should list --interactiveEric Raible2008-09-191-1/+1
| | | | | | | | | | | | Signed-off-by: Eric Raible <raible@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'dp/maint-rebase-fix' into maintJunio C Hamano2008-09-181-3/+11
|\ \ | | | | | | | | | | | | | | | * dp/maint-rebase-fix: git-rebase--interactive: auto amend only edited commit git-rebase-interactive: do not squash commits on abort
| * | git-rebase--interactive: auto amend only edited commitDmitry Potapov2008-09-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git rebase --continue" issued after git rebase being stop by "edit" command is trying to amend the last commit using stage changes. However, if the last commit is not the commit that was marked as "edit" then it can produce unexpected results. For instance, after being stop by "edit", I have made some changes to commit message using "git commit --amend". After that I realized that I forgot to add some changes to some file. So, I said "git add file" and the "git rebase --continue". Unfortunately, it caused that the new commit message was lost. Another problem is that after being stopped at "edit", the user adds new commits. In this case, automatic amend behavior of git rebase triggered by some stage changes causes that not only that the log message of the last commit is lost but that it will contain also wrong Author and Date information. Therefore, this patch restrict automatic amend only to the situation where HEAD is the commit at which git rebase stop by "edit" command. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | git-rebase-interactive: do not squash commits on abortDmitry Potapov2008-09-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If git rebase interactive is stopped by "edit" command and then the user said "git rebase --continue" while having some stage changes, git rebase interactive is trying to amend the last commit by doing: git --soft reset && git commit However, the user can abort commit for some reason by providing an empty log message, and that would leave the last commit undone, while the user being completely unaware about what happened. Now if the user tries to continue, by issuing "git rebase --continue" that squashes two previous commits. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jc/maint-checkout-keep-remove' into maintJunio C Hamano2008-09-185-2/+24
|\ \ \ | | | | | | | | | | | | | | | | * jc/maint-checkout-keep-remove: checkout: do not lose staged removal
| * | | checkout: do not lose staged removalJunio C Hamano2008-09-095-2/+24
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic to checkout a different commit implements the safety to never lose user's local changes. For example, switching from a commit to another commit, when you have changed a path that is different between them, need to merge your changes to the version from the switched-to commit, which you may not necessarily be able to resolve easily. By default, "git checkout" refused to switch branches, to give you a chance to stash your local changes (or use "-m" to merge, accepting the risks of getting conflicts). This safety, however, had one deliberate hole since early June 2005. When your local change was to remove a path (and optionally to stage that removal), the command checked out the path from the switched-to commit nevertheless. This was to allow an initial checkout to happen smoothly (e.g. an initial checkout is done by starting with an empty index and switching from the commit at the HEAD to the same commit). We can tighten the rule slightly to allow this special case to pass, without losing sight of removal explicitly done by the user, by noticing if the index is truly empty when the operation begins. For historical background, see: http://thread.gmane.org/gmane.comp.version-control.git/4641/focus=4646 This case is marked as *0* in the message, which both Linus and I said "it feels somewhat wrong but otherwise we cannot start from an empty index". Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jc/maint-diff-quiet' into maintJunio C Hamano2008-09-181-11/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | * jc/maint-diff-quiet: diff --quiet: make it synonym to --exit-code >/dev/null diff Porcelain: do not disable auto index refreshing on -C -C
| * | | diff --quiet: make it synonym to --exit-code >/dev/nullJunio C Hamano2008-09-061-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The point of --quiet was to return the status as early as possible without doing any extra processing. Well behaved scripts, when they expect to run many diff operations inside, are supposed to run "update-index --refresh" upfront; we do not want them to pay the price of iterating over the index and comparing the contents to fix the stat dirtiness, and we avoided most of the processing in diffcore_std() when --quiet is in effect. But scripts that adhere to the good practice won't have to pay any more price than the necessary lstat(2) that will report stat cleanliness, as long as only -q is given without any fancier diff options. More importantly, users who do ask for "--quiet -M --filter=D" (in order to notice only the deletion, not paths that disappeared only because they have been renamed away) deserve to get the result they asked for, even it means they have to pay the extra price; the alternative is to get a cheap early return that gives a result they did not ask for, which is much worse. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | diff Porcelain: do not disable auto index refreshing on -C -CJunio C Hamano2008-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we enabled the automatic refreshing of the index to "diff" Porcelain, we disabled it when --find-copies-harder was asked, but there is no good reason to do so. In the following command sequence, the first "diff" shows an "empty" diff exposing stat dirtyness, while the second one does not. $ >foo $ git add foo $ touch foo $ git diff -C -C $ git diff -C This fixes the inconsistency. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jc/maint-name-hash-clear' into maintJunio C Hamano2008-09-181-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * jc/maint-name-hash-clear: discard_cache: reset lazy name_hash bit