summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-07-08rebase -i: actually show the diffstat when being verboseLibravatar Johannes Schindelin1-4/+4
The "while" loop in the function do_rest is not supposed to ever be exited. Instead, the function do_one checks if there is nothing left, and cleans up and exits if that is the case. So the diffstat code belongs there. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-08rebase -i: handle --continue more like non-interactive rebaseLibravatar Johannes Schindelin2-10/+32
Non-interactive rebase requires the working tree to be clean, but applies what is in the index without requiring the user to do it herself. Imitate that, but (since we are interactive, after all) fire up an editor with the commit message. It also fixes a subtle bug: a forgotten "continue" was removed, which led to an infinite loop when continuing without remaining patches. Both issues noticed by Frank Lichtenheld. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-08t7004: Skip tests for signed tags in an old version of gpg.Libravatar Carlos Rica1-0/+11
As said here: http://www.gnupg.org/documentation/faqs.html#q6.19 the gpg version 1.0.6 didn't parse trust packets correctly, so for that version, creation of signed tags using the generated key fails. Signed-off-by: Carlos Rica <jasampler@gmail.com> Acked-by: Sven Verdoolaege <skimo@kotnet.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-08Fix merge-one-file for our-side-added/our-side-removed casesLibravatar Junio C Hamano1-4/+6
When commit ed93b449 changed the script so that it does not touch untracked working tree file, we forgot that we still needed to resolve the index entry (otherwise they are left unmerged). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-08git-commit: don't add multiple Signed-off-by: from the same identityLibravatar Gerrit Pape1-9/+11
If requested to signoff a commit, don't add another Signed-off-by: line to the commit message if the exact same line is already there. This was noticed and requested by Josh Triplett through http://bugs.debian.org/430851 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-08branch.autosetupmerge: allow boolean values, or "all"Libravatar Johannes Schindelin4-9/+28
Junio noticed that switching on autosetupmerge unilaterally started cluttering the config for local branches. That is not the original intention of branch.autosetupmerge, which was meant purely for convenience when branching off of remote branches, but that semantics got lost somewhere. If you still want that "new" behavior, you can switch branch.autosetupmerge to the value "all". Otherwise, it is interpreted as a boolean, which triggers setting up defaults _only_ when branching off of a remote branch, i.e. the originally intended behavior. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-08git-stash: try reusing cached stat info as much as possibleLibravatar Junio C Hamano1-3/+3
Earlier when we read a tree into a temporary index, we read it from scratch. Start from the current index and use read-tree -m to preserve cached stat information as much as possible, in order to speed up "git add -u". This makes "git stash" usable in a source tree of nontrivial size. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-08diff.c: make built-in hunk header pattern a separate tableLibravatar Junio C Hamano1-6/+16
This would hopefully make it easier to maintain. Initially we would have "java" and "tex" defined, as they are the only ones we already have. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-07gitweb: make "No commits" in project list gray, not bold greenLibravatar Matt McCutchen2-0/+7
A missing return statement in git_get_last_activity made gitweb think a project with no commits was in age class "age0", so the "No commits" appeared in bold green, which was ridiculous. I added the return so those projects get "noage" and added a block to gitweb.css to format the "No commits" text gray. Signed-off-by: Matt McCutchen <hashproduct@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-07gitweb: make search form generate pathinfo-style URLsLibravatar Matt McCutchen1-3/+9
The search form generated traditional-style URLs with a "p=" parameter even when the pathinfo feature was on. This patch makes it generate pathinfo-style URLs when appropriate. Signed-off-by: Matt McCutchen <hashproduct@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-07gitweb: prefer git_get_project_owner() over get_file_owner()Libravatar Miklos Vajna1-2/+2
This way if $projects_list exists, it'll be used, otherwise get_file_owner() will be used as before. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Acked-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-07gitweb: make repeated calls to git_get_project_owner() bearableLibravatar Junio C Hamano1-8/+20
If repeated calls to git_get_project_owner() are made, we would have read the same file over and over again. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-07Merge branch 'js/stash'Libravatar Junio C Hamano2-1/+89
* js/stash: Teach git-stash to "apply --index"
2007-07-07Merge branch 'jc/diff-mark'Libravatar Junio C Hamano14-63/+336
* jc/diff-mark: diff: honor binariness specified in attributes Fix configuration syntax to specify customized hunk header patterns. Per-path attribute based hunk header selection. Future-proof source for changes in xdemitconf_t Introduce diff_filespec_is_binary()
2007-07-07Merge branch 'maint'Libravatar Junio C Hamano2-1/+11
* maint: Fix "apply --reverse" with regard to whitespace
2007-07-07diff: honor binariness specified in attributesLibravatar Junio C Hamano2-5/+21
The code shuffling mistakenly lost binariness specified with the attribute mecahnism and made it always guess from the data. Noticed by Johannes, with two test cases to t4020. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-07Fix "apply --reverse" with regard to whitespaceLibravatar Johannes Schindelin2-1/+11
"git apply" used to take check the whitespace in the wrong direction. Noticed by Daniel Barkalow. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-07diff-lib.c: don't strdup twiceLibravatar René Scharfe1-1/+1
The static function read_directory in diff-lib.c is only ever called with struct path_list lists with .strdup_paths turned on, i.e. path_list_insert will strdup the paths for us (again). Let's take advantage of that and stop doing it twice. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-07Fix configuration syntax to specify customized hunk header patterns.Libravatar Junio C Hamano3-71/+84
This updates the hunk header customization syntax. The special case 'funcname' attribute is gone. You assign the name of the type of contents to path's "diff" attribute as a string value in .gitattributes like this: *.java diff=java *.perl diff=perl *.doc diff=doc If you supply "diff.<name>.funcname" variable via the configuration mechanism (e.g. in $HOME/.gitconfig), the value is used as the regexp set to find the line to use for the hunk header (the variable is called "funcname" because such a line typically is the one that has the name of the function in programming language source text). If there is no such configuration, built-in default is used, if any. Currently there are two default patterns: default and java. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06git-branch: default to --trackLibravatar Johannes Schindelin1-1/+1
"git branch --track" will setup config variables when branching from a remote branch, so that if you say "git pull" while being on that branch, it automatically fetches the correct remote, and merges the correct branch. Often people complain that this is not the default for "git branch". Make it so. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06git-send-email: allow an email alias for --fromLibravatar Michael Hendricks1-0/+2
Signed-off-by: Michael Hendricks <michael@ndrix.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06cvsserver: always initialize state in argsplit()Libravatar Frank Lichtenheld1-4/+4
Other code assumes that this is initialized, so do it even if there were no arguments given. Signed-off-by: Dirk Koopman <djk@tobit.co.uk> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06stash: allow running from a subdirectoryLibravatar James Bowes1-0/+1
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06git-submodule(1): update description and key namesLibravatar Lars Hjemli1-3/+3
When git-submodule was updated to allow mapping between submodule name and submodule path, the documentation was left untouched. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06Enable "git rerere" by the config variable rerere.enabledLibravatar Johannes Schindelin9-40/+64
Earlier, "git rerere" was enabled by creating the directory .git/rr-cache. That is definitely not in line with most other features, which are enabled by a config variable. So, check the config variable "rerere.enabled". If it is set to "false" explicitely, do not activate rerere, even if .git/rr-cache exists. This should help when you want to disable rerere temporarily. If "rerere.enabled" is not set at all, fall back to detection of the directory .git/rr-cache. [jc: with minimum tweaks] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06Add [verse] to the SYNOPSIS section of git-submodule.txt.Libravatar Matt Kraai1-0/+1
The SYNOPSIS section of git-submodule.txt contains two forms. Since it doesn't use the verse style, the line boundary between them is not preserved and the second form can appear on the same line as the first form. Adding [verse] enables the verse style, which preserves the line boundary between them. Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06Change "added.moved or removed" to "added, moved or removed" inLibravatar Matt Kraai1-1/+1
Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06Fixed a formulation mistake in Documentation/user-manual.txtLibravatar Marcus Fritzsch1-7/+7
This one fixes a small formulation weirdness in Documentation/user-manual.txt Signed-off-by: Marcus Fritzsch <m@fritschy.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06Teach git-stash to "apply --index"Libravatar Johannes Schindelin2-1/+89
When given this subcommand, git-stash will try to merge the stashed index into the current one. Only trivial merges are possible, since we have no index for the index ;-) If a trivial merge is not possible, git-stash will bail out with a hint to skip the --index option. For good measure, finally include a test case. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06Per-path attribute based hunk header selection.Libravatar Junio C Hamano7-15/+256
This makes"diff -p" hunk headers customizable via gitattributes mechanism. It is based on Johannes's earlier patch that allowed to define a single regexp to be used for everything. The mechanism to arrive at the regexp that is used to define hunk header is the same as other use of gitattributes. You assign an attribute, funcname (because "diff -p" typically uses the name of the function the patch is about as the hunk header), a simple string value. This can be one of the names of built-in pattern (currently, "java" is defined) or a custom pattern name, to be looked up from the configuration file. (in .gitattributes) *.java funcname=java *.perl funcname=perl (in .git/config) [funcname] java = ... # ugly and complicated regexp to override the built-in one. perl = ... # another ugly and complicated regexp to define a new one. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06Future-proof source for changes in xdemitconf_tLibravatar Johannes Schindelin6-10/+10
The instances of xdemitconf_t were initialized member by member. Instead, initialize them to all zero, so we do not have to update those places each time we introduce a new member. [jc: minimally fixed by getting rid of a new global] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06Introduce diff_filespec_is_binary()Libravatar Junio C Hamano3-36/+39
This replaces an explicit initialization of filespec->is_binary field used for rename/break followed by direct access to that field with a wrapper function that lazily iniaitlizes and accesses the field. We would add more attribute accesses for the use of diff routines, and it would be better to make this abstraction earlier. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-05Prefer EMAIL to username@hostname.Libravatar Matt Kraai1-7/+12
The environment variable $EMAIL gives a better default of user's preferred e-mail address than the hardcoded "username@hostname", as it is understood by many existing programs. We still honor GIT_*_EMAIL environment variables and user.email configuration variable give them higher precedence, so that the user can override $EMAIL or "username@hostname", as they are likely to be more specific to the context of working on a particular project. Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-05make git-clone GIT_WORK_TREE awareLibravatar Matthias Lederhofer1-7/+18
If GIT_WORK_TREE is set git-clone will use that path for the working tree. Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-05git-clone: split up long &&-command-chain and use a function for cleanupLibravatar Matthias Lederhofer1-4/+13
Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-05fix remote.origin.url in tutorial.txtLibravatar Alecs King1-1/+1
Bob cloned from Alice. The origin url is actually Alice's repo. Signed-off-by: Alecs King <alecsk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-05filter-branch: fail gracefully when a filter failsLibravatar Johannes Schindelin2-11/+36
A common mistake is to provide a filter which fails unwantedly. For example, this will stop in the middle: git filter-branch --env-filter ' test $GIT_COMMITTER_EMAIL = xyz && export GIT_COMMITTER_EMAIL = abc' rewritten When $GIT_COMMITTER_EMAIL is not "xyz", the test fails, and consequently the whole filter has a non-zero exit status. However, as demonstrated in this example, filter-branch would just stop, and the user would be none the wiser. Also, a failing msg-filter would not have been caught, as was the case with one of the tests. This patch fixes both issues, by paying attention to the exit status of msg-filter, and by saying what failed before exiting. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-05Add -v|--verbose to git remote to show remote urlLibravatar Alex Riesen1-1/+13
Many other commands already have such an option, and I find it practical to see where all the remotes actually come from. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-05filter-branch documentation: clarify which filters are eval'edLibravatar Johannes Schindelin1-1/+2
All filters, except the commit filter, are evaluated. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-05git-stash: allow more descriptive reminder message when savingLibravatar Junio C Hamano1-6/+19
This allows you to say: $ git stash starting to implement X while creating a stash, and the resulting "stash list entry would read as: $ git stash list stash@{0}: On master: starting to implement X instead of the default message which talks about the commit the stash happens to be based on (hence does not have much to do with what the stashed change is trying to do). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-05Add urls.txt to git-clone man pageLibravatar Andrew Ruder6-59/+63
Since git-clone is one of the many commands taking URLs to remote repositories as an argument, it should include the URL-types list from urls.txt. Split up urls.txt into urls.txt and urls-remotes.txt. The latter should be used by anything besides git-clone where a discussion of using .git/config and .git/remotes/ to name URLs just doesn't make as much sense. Signed-off-by: Andrew Ruder <andy@aeruder.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-04Fix git-stash(1) markup.Libravatar Junio C Hamano1-1/+1
Noticed by Randal L. Schwartz. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-04Allow rebase to run if upstream is completely mergedLibravatar Johannes Sixt2-4/+43
Consider this history: o--o-...-B <- origin \ \ x--x--M--x--x <- master In this situation, rebase considers master fully up-to-date and would not do anything. However, if there were additional commits on origin, the rebase would run and move the commits x on top of origin. Here we change rebase to short-circuit out only if the history since origin is strictly linear. Consequently, the above as well as a history like this would be linearized: o--o <- origin \ x--x \ \ x--M--x--x <- master Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-04Remove USE_PAGER from git-pickaxe and git-annotateLibravatar Andrew Ruder1-2/+2
git-blame (and friends) specifically leave the pager turned off in the case that --incremental is specified as this isn't for human consumption. git-pickaxe and git-annotate will turn it on themselves otherwise. Signed-off-by: Andrew Ruder <andy@aeruder.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-04git-svn: fix blocking with svn:// servers after do_switchLibravatar Eric Wong1-0/+1
We now explicitly disconnect before starting new SVN::Ra connections. SVN::Ra objects will automatically be disconnected from the server on DESTROY. SVN servers seem to have problems accepting multiple connections from one client, and the SVN library has trouble being connected to multiple servers at once. This appears to cause opening the second connection to block, and cause git-svn to be unusable after using the do_switch() function. git-svn opens another connection because a workaround is necesary for the buggy reparent function handling on certain versions of svn:// and svn+ssh:// servers. Instead of using the reparent function (analogous to chdir), it will reopen a new connection to a different URL on the SVN server. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-04filter-branch documentation: some more touch-ups.Libravatar Johannes Sixt1-7/+16
- The map function used to fail, but no longer does (since 3520e1e8687.) - Fix the "edge-graft" example. - Show the same using .git/info/grafts. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-04filter-branch: added missing warn functionLibravatar Steffen Prohaska1-0/+4
--tag-name-filter may have failed before because warn is used for reporting but was not available. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-04Alter git-checkout reflog message to include "from" branchLibravatar Sean1-1/+2
As suggested by Junio, adding the current branch name to the reflog message for git-checkout would be helpful. For example: "checkout: moving from next to master" Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-04git-init: set core.worktree if GIT_WORK_TREE is specifiedLibravatar Matthias Lederhofer1-3/+37
Now you can do the following to create a repository which has a separate working tree: /tmp/foo$ export GIT_DIR=/tmp/bar /tmp/foo$ git --work-tree . init Initialized empty Git repository in /tmp/bar/ /tmp/foo$ git config core.worktree /tmp/foo Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-04Do not check if getcwd() result begins with a slash.Libravatar Junio C Hamano1-4/+4
In user space, and for getcwd(), the check to see if the resulting path begins with a '/' does not make sense. This is merely a mistake by Linus who is so used to code for the kernel, where a d_path() return value pathname can be either a real path, or something like "pipe:[8003]", and the difference is the '/' at the beginning. Pointed out by Dscho, Matthias Lederhofer and clarified by Linus. Signed-off-by: Junio C Hamano <gitster@pobox.com>