summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-02-23git-svn: add a test for show-ignoreLibravatar Eric Wong1-0/+26
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-02-23git-svn: make multi-init capable of reusing the Ra connectionLibravatar Eric Wong2-27/+29
If a user specified a seperate URL and --tags/--branches as a sepearte URL, allow the Ra object (and therefore the connection) to be reused. We'll get rid of libsvn_ls_fullurl() since it was only used in one place. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-02-23git-svn: convert multi-init over to using Git::SVNLibravatar Eric Wong1-41/+31
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-02-23git-svn: convert 'init' to use Git::SVNLibravatar Eric Wong1-20/+18
While we're at it, fix up some bugs in Git::SVN. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-02-23git-svn: add Git::SVN module (to avoid global variables)Libravatar Eric Wong1-0/+485
This should make it easier to improve multi-fetch and --follow-parent by avoiding global variables. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-02-23git-svn: cleanup: avoid re-use()ing Git.pm in sub-packagesLibravatar Eric Wong1-13/+15
I will be using functions from Git.pm in more modules, so I want to avoid re-importing the long argument list everywhere it's used. Also removed an unused command-line switch (--no-ignore-externals) and some variables. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-02-23git-svn: cleanup: put SVN workarounds into their own namespaceLibravatar Eric Wong1-149/+173
Force some svn_ra functions to use a temporary pool via wrapper This cleans up the code a bit by removing explicit instances of pool allocation and deallocation and providing wrapper functions that make use of temporary pools. I've also added an explicit pool usage when creating the commit editor for commit-diff where get_commit_editor can be called multiple times with the same pool previously. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-02-23git-svn: cleanup: move process_rm aroundLibravatar Eric Wong1-25/+19
(it's only used in one function now) Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-02-23git-svn: move authentication prompts into their own namespaceLibravatar Eric Wong1-16/+24
I'm going to be reorganizing some more code. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-02-22Merge branches 'lt/crlf' and 'jc/apply-config'Libravatar Junio C Hamano11-27/+767
* lt/crlf: Teach core.autocrlf to 'git apply' t0020: add test for auto-crlf Make AutoCRLF ternary variable. Lazy man's auto-CRLF * jc/apply-config: t4119: test autocomputing -p<n> for traditional diff input. git-apply: guess correct -p<n> value for non-git patches. git-apply: notice "diff --git" patch again Fix botched "leak fix" t4119: add test for traditional patch and different p_value apply: fix memory leak in prefix_one() git-apply: require -p<n> when working in a subdirectory. git-apply: do not lose cwd when run from a subdirectory. Teach 'git apply' to look at $HOME/.gitconfig even outside of a repository Teach 'git apply' to look at $GIT_DIR/config
2007-02-22Merge branch 'maint'Libravatar Junio C Hamano4-2/+20
* maint: git-diff: fix combined diff Fix 'git commit -a' in a newly initialized repository Include git-gui credits file in dist. Document the new core.bare configuration option.
2007-02-22git-diff: fix combined diffLibravatar Johannes Schindelin1-1/+2
The code forgets that typecast binds tighter than addition, in other words: (cast *)array + i === ((cast *)array) + i Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-22Fix 'git commit -a' in a newly initialized repositoryLibravatar Fredrik Kuivinen1-0/+4
With current git: $ git init $ git commit -a cp: cannot stat `.git/index': No such file or directory Output a nice error message instead. Signed-off-by: Fredrik Kuivinen <frekui@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21Include git-gui credits file in dist.Libravatar Shawn O. Pearce1-1/+2
The Makefile for the git-gui subproject will fail to execute if run outside of a git.git directory, such as when building from a .tar.gz or .tar.bz2. This is because it is looking for the credits file, which was created but omitted from the tarball by the toplevel Makefile. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21Document the new core.bare configuration option.Libravatar Shawn O. Pearce1-0/+12
Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21t4119: test autocomputing -p<n> for traditional diff input.Libravatar Junio C Hamano1-74/+43
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21git-apply: guess correct -p<n> value for non-git patches.Libravatar Junio C Hamano2-4/+111
This enhances the third point in the previous commit. When applying a non-git patch that begins like this: --- 2.6.orig/mm/slab.c +++ 2.6/mm/slab.c @@ -N,M +L,K @@@ ... and if you are in 'mm' subdirectory, we notice that -p2 is the right option to use to apply the patch in file slab.c in the current directory (i.e. mm/slab.c) The guess function also knows about this pattern, where you would need to use -p0 if applying from the top-level: --- mm/slab.c +++ mm/slab.c @@ -N,M +L,K @@@ ... Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21git-apply: notice "diff --git" patch againLibravatar Junio C Hamano2-9/+18
Earlier one that tried to be too consistent with GNU patch by not stripping the leading path when we _know_ we are in a subdirectory and the patch is relative to the toplevel was a mistake. This fixes it. - No change to behaviour when it is run from the toplevel of the repository. - When run from a subdirectory to apply a git-generated patch, it uses the right -p<n> value automatically, with or without --index nor --cached option. - When run from a subdirectory to apply a randomly generated patch, it wants the right -p<n> value to be given by the user. The second one is a pure improvement to correct inconsistency between --index and non --index case, compared with 1.5.0. The third point could be further improved to guess what the right value for -p<n> should be by looking at the patch, but should be a topic of a separate patch. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21Merge branch 'maint'Libravatar Junio C Hamano7-123/+314
* maint: Use gunzip -c over gzcat in import-tars example. git-gui: Don't crash in citool mode on initial commit. git-gui: Remove TODO list. git-gui: Include browser in our usage message. git-gui: Change summary of git-gui. git-gui: Display all authors of git-gui. git-gui: Use mixed path for docs on Cygwin. git-gui: Correct crash when saving options in blame mode. git-gui: Expose the browser as a subcommand. git-gui: Create new branches from a tag. git-gui: Prefer version file over git-describe. git-gui: Print version on the console. git-gui: More consistently display the application name. git-gui: Permit merging tags into the current branch. git-gui: Basic version check to ensure git 1.5.0 or later is used. git-gui: Refactor 'exec git subcmd' idiom.
2007-02-21Merge branch 'master' of git://repo.or.cz/git-gui into maintLibravatar Junio C Hamano6-120/+308
* 'master' of git://repo.or.cz/git-gui: git-gui: Don't crash in citool mode on initial commit. git-gui: Remove TODO list. git-gui: Include browser in our usage message. git-gui: Change summary of git-gui. git-gui: Display all authors of git-gui. git-gui: Use mixed path for docs on Cygwin. git-gui: Correct crash when saving options in blame mode. git-gui: Expose the browser as a subcommand. git-gui: Create new branches from a tag. git-gui: Prefer version file over git-describe. git-gui: Print version on the console. git-gui: More consistently display the application name. git-gui: Permit merging tags into the current branch. git-gui: Basic version check to ensure git 1.5.0 or later is used. git-gui: Refactor 'exec git subcmd' idiom.
2007-02-21Use gunzip -c over gzcat in import-tars example.Libravatar Michael Loeffler1-3/+6
Not everyone has gzcat or bzcat installed on their system, but gunzip -c and bunzip2 -c perform the same task and are available if the user has installed gzip support or bzip2 support. Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-21Fix botched "leak fix"Libravatar Junio C Hamano1-2/+8
When (new_name == old_name), the previous one prefixed old_name alone, leaving new_name untouched, and worse yet, left it dangling pointing at an already freed memory location. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21t4119: add test for traditional patch and different p_valueLibravatar Junio C Hamano1-2/+49
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21git-remote: support remotes with a dot in the nameLibravatar Pavel Roskin1-1/+1
[jc: the original from Pavel was limiting the variable names to only fetch and url, but I loosened it to take valid variable names.] Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21Teach diff -B about coloursLibravatar Johannes Schindelin1-14/+25
Matthias Lederhofer noticed that `diff -B` did not pick up on diff colournig. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20Allow git-remote to update named groups of remotesLibravatar Theodore Ts'o3-17/+46
In response to a feature request from Shawn Pearce, this patch allows a user to update a named group of remotes by using "git remote update <group>", where the group is defined in the config file by remotes.<group>. The default if the named group is not specified is now fetched group remotes.default, instead of remote.fetch, which is what had been previously used. In addition, if remotes.default is not defined, all remotes defined in the config file will be used, as before, but there is now also possible to request that a particular repository to be skipped by default by using the boolean configuration parameter remote.<name>.skipDefaultUpdate. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20Add config_boolean() method to the Git perl moduleLibravatar Theodore Ts'o1-0/+30
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20Allow passing of an alternative CVSROOT via -d.Libravatar Simon 'corecode' Schubert2-11/+23
This is necessary if using CVS in an asymmetric fashion, i.e. when the CVSROOT you are checking out from differs from the CVSROOT you have to commit to. Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20disable t4016-diff-quote.sh on some filesystemsLibravatar Alex Riesen1-0/+4
... because the filesystems (most typically FAT and NTFS) do not support HT nor LF in filenames. Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
2007-02-20Support for large files on 32bit systems.Libravatar Martin Waitz1-0/+2
Glibc uses the same size for int and off_t by default. In order to support large pack sizes (>2GB) we force Glibc to a 64bit off_t. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20git grep: use pagerLibravatar Johannes Schindelin1-1/+1
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-21git-gui: Don't crash in citool mode on initial commit.Libravatar Shawn O. Pearce1-8/+8
Attempting to use `git citool` to create an initial commit caused git-gui to crash with a Tcl error as it tried to add the newly born branch to the non-existant branch menu. Moving this code to after the normal commit cleanup logic resolves the issue, as we only have a branch menu if we are not in singlecommit mode. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-21git-gui: Remove TODO list.Libravatar Shawn O. Pearce1-44/+0
I'm apparently not very good at keeping my own TODO file current. I its also somewhat strange to keep the TODO list as part of the software branch, as its meta-information that is not directly related to the code. I'm pulling the TODO list from git-gui and moving it into a seperate branch. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-20Merge branch 'fk/autoconf'Libravatar Junio C Hamano1-6/+25
* fk/autoconf: New autoconf test for iconv
2007-02-21git-gui: Include browser in our usage message.Libravatar Shawn O. Pearce1-1/+1
Now that the 'browser' subcommand can be used to startup the tree browser, it should be listed as a possible subcommand option in our usage message. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-20Merge branch 'js/name-rev-fix'Libravatar Junio C Hamano1-7/+16
* js/name-rev-fix: name-rev: avoid "^0" when unneeded
2007-02-20prefixcmp(): fix-up leftover strncmp().Libravatar Junio C Hamano9-13/+13
There were instances of strncmp() that were formatted improperly (e.g. whitespace around parameter before closing parenthesis) that caused the earlier mechanical conversion step to miss them. This step cleans them up. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20prefixcmp(): fix-up mechanical conversion.Libravatar Junio C Hamano13-44/+44
Previous step converted use of strncmp() with literal string mechanically even when the result is only used as a boolean: if (!strncmp("foo", arg, 3)) ==> if (!(-prefixcmp(arg, "foo"))) This step manually cleans them up to read: if (!prefixcmp(arg, "foo")) Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20Mechanical conversion to use prefixcmp()Libravatar Junio C Hamano48-211/+211
This mechanically converts strncmp() to use prefixcmp(), but only when the parameters match specific patterns, so that they can be verified easily. Leftover from this will be fixed in a separate step, including idiotic conversions like if (!strncmp("foo", arg, 3)) => if (!(-prefixcmp(arg, "foo"))) This was done by using this script in px.perl #!/usr/bin/perl -i.bak -p if (/strncmp\(([^,]+), "([^\\"]*)", (\d+)\)/ && (length($2) == $3)) { s|strncmp\(([^,]+), "([^\\"]*)", (\d+)\)|prefixcmp($1, "$2")|; } if (/strncmp\("([^\\"]*)", ([^,]+), (\d+)\)/ && (length($1) == $3)) { s|strncmp\("([^\\"]*)", ([^,]+), (\d+)\)|(-prefixcmp($2, "$1"))|; } and running: $ git grep -l strncmp -- '*.c' | xargs perl px.perl Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20Add prefixcmp()Libravatar Junio C Hamano1-0/+5
We have too many strncmp(a, b, strlen(b)). Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20Merge branch 'maint'Libravatar Junio C Hamano1-21/+16
* maint: Check for PRIuMAX rather than NO_C99_FORMAT in fast-import.c.
2007-02-21git-gui: Change summary of git-gui.Libravatar Shawn O. Pearce1-1/+1
Since git-gui does more than create commits, it is unfair to call it "a commit creation tool". Instead lets just call it a graphical user interface. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-21git-gui: Display all authors of git-gui.Libravatar Shawn O. Pearce4-10/+136
Now that git-gui has been released to the public as part of Git 1.5.0 I am starting to see some work from other people beyond myself and Paul. Consequently the copyright for git-gui is not strictly the two of us anymore, and these others deserve to have some credit given to them. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-21git-gui: Use mixed path for docs on Cygwin.Libravatar Shawn O. Pearce1-1/+1
The Firefox browser requires that a URL use / to delimit directories. This is instead of \, as \ gets escaped by the browser into its hex escape code and then relative URLs are incorrectly resolved, Firefox no longer sees the directories for what they are. Since we are handing the browser a true URL, we better use the standard / for directories. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-02-20Check for PRIuMAX rather than NO_C99_FORMAT in fast-import.c.Libravatar Jason Riedy1-21/+16
Thanks to Simon 'corecode' Schubert <corecode@fs.ei.tum.de> for the clean-up. Defining the C99 standard PRIuMAX when necessary replaces UM_FMT and the awkward UM10_FMT. There are no direct C99 translations for other uses of NO_C99_FORMAT in git, alas. Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-20Link 1.5.0.1 documentation from the main page.Libravatar Junio C Hamano1-0/+4
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19name-rev: avoid "^0" when unneededLibravatar Johannes Schindelin1-7/+16
When naming by a tag, we used to add "^0" even if this was not really necessary. For example, `git name-rev de6f0def` now outputs de6f0def tags/v1.5.0.1~9 instead of de6f0def tags/v1.5.0.1^0~9 Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19apply: fix memory leak in prefix_one()Libravatar Johannes Schindelin1-6/+9
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19git-apply: require -p<n> when working in a subdirectory.Libravatar Junio C Hamano2-28/+46
git-apply running inside a subdirectory, with or without --index, used to always assume that the patch is formatted in such a way to apply with -p1 from the toplevel, but it is more useful and consistent with the use of "GNU patch -p1" if it defaulted to assume that its input is meant to apply at the level it is invoked in. This changes the behaviour. It used to be that the patch generated this way would apply without any trick: edit Documentation/Makefile git diff >patch.file cd Documentation git apply ../patch.file You need to give an explicit -p2 to git-apply now. On the other hand, if you got a patch from somebody else who did not follow "patch is to apply from the top with -p1" convention, the input patch would start with: diff -u Makefile.old Makefile --- Makefile.old +++ Makefile and in such a case, you can apply it with: git apply -p0 patch.file Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-19git-apply: do not lose cwd when run from a subdirectory.Libravatar Junio C Hamano1-4/+4
When a patch modifies (not deletes) the last file in a directory, because we treat a modification just as deletion followed by creation, and deleting the last file in a directory automatically rmdir(2)'s that directory, we ended up removing the directory, which can potentially be the cwd, and then recreating the same directory to create the patch result. Avoid the rmdir step when remove_file() is called only because we are replacing it with the result by later calling create_file(). Signed-off-by: Junio C Hamano <junkio@cox.net>