summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-05-28find_first_merges(): initialize merges variable using initializerLibravatar Michael Haggerty1-2/+1
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28fsck: don't put a void*-shaped peg in a char*-shaped holeLibravatar Michael Haggerty1-1/+1
The source of this nonsense was 04d3975937 fsck: reduce stack footprint , which wedged a pointer to parent into the object_array_entry's name field. The parent pointer was passed to traverse_one_object(), even though that function *didn't use it*. The useless code has been deleted over time. Commit a1cdc25172 fsck: drop unused parameter from traverse_one_object() removed the parent pointer from traverse_one_object()'s signature. Commit c0aa335c95 Remove unused variables removed the code that read the parent pointer back out of the name field. This commit takes the last step: don't write the parent pointer into the name field in the first place. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28object_array_remove_duplicates(): rewrite to reduce copyingLibravatar Michael Haggerty2-12/+26
The old version copied one entry to its destination position, then deleted any matching entries from the tail of the array. This required the tail of the array to be copied multiple times. It didn't affect the complexity of the algorithm because the whole tail has to be searched through anyway. But all the copying was unnecessary. Instead, check for the existence of an entry with the same name in the *head* of the list before copying an entry to its final position. This way each entry has to be copied at most one time. Extract a helper function contains_name() to do a bit of the work. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28revision: use object_array_filter() in implementation of gc_boundary()Libravatar Michael Haggerty1-17/+15
Use object_array_filter(), which will soon be made smarter about cleaning up discarded entries properly. Also add a function comment. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28object_array: add function object_array_filter()Libravatar Michael Haggerty2-0/+27
Add a function that allows unwanted entries in an object_array to be removed. This encapsulation is a step towards giving object_array ownership of its entries' name memory. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28revision: split some overly-long linesLibravatar Michael Haggerty2-17/+35
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28cmd_diff(): make it obvious which cases are exclusive of each otherLibravatar Michael Haggerty1-5/+4
At first glance the OBJ_COMMIT, OBJ_TREE, and OBJ_BLOB cases look like they might be mutually exclusive. But the OBJ_COMMIT case doesn't end the loop iteration with "continue" like the other two cases, but rather falls through. So use if...else if...else construct to make it more obvious that only the last two cases are mutually exclusive. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28cmd_diff(): rename local variable "list" -> "entry"Libravatar Michael Haggerty1-4/+4
It's not a list, it's an array entry. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28cmd_diff(): use an object_array for holding treesLibravatar Michael Haggerty1-19/+18
Change cmd_diff() to use a (struct object_array) for holding the trees that it accumulates, rather than rolling its own equivalent. Incidentally, this change removes a hard-coded limit of 100 trees in combined diff, not that it matters in practice. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28builtin_diff_tree(): make it obvious that function wants two entriesLibravatar Michael Haggerty1-9/+10
Instead of accepting an array and using exactly two elements from the array, take two single (struct object_array_entry *) arguments. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28add_rev_cmdline(): make a copy of the name argumentLibravatar Michael Haggerty1-1/+5
Instead of assuming that the memory pointed to by the name argument will live forever, make a local copy of it before storing it in the ref_cmdline_info. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28fetch: make own copies of refnamesLibravatar Michael Haggerty1-2/+2
Do not retain references to refnames passed to the each_ref_fn callback add_existing(), because their lifetime is not guaranteed. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28describe: make own copy of refnameLibravatar Michael Haggerty1-2/+4
Do not retain a reference to the refname passed to the each_ref_fn callback get_name(), because there is no guarantee of the lifetimes of these names. Instead, make a local copy when needed. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-21remote-hg: fix order of configuration commentsLibravatar Felipe Contreras1-3/+3
The other configurations were added in the wrong place. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-21remote-hg: trivial configuration note cleanupLibravatar Felipe Contreras1-1/+1
Follow the style of the previous configurations. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-21completion: regression fix for zshLibravatar Felipe Contreras1-1/+1
zsh completion wrapper doesn't reimplement __gitcompadd(). Although it should be trivial to do that, let's use __gitcomp_nl() which achieves exactly the same thing, specially since the suffix ($4) has to be empty. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-20Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano3-6/+97
* git://git.bogomips.org/git-svn: git-svn: introduce --parents parameter for commands branch and tag git-svn: clarify explanation of --destination argument git-svn: multiple fetch/branches/tags keys are supported
2013-05-20git-svn: introduce --parents parameter for commands branch and tagLibravatar Tobias Schulte3-1/+71
This parameter is equivalent to the parameter --parents on svn cp commands and is useful for non-standard repository layouts. Signed-off-by: Tobias Schulte <tobias.schulte@gliderpilot.de> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-05-20git-svn: clarify explanation of --destination argumentLibravatar Jonathan Nieder1-5/+14
The existing documentation for "-d" does not make it obvious whether its argument is supposed to be a full svn path, a partial svn path, the glob from the config file, or what. Clarify the text and add an example to get the reader started. Reported-by: Nathan Gray <n8gray@n8gray.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-05-20git-svn: multiple fetch/branches/tags keys are supportedLibravatar Nathan Gray1-0/+12
"git svn" can be configured to use multiple fetch, branches, and tags refspecs by passing multiple --branches or --tags options at init time or editing the configuration file later, which can be handy when working with messy Subversion repositories. Add a note to the configuration section documenting how this works. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-05-20remote-hg: set stdout to binary mode on win32Libravatar Amit Bakshi1-0/+4
git clone hangs on windows, and file.write would return errno 22 inside of mercurial's windows.winstdout wrapper class. This patch sets stdout's mode to binary, fixing both issues. [fc: cleaned up] Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17Git 1.8.3-rc3Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17Merge branch 'fc/doc-style'Libravatar Junio C Hamano20-47/+37
* fc/doc-style: documentation: trivial style cleanups
2013-05-17Merge branch 'dw/asciidoc-sources-are-dot-txt-files'Libravatar Junio C Hamano1-2/+4
* dw/asciidoc-sources-are-dot-txt-files: CodingGuidelines: Documentation/*.txt are the sources
2013-05-17documentation: trivial style cleanupsLibravatar Felipe Contreras20-47/+37
White-spaces, missing braces, standardize --[no-]foo. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17Merge git://ozlabs.org/~paulus/gitkLibravatar Junio C Hamano1-295/+338
* git://ozlabs.org/~paulus/gitk: gitk: Update Swedish translation (304t)
2013-05-17difftool: fix dir-diff when file does not exist in working treeLibravatar John Keeping2-0/+13
Commit 02c5631 (difftool --dir-diff: symlink all files matching the working tree, 2013-03-14) does not handle the case where a file that is being compared does not exist in the working tree. Fix this by checking for existence explicitly before running git-hash-object. Reported-by: Kevin Bracey <kevin@bracey.fi> Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17remote-bzr: fixes for older versions of bzrLibravatar Felipe Contreras1-2/+4
Down to v2.0, by using older but still valid interfaces. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17remote-bzr: fix old organization destroyLibravatar Sandor Bodo-Merle1-0/+2
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17gitk: Update Swedish translation (304t)Libravatar Peter Krefting1-295/+338
Signed-off-by: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Paul Mackerras <paulus@samba.org>
2013-05-16Revert "remote-hg: update bookmarks when pulling"Libravatar Felipe Contreras1-3/+0
This reverts commit 24317ef32ac3111ed00792f9b2921dc19dd28fe2. Different versions of Mercurial have different arguments for bookmarks.updatefromremote(), while it should be possible to call the right function with the right arguments depending on the version, it's safer to restore the old behavior for now. Reported by Rodney Lorrimar. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-16git-submodule.txt: Clarify 'init' and 'add' subcommands.Libravatar Dale R. Worley1-2/+6
Describe how 'add' sets the submodule's logical name, which is used in the configuration entry names. Clarify that 'init' only sets up the configuration entries for submodules that have already been added elsewhere. Describe that <path> arguments limit the submodules that are configured. Signed-off-by: Dale Worley <worley@ariadne.com> Acked-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-16remote-bzr: fix cloning of non-listable reposLibravatar Felipe Contreras1-0/+3
Commit 95b0c60 (remote-bzr: add support for bzr repos) introduced a regression by assuming all bzr remote repos are listable, but they are not. If they are not listable they are basically useless, so let's assume there is no bzr repo. Reported-by: Thorsten Kranzkowski <dl8bcu@dl8bcu.de> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15Merge branch 'fc/remote-hg' (early part)Libravatar Junio C Hamano2-24/+22
* 'fc/remote-hg' (early part): remote-hg: update bookmarks when pulling remote-hg: don't push fake 'master' bookmark remote-hg: disable forced push by default remote-hg: fix new branch creation remote-hg: add new get_config_bool() helper remote-hg: enable track-branches in hg-git mode remote-hg: get rid of unused exception checks remote-hg: trivial cleanups
2013-05-15remote-hg: update bookmarks when pullingLibravatar Felipe Contreras1-0/+3
Otherwise, the user would never ever see new bookmarks, only the ones that (s)he initially cloned. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15remote-hg: don't push fake 'master' bookmarkLibravatar Felipe Contreras1-1/+2
We skip it locally, but not for the remote, so let's do so. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15remote-hg: disable forced push by defaultLibravatar Felipe Contreras1-1/+1
In certain situations we might end up pushing garbage revisions (e.g. in a rebase), and the patches to deal with that haven't been merged yet. So let's disable forced pushes by default. We are essentially reverting back to the old v1.8.2 behavior, to minimize the possibility of regressions, but in a way the user can configure. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15remote-hg: fix new branch creationLibravatar Felipe Contreras1-1/+1
When a user creates a new branch with git: % git checkout -b branches/devel and then pushes this branch % git push origin branches/devel which is the way to push new mercurial branches, we do want to create a branch, but the command would fail without newbranch=True. This only matters when force_push=False, but setting newbranch=True unconditionally does not hurt. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15remote-hg: add new get_config_bool() helperLibravatar Felipe Contreras1-11/+13
No functional changes. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15remote-hg: enable track-branches in hg-git modeLibravatar Felipe Contreras2-1/+1
The user can turn this off. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15remote-hg: get rid of unused exception checksLibravatar Felipe Contreras1-15/+9
Remove try/except check because we are no longer calling check_output(), which may throw an exception. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15remote-hg: trivial cleanupsLibravatar Felipe Contreras2-3/+1
Drop unused "global", and remove redundant comparison of two files. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-14remote-bzr: update old organizationLibravatar Felipe Contreras1-0/+7
If a clone exists with the old organization (v1.8.2) it will prevent the new shared bzr repository organization from working, so let's remove this repository, which is not used any more. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-13Git 1.8.3-rc2Libravatar Junio C Hamano2-4/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-13Merge git://ozlabs.org/~paulus/gitkLibravatar Junio C Hamano1-55/+199
* git://ozlabs.org/~paulus/gitk: gitk: On OSX, bring the gitk window to front gitk: Add support for -G'regex' pickaxe variant gitk: Add menu item for reverting commits gitk: Simplify file filtering gitk: Display the date of a tag in a human-friendly way gitk: Improve behaviour of drop-down lists gitk: Move hard-coded colors to .gitk
2013-05-13gitk: On OSX, bring the gitk window to frontLibravatar Tair Sabirgaliev1-0/+9
On OSX, Tcl/Tk application windows are created behind all the applications down the stack of windows. This is very annoying, because once a gitk window appears, it's the downmost window and switching to it is pain. The patch is: if we are on OSX, use osascript to bring the current Wish process window to front. Signed-off-by: Tair Sabirgaliev <tair.sabirgaliev@gmail.com> Thanks-to: Stefan Haller <lists@haller-berlin.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
2013-05-13gitk: Add support for -G'regex' pickaxe variantLibravatar Martin Langhoff1-1/+4
git log -G'regex' is a very useful alternative to the classic pickaxe. Minimal patch to make it usable from gitk. [zj: reword message] [paulus@samba.org: reword droplist item] Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Paul Mackerras <paulus@samba.org>
2013-05-11test-bzr: do not use unportable sed '\+'Libravatar Torsten Bögershausen1-1/+1
Using sed -e '/[0-9]\+//' to find "one or more digits" is not portable. Use the Basic Regular Expression '/[0-9][0-9]*//' instead. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-11Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano9-7/+196
* git://git.bogomips.org/git-svn: git-svn: added an --include-path flag Git::SVN::*: add missing "NAME" section to perldoc git-svn: avoid self-referencing mergeinfo
2013-05-11gitk: Add menu item for reverting commitsLibravatar Knut Franke1-0/+62
Sometimes it's helpful (at least psychologically) to have this feature easily accessible. Code borrows heavily from cherrypick. Signed-off-by: Knut Franke <Knut.Franke@gmx.de> Signed-off-by: Paul Mackerras <paulus@samba.org>