summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)AuthorFilesLines
2007-07-17git-p4: input to "p4 files" by stdin instead of argumentsLibravatar Scott Lamb1-21/+7
This approach, suggested by Alex Riesen, bypasses the need for xargs-style argument list handling. The handling in question looks broken in a corner case with SC_ARG_MAX=4096 and final argument over 96 characters. Signed-off-by: Scott Lamb <slamb@slamb.org> Signed-off-by: Simon Hausmann <simon@lst.de>
2007-07-17git-p4: use subprocess in p4CmdListLibravatar Scott Lamb1-5/+18
This allows bidirectional piping - useful for "-x -" to avoid commandline arguments - and is a step toward bypassing the shell. Signed-off-by: Scott Lamb <slamb@slamb.org> Signed-off-by: Simon Hausmann <simon@lst.de>
2007-07-14Use $(RM) in Makefiles instead of 'rm -f'Libravatar Emil Medve1-1/+2
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-14Merge branch 'master' of git://repo.or.cz/git/fastimportLibravatar Junio C Hamano1-1/+5
* 'master' of git://repo.or.cz/git/fastimport: Teach fast-import to recursively copy files/directories Fix git-p4 on Windows to not use the Posix sysconf function. Correct trivial typo in fast-import documentation
2007-07-14Fix git-p4 on Windows to not use the Posix sysconf function.Libravatar Marius Storm-Olsen1-1/+5
Add condition for Windows, since it doesn't support the os.sysconf module. We hardcode the commandline limit to 2K, as that should work on most Windows platforms. Signed-off-by: Marius Storm-Olsen <marius@trolltech.com> Acked-by: Simon Hausmann <simon@lst.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-07-14Add contrib/stats/mailmap.pl scriptLibravatar Junio C Hamano1-0/+38
This script reads the existing commit log and .mailmap file, and outputs author e-mail addresses that would map to more than one names (most likely due to difference in the way they are spelled, but some are due to ancient botched commits). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-12Add missing functions to contrib/emacs/vc-git.elLibravatar David Kastrup1-0/+65
This is necessary to make several editing functions work, like C-u C-x v = Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-12Correct shebang line for contrib/stats/packinfo.plLibravatar Brian Downing1-1/+1
"/bin/perl"? What was I thinking? Signed-off-by: Brian Downing <bdowning@lavos.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-12script to display a distribution of longest common hash prefixesLibravatar Nicolas Pitre1-0/+26
This script was originally posted on the git mailing list by Randal L. Schwartz <merlyn@stonehenge.com>. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-11Pack information toolLibravatar Brian Downing1-0/+212
This tool will print vaguely pretty information about a pack. It expects the output of "git-verify-pack -v" as input on stdin. $ git-verify-pack -v | packinfo.pl See the documentation in the script (contrib/stats/packinfo.pl) for more information. Signed-off-by: Brian Downing <bdowning@lavos.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-06Enable "git rerere" by the config variable rerere.enabledLibravatar Johannes Schindelin1-2/+1
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-02Rewrite "git-frotz" to "git frotz"Libravatar Junio C Hamano3-23/+23
This uses the remove-dashes target to replace "git-frotz" to "git frotz". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26Merge branch 'master' of git://repo.or.cz/git/fastimportLibravatar Junio C Hamano1-0/+3
* 'master' of git://repo.or.cz/git/fastimport: Teach bash how to complete +refspec on git-push
2007-06-26git-new-workdir: Fix shell warning about operator == used with test.Libravatar Simon Hausmann1-1/+1
Use = instead of == with test to test for equality. Signed-off-by: Simon Hausmann <simon@lst.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-24Teach bash how to complete +refspec on git-pushLibravatar Shawn O. Pearce1-0/+3
Using `git push origin +foo` to forcefully overwrite the remote branch named foo is a common idiom, especially since + is shorter than the long option --force and can be specified on a per-branch basis. We now complete `git push origin +foo` just like we do the standard `git push origin foo`. The leading + on a branch refspec does not alter the completion. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-24new-workdir: handle rev-parse --git-dir not always giving full pathLibravatar Julian Phillips1-0/+5
rev-parse --git-dir outputs a full path - except for the single case of when the path would be $(pwd)/.git, in which case it outputs simply .git. Check for this special case and handle it. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-22Import branch 'git-p4' of git://repo.or.cz/fast-exportLibravatar Shawn O. Pearce3-0/+1737
Simon has asked that the git.git project include the git-p4 project as at least a contrib/fast-import within git.git. I think it makes a lot of sense, as git-p4 nicely complements the only other in-tree fast-import user: import-tars.perl. git-p4 is offered under the MIT license by its authors.
2007-06-22Avoid src:dst syntax as default bash completion for git pushLibravatar Shawn O. Pearce1-1/+1
Raimund Bauer just discovered that the default bash completion for a local branch name in a git-push line is not the best choice when the branch does not exist on the remote system. In the past we have always completed the local name 'test' as "test:test", indicating that the destination name is the same as the local name. But this fails when "test" does not yet exist on the remote system, as there is no "test" branch for it to match the name against. Fortunately git-push does the right thing when given just the local branch, as it assumes you want to use the same name in the destination repository. So we now offer "test" as the completion in a git-push line, and let git-push assume that is also the remote branch name. We also still support the remote branch completion after the :, but only if the user manually adds the colon before trying to get a completion. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-22Make it possible to specify the HEAD for the internal ↵Libravatar Simon Hausmann1-2/+2
findUpstreamBranchPoint function. This isn't used right now in git-p4 but I use it in an external script that loads git-p4 as module. Signed-off-by: Simon Hausmann <shausman@trolltech.com>
2007-06-20Added git-p4 branches command that shows the mapping of perforce depot paths ↵Libravatar Simon Hausmann1-1/+27
to imported git branches. Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-17Warn about conflicting p4 branch mappings and use the first one found.Libravatar Simon Hausmann1-0/+6
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-17Fix the branch mapping detection to be independent from the order of the "p4 ↵Libravatar Simon Hausmann1-3/+13
branches" output. Collect "unknown" source branches separately and register them at the end. Also added a minor speed up to splitFilesIntoBranches by breaking out of the loop through all branches when it's safe. Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-16git-p4 fails when cloning a p4 depo.Libravatar Benjamin Sergeant1-3/+17
A perforce command with all the files in the repo is generated to get all the file content. Here is a patch to break it into multiple successive perforce command who uses 4K of parameter max, and collect the output for later. It works, but not for big depos, because the whole perforce depo content is stored in memory in P4Sync.run(), and it looks like mine is bigger than 2 Gigs, so I had to kill the process. [Simon: I added the bit about using SC_ARG_MAX, as suggested by Han-Wen] Signed-off-by: Benjamin Sergeant <bsergean@gmail.com> Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-16Fix initial multi-branch import.Libravatar Simon Hausmann1-0/+1
The list of existing p4 branches in git wasn't initialized. Signed-off-by: Simon Hausmann <shausman@trolltech.com>
2007-06-13gitview: run blame with -C -CLibravatar Aneesh Kumar K.V1-1/+1
pass -C -C option to git-blame so that blame browsing works when the data is copied over from other files. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-13gitview: Fix the blame interface.Libravatar Aneesh Kumar K.V1-1/+18
The async reading from the pipe was skipping some of the input lines. Fix the same by making sure that we add the partial content of the previous read to the newly read data. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12Only use double quotes on WindowsLibravatar Marius Storm-Olsen1-1/+1
Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
2007-06-12Fix git-p4 rebase to detect the correct upstream branch instead of ↵Libravatar Simon Hausmann1-2/+10
unconditionally always rebasing on top of remotes/p4/master Signed-off-by: Simon Hausmann <shausman@trolltech.com>
2007-06-12Moved the code from git-p4 submit to figure out the upstream branch pointLibravatar Simon Hausmann1-19/+26
into a separate helper method. Signed-off-by: Simon Hausmann <shausman@trolltech.com>
2007-06-11git-p4 submit: Fix missing quotes around p4 commands to make them work with ↵Libravatar Simon Hausmann1-3/+3
spaces in filenames Noticed by Alex Riesen Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-11Mention remotes/p4/master also in the documentation.Libravatar Simon Hausmann1-3/+3
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-11Provide some information for single branch imports where the commits goLibravatar Simon Hausmann1-1/+4
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-11git-p4: check for existence of repo dir before trying to createLibravatar Kevin Green1-1/+2
When using git-p4 in this manner: git-p4 clone //depot/path/project myproject If "myproject" already exists as a dir, but not a valid git repo, it fails to create the directory. Signed-off-by: Kevin Green <Kevin.Green@morganstanley.com>
2007-06-11Write out the options tag in the log message of imports only if we actually haveLibravatar Simon Hausmann1-6/+5
options Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-11Fix support for explicit disabling of syncing with the originLibravatar Simon Hausmann1-0/+2
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-11Fix depot-paths encoding for multi-path imports (don't split up ↵Libravatar Simon Hausmann1-1/+1
//depot/path/foo) Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-11Fix project name guessingLibravatar Simon Hausmann1-1/+6
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-10Fix updating/creating remotes/p4/* heads from origin/p4/*Libravatar Simon Hausmann1-4/+6
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-10Fixed the check to make sure to exclude the HEAD symbolic refs when updatingLibravatar Simon Hausmann1-1/+1
the remotes/p4 branches from origin. Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-08also strip p4/ from local imports.Libravatar Han-Wen Nienhuys1-3/+3
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-06-08Merge branch 'master' of git://repo.or.cz/fast-exportLibravatar Han-Wen Nienhuys1-32/+57
2007-06-08print error message when p4 print fails (eg. due to permission problems)Libravatar Han-Wen Nienhuys1-0/+5
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-06-08gitview: Define __slots__ for CommitLibravatar Michael Ellerman1-0/+3
Define __slots__ for the Commit class. This reserves space in each Commit object for only the defined variables. On my system this reduces heap usage when viewing a kernel repo by 12% ~= 55868 KB. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-08gitview: Use new-style classesLibravatar Michael Ellerman1-4/+4
This changes the Commit class to use new-style class, which has been available since Python 2.2 (Dec 2001). This is a necessary step in order to use __slots__[] declaration, so that we can reduce the memory footprint in the next patch. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-08Only get the expensive branch mapping from the p4 server when notLibravatar Simon Hausmann1-5/+5
syncing with the help of an origin remote (which we instead then use to get new branches from). Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-07Make git-p4 submit detect the correct reference (origin) branch whenLibravatar Simon Hausmann1-14/+24
working with multi-branch imports. Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-07Make clone behave like git clone by default again.Libravatar Simon Hausmann1-0/+5
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-06-07Exclude the HEAD symbolic ref from the list of known branchesLibravatar Marius Storm-Olsen1-1/+1
Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
2007-06-07Fix single branch import into remotesLibravatar Marius Storm-Olsen1-2/+2
Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
2007-06-07Fix git-p4 clone (defaultDestination)Libravatar Marius Storm-Olsen1-1/+1
Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>