aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fix broken bash completion of local refs.Shawn O. Pearce2006-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | Commit 35e65ecc broke completion of local refs, e.g. "git pull . fo<tab>" no longer would complete to "foo". Instead it printed out an internal git error ("fatal: Not a git repository: '.'"). The break occurred when I tried to improve performance by switching from git-peek-remote to git-for-each-ref. Apparently git-peek-remote will drop into directory "$1/.git" (where $1 is its first parameter) if it is given a repository with a working directory. This allowed the bash completion code to work properly even though it was not handing over the true repository directory. So now we do a stat in bash to see if we need to add "/.git" to the path string before running any command with --git-dir. I also tried to optimize away two "git rev-parse --git-dir" invocations in common cases like "git log fo<tab>" as typically the user is in the top level directory of their project and therefore the .git subdirectory is in the current working directory. This should make a difference on systems where fork+exec might take a little while. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach bash how to complete long options for git-commit.Shawn O. Pearce2006-11-28
| | | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: fix output reporting from the delta fetcherEric Wong2006-11-28
| | | | | | | | | | | | | | There was nothing printed in the code originally because I left out a pair of parentheses. Nevertheless, the affected code has been replaced with a more efficient version that respects the -q flag as well as requiring less bandwidth. We save some bandwidth by not requesting changed paths information when calling get_log() since we're using the delta fetcher. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: error out when the SVN connection fails during a fetchEric Wong2006-11-28
| | | | | | | | | | | | finish_report does seem to return a useful value indicating success or failure, so we'll just set a flag when close_edit is called (it is not called on failures, nor is abort_edit) and check the flag before proceeding. Thanks to Pazu for pointing this out. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* shortlog: remove range checkRené Scharfe2006-11-28
| | | | | | | | | | Don't force the user to specify more than one revision parameter, thus making git-shortlog behave more like git-log. 'git-shortlog master' will now produce the expected results; the other end of the range simply is the (oldest) root commit. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: update tests for recent changesEric Wong2006-11-27
| | | | | | | | | | | | * Enable test for delta transfers in full-svn-test. * Run tests against the root of the repository so we won't have to revisit 308906fa6e98132cab839a4f42701386fba368ef and efe4631def181d32f932672a7ea31e52ee0ab308 again. The graft-branches test still runs as before. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: enable delta transfers during fetches when using SVN:: libsEric Wong2006-11-27
| | | | | | | | | | | | | This should drastically reduce bandwidth used for network transfers. This is not enabled for file:// repositories by default because of the increased CPU usage and I/O needed. GIT_SVN_DELTA_FETCH may be set to a true value to enable or false (0) to disable delta transfers regardless of the repository type. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* sha1_object_info(): be consistent with read_sha1_file()Johannes Schindelin2006-11-27
| | | | | | | | | | | | | | | | | | | | We used to try loose objects first with sha1_object_info(), but packed objects first with read_sha1_file(). Now, prefer packed objects over loose ones with sha1_object_info(), too. Usually the old behaviour would pose no problem, but when you tried to fix a fscked up repository by inserting a known-good pack, git cat-file $(git cat-file -t <sha1>) <sha1> could fail, even when git cat-file blob <sha1> would _not_ fail. Worse, a repack would fail, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* shortlog: use pagerJohannes Schindelin2006-11-27
| | | | | | | | On request of the kingpenguin, shortlog now uses the pager if output goes to a tty. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* cvsimport: style fixup.Junio C Hamano2006-11-27
| | | | | | | | | This should not change any functionality, but just makes it readable by having a space between syntactic construct keyword and open parenthesis (e.g. "if (expr", not "if(expr") and between close parenthesis and open brace (e.g. "if (expr) {" not "if (expr){"). Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-svn: use ~/.subversion config files when using SVN:: librariesEric Wong2006-11-27
| | | | | | | | | | | | | This allows users to use HTTP proxy information (among other settings) from ~/.subversion/servers and ~/.subversion/config --config-dir (as before) may be passed to git-svn to override the default choice of '~/.subversion' for the configuration directory. Thanks to tko on #git for pointing this out. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach bash about git-am/git-apply and their whitespace options.Shawn O. Pearce2006-11-27
| | | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Cache the list of merge strategies and available commands during load.Shawn O. Pearce2006-11-27
| | | | | | | | | | | | | | | Since the user's git installation is not likely to grow a new command or merge strategy in the lifespan of the current shell process we can save time during completion operations by caching these lists during sourcing of the completion support. If the git executable is not available or we run into errors while caching at load time then we defer these to runtime and generate the list on the fly. This might happen if the user doesn't put git into their PATH until after the completion script gets sourced. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Support --strategy=x completion in addition to --strategy x.Shawn O. Pearce2006-11-27
| | | | | | | | | | | | | Because git-merge and git-rebase both accept -s, --strategy or --strategy= we should recognize all three formats in the bash completion functions and issue back all merge strategies on demand. I also moved the prior word testing to be before the current word testing, as the current word cannot be completed with -- if the prior word was an option which requires a parameter, such as -s or --strategy. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach bash about git-repo-config.Shawn O. Pearce2006-11-27
| | | | | | | | | | | | | | | This is a really ugly completion script for git-repo-config, but it has some nice properties. I've added all of the documented configuration parameters from Documentation/config.txt to the script, allowing the user to complete any standard configuration parameter name. We also have some intelligence for the remote.*.* and branch.*.* keys by completing not only the key name (e.g. remote.origin) but also the values (e.g. remote.*.fetch completes to the branches available on the corresponding remote). Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Support bash completion of refs/remote.Shawn O. Pearce2006-11-27
| | | | | | | | | | | | | | | | Now that people are really likely to start using separate remotes (due to the default in git-clone changing) we should support ref completion for these refs in as many commands as possible. While we are working on this routine we should use for-each-ref to obtain a list of local refs, as this should run faster than peek-remote as it does not need to dereference tag objects in order to produce the list of refs back to us. It should also be more friendly to users of StGIT as we won't generate a list of the StGIT metadata refs. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach bash about git log/show/whatchanged options.Shawn O. Pearce2006-11-27
| | | | | | | | | | Typing out options to git log/show/whatchanged can take a while, but we can easily complete them with bash. So list the most common ones, especially --pretty=online|short|medium|... so that users don't need to type everything out. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach bash how to complete git-rebase.Shawn O. Pearce2006-11-27
| | | | | | | | | | | | | | | As git-rebase is a popular command bash should know how to complete reference names and its long options. We only support completions which make sense given the current state of the repository, that way users don't get shown --continue/--skip/--abort on the first execution. Also added support for long option --strategy to git-merge, as I missed that option earlier and just noticed it while implementing git-rebase. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach bash how to complete git-cherry-pick.Shawn O. Pearce2006-11-27
| | | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach bash how to complete git-format-patch.Shawn O. Pearce2006-11-27
| | | | | | | | | | | | | Provide completion for currently known long options supported by git-format-patch as well as the revision list specification argument, which is generally either a refname or in the form a..b. Since _git_log was the only code that knew how to complete a..b, but we want to start adding option support to _git_log also refactor the a..b completion logic out into its own function. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add current branch in PS1 support to git-completion.bash.Shawn O. Pearce2006-11-27
| | | | | | | | | | | | | | | Many users want to display the current branch name of the current git repository as part of their PS1 prompt, much as their PS1 prompt might also display the current working directory name. We don't force our own PS1 onto the user. Instead we let them craft their own PS1 string and offer them the function __git_ps1 which they can invoke to obtain either "" (when not in a git repository) or "(%s)" where %s is the name of the current branch, as read from HEAD, with the leading refs/heads/ removed. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach bash how to complete options for git-name-rev.Shawn O. Pearce2006-11-27
| | | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Hide plumbing/transport commands from bash completion.Shawn O. Pearce2006-11-27
| | | | | | | | | | | Users generally are not going to need to invoke plumbing-level commands from within one line shell commands. If they are invoking these commands then it is likely that they are glueing them together into a shell script to perform an action, in which case bash completion for these commands is of relatively little use. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Teach git-completion.bash how to complete git-merge.Shawn O. Pearce2006-11-27
| | | | | | | | | | | | | Now that git-merge is high-level Porcelain users are going to expect to be able to use it from the command line, in which case we really should also be able to complete ref names as parameters. I'm also including completion support for the merge strategies that are supported by git-merge.sh, should the user wish to use a different strategy than their default. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Update documentation to remove incorrect GIT_DIFF_OPTS example.Sean2006-11-27
| | | | | | | | | Git no longer calls an external diff program to generate patches. Remove the documentation which suggests that you can pass arbitrary diff options via the GIT_DIFF_OPTS environment variable. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'js/shortlog'Junio C Hamano2006-11-26
|\ | | | | | | | | | | | | | | | | | | | | | | * js/shortlog: git-shortlog: make common repository prefix configurable with .mailmap git-shortlog: fix common repository prefix abbreviation. builtin git-shortlog is broken shortlog: fix "-n" shortlog: handle email addresses case-insensitively shortlog: read mailmap from ./.mailmap again shortlog: do not crash on parsing "[PATCH" Build in shortlog
| * git-shortlog: make common repository prefix configurable with .mailmapJunio C Hamano2006-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The code had "/pub/scm/linux/kernel/git/" hardcoded which was too specific to the kernel project. With this, a line in the .mailmap file: # repo-abbrev: /pub/scm/linux/kernel/git/ can be used to cause the substring to be abbreviated to /.../ on the title line of the commit message. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-shortlog: fix common repository prefix abbreviation.Junio C Hamano2006-11-25
| | | | | | | | | | | | | | The code to abbreviate the common repository prefix was totally borked. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * builtin git-shortlog is brokenNicolas Pitre2006-11-21
| | | | | | | | | | | | | | | | | | Another small patch to fix the output result to be conform with the perl version. Signed-off-by: Nicolas Pitre <nico@cam.org> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * shortlog: fix "-n"Johannes Schindelin2006-11-21
| | | | | | | | | | | | | | | | | | Since it is now a builtin optionally taking a range, we have to parse the options before the rev machinery, to be able to shadow the short hand "-n" for "--max-count". Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * shortlog: handle email addresses case-insensitivelyJohannes Schindelin2006-11-19
| | | | | | | | | | Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * shortlog: read mailmap from ./.mailmap againJohannes Schindelin2006-11-19
| | | | | | | | | | | | | | | | While at it, remove the linux specific mailmap into contrib/mailmap.linux. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * shortlog: do not crash on parsing "[PATCH"Johannes Schindelin2006-11-19
| | | | | | | | | | | | | | | | Annoyingly, it looked for the closing bracket in the author name instead of in the message, and then accessed the NULL pointer. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Build in shortlogJohannes Schindelin2006-11-19
| | | | | | | | | | | | | | | | [jc: with minimum squelching of compiler warning under "-pedantic" compilation options.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/push-delete-ref'Junio C Hamano2006-11-26
|\ \ | | | | | | | | | | | | * jc/push-delete-ref: Allow git push to delete remote ref.
| * | Allow git push to delete remote ref.Junio C Hamano2006-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to say git send-pack $URL :refs/heads/$branch to delete the named remote branch. The refspec $src:$dst means replace the destination ref with the object known as $src on the local side, so this is a natural extension to make an empty $src mean "No object" to delete the target. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/merge'Junio C Hamano2006-11-26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * branch 'jc/merge': git-merge: do not leak rev-parse output used for checking internally. git-merge: tighten error checking. merge: allow merging into a yet-to-be-born branch. git-merge: make it usable as the first class UI remove merge-recursive-old
| * | | git-merge: do not leak rev-parse output used for checking internally.Junio C Hamano2006-11-26
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-merge: tighten error checking.Junio C Hamano2006-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a branch name to be merged is misspelled, the command leaked error messages from underlying plumbing commands, which were helpful only to people who know how the command are implemented to diagnose the breakage, but simply puzzling and unhelpful for the end users. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | merge: allow merging into a yet-to-be-born branch.Junio C Hamano2006-11-21
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | git-merge: make it usable as the first class UIJunio C Hamano2006-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This teaches the oft-requested syntax git merge $commit to implement merging the named commit to the current branch. This hopefully would make "git merge" usable as the first class UI instead of being a mere backend for "git pull". Most notably, $commit above can be any committish, so you can say for example: git merge js/shortlog~2 to merge early part of a topic branch without merging the rest of it. A custom merge message can be given with the new --message=<msg> parameter. The message is prepended in front of the usual "Merge ..." message autogenerated with fmt-merge-message. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | remove merge-recursive-oldJunio C Hamano2006-11-21
| | | | | | | | | | | | | | | | | | | | | | | | This frees the Porcelain-ish that comes with the core Python-free. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'jc/pack-peeled'Junio C Hamano2006-11-26
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * jc/pack-peeled: Store peeled refs in packed-refs (take 2). Store peeled refs in packed-refs file.
| * | | | Store peeled refs in packed-refs (take 2).Junio C Hamano2006-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the previous implementation which failed to optimize repositories with tons of lightweight tags. The updated packed-refs format begins with "# packed-refs with:" line that lists the kind of extended data the file records. Currently, there is only one such extension defined, "peeled". This stores the "peeled tag" on a line that immediately follows a line for a tag object itself in the format "^<sha-1>". The header line itself and any extended data are ignored by older implementation, so packed-refs file generated with this version can still be used by older git. packed-refs made by older git can of course be used with this version. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Store peeled refs in packed-refs file.Junio C Hamano2006-11-19
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | This would speed up "show-ref -d" in a repository with mostly packed tags. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | grep: do not skip unmerged entries when grepping in the working tree.Junio C Hamano2006-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to skip unmerged entries, which made sense for grepping in the cached copies, but not for grepping in the working tree. Noticed by Johannes Sixt. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | git-tag: allow empty tag message if -m is given explicitly.Han-Wen Nienhuys2006-11-26
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'jn/web'Junio C Hamano2006-11-25
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/web: gitweb: Make project description in projects list link to summary view gitweb: Use author_epoch for pubdate in gitweb feeds gitweb: Add author and contributor email to Atom feed gitweb: Add author and committer email extraction to parse_commit gitweb: Use git-show-ref instead of git-peek-remote gitweb: Do not use esc_html in esc_path
| * | | | gitweb: Make project description in projects list link to summary viewJakub Narebski2006-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make (shortened) project description in the "projects list" view hyperlink to the "summary" view of the project. Project names are sometimes short; having project description be hyperling gives larger are to click. While at it, display full description on mouseover via 'title' attribute to introduced link. Additionally, fix whitespace usage in modified git_project_list_body subroutine: tabs are for indent, spaces are for align. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | gitweb: Use author_epoch for pubdate in gitweb feedsJakub Narebski2006-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use creation date (author_epoch) instead of former commit date (committer_epoch) as publish date in gitweb feeds (RSS, Atom). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>