summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-10-03Merge branch 'js/rebase-i'Libravatar Junio C Hamano2-8/+23
* js/rebase-i: rebase -i: work on a detached HEAD
2007-10-03Merge branch 'jc/autogc'Libravatar Junio C Hamano11-14/+276
* jc/autogc: git-gc --auto: run "repack -A -d -l" as necessary. git-gc --auto: restructure the way "repack" command line is built. git-gc --auto: protect ourselves from accumulated cruft git-gc --auto: add documentation. git-gc --auto: move threshold check to need_to_gc() function. repack -A -d: use --keep-unreachable when repacking pack-objects --keep-unreachable Export matches_pack_name() and fix its return value Invoke "git gc --auto" from commit, merge, am and rebase. Implement git gc --auto
2007-10-03Merge branch 'je/hooks'Libravatar Junio C Hamano3-0/+100
* je/hooks: post-checkout hook, tests, and docs
2007-10-03Merge branch 'ap/dateformat'Libravatar Junio C Hamano6-24/+209
* ap/dateformat: Add a test script for for-each-ref, including test of date formatting dateformat: parse %(xxdate) %(yydate:format) correctly Make for-each-ref's grab_date() support per-atom formatting Make for-each-ref allow atom names like "<name>:<something>" parse_date_format(): convert a format name to an enum date_mode
2007-10-03Sync with GIT 1.5.3.4Libravatar Junio C Hamano15-29/+149
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-03GIT 1.5.3.4Libravatar Junio C Hamano2-11/+18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-03Add a test script for for-each-ref, including test of date formattingLibravatar Andy Parkins1-0/+151
Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-03Add test case for ls-files --with-treeLibravatar Carl Worth1-0/+71
This tests basic functionality and also exercises a bug noticed by Keith Packard, (prune_cache followed by add_index_entry can trigger an attempt to realloc a pointer into the middle of an allocated buffer). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Must not modify the_index.cache as it may be passed to realloc at some point.Libravatar Keith Packard1-1/+2
The index cache is not static, growing as new entries are added. If entries are added after prune_cache is called, cache will no longer point at the base of the allocation, and realloc will not be happy. I verified that this was the only place in the current source which modified any index_state.cache elements aside from the alloc/realloc calls in read-cache by changing the type of the element to 'struct cache_entry ** const cache' and recompiling. A more efficient patch would create a separate 'cache_base' value to track the allocation and then fix things up when reallocation was necessary, instead of the brute-force memmove used here. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02the ar tool is called gar on some systemsLibravatar Robert Schiele1-1/+1
Some systems that have only installed the GNU toolchain (prefixed with "g") do not provide "ar" but only "gar". Make configure find this tool as well. Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02rename diff_free_filespec_data_large() to diff_free_filespec_blob()Libravatar Junio C Hamano3-5/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02diffcore-rename: cache file deltasLibravatar Jeff King3-4/+11
We find rename candidates by computing a fingerprint hash of each file, and then comparing those fingerprints. There are inherently O(n^2) comparisons, so it pays in CPU time to hoist the (rather expensive) computation of the fingerprint out of that loop (or to cache it once we have computed it once). Previously, we didn't keep the filespec information around because then we had the potential to consume a great deal of memory. However, instead of keeping all of the filespec data, we can instead just keep the fingerprint. This patch implements and uses diff_free_filespec_data_large to accomplish that goal. We also have to change estimate_similarity not to needlessly repopulate the filespec data when we already have the hash. Practical tests showed 4.5x speedup for a 10% memory usage increase. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Mention 'cpio' dependency in INSTALLLibravatar Johan Herland1-0/+3
Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Make git-pull complain and give advice when there is nothing to merge withLibravatar Federico Mena Quintero1-4/+18
Signed-off-by: Federico Mena Quintero <federico@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Note that git-branch will not automatically checkout the new branchLibravatar Federico Mena Quintero1-0/+4
Signed-off-by: Federico Mena Quintero <federico@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Add documentation for --track and --no-track to the git-branch docs.Libravatar Federico Mena Quintero1-0/+15
Signed-off-by: Federico Mena Quintero <federico@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Say when --track is useful in the git-checkout docs.Libravatar Federico Mena Quintero1-1/+3
The documentation used to say what the option does, but it didn't mention a use case. Signed-off-by: Federico Mena Quintero <federico@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Fix typo in config.txtLibravatar Johannes Schindelin1-1/+1
There was an 'l' (ell) instead of a '1' (one) in one of the gitlinks. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02for-each-ref: fix %(numparent) and %(parent)Libravatar Junio C Hamano1-4/+6
The string value of %(numparent) was not returned correctly. Also %(parent) misbehaved for the root commits (returned garbage) and merge commits (returned first parent, followed by a space). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02dateformat: parse %(xxdate) %(yydate:format) correctlyLibravatar Junio C Hamano1-1/+1
Andy Parkins noticed that parsing of the above would not correctly notice that xxdate does not have any format specifier. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02git-commit: initialize TMP_INDEX just to be sure.Libravatar Junio C Hamano1-0/+1
We rely on TMP_INDEX variable to decide if we are doing a partial commit, as it is only set in the partial commit codepath. But the variable is never initialized. A stray environment variable from outside could ruin the day. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-01fixed link in documentation of diff-optionsLibravatar Steffen Prohaska1-2/+2
Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-01Merge branch 'maint'Libravatar Junio C Hamano4-8/+34
* maint: Whip post 1.5.3.3 maintenance series into shape. git stash: document apply's --index switch post-receive-hook: Remove the From field from the generated email header so that the pusher's name is used
2007-10-01Whip post 1.5.3.3 maintenance series into shape.Libravatar Junio C Hamano4-8/+30
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-01git stash: document apply's --index switchLibravatar Miklos Vajna1-1/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-01post-receive-hook: Remove the From field from the generated email header so ↵Libravatar Andy Parkins1-1/+0
that the pusher's name is used Using the name of the committer of the revision at the tip of the updated ref is not sensible. That information is available in the email itself should it be wanted, and by supplying a "From", we were effectively hiding the person who performed the push - which is useful information in itself. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-30Update stale documentation link in the k.org siteLibravatar Junio C Hamano1-0/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git.el: Reset the permission flags when changing a file state.Libravatar Alexandre Julliard1-17/+11
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git.el: Update a file status in the git buffer upon save.Libravatar Alexandre Julliard1-2/+16
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git.el: Do not print a status message on every git command.Libravatar Alexandre Julliard1-29/+41
Instead print a single message around sequences of commands that can potentially take some time. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git.el: Preserve file marks when doing a full refresh.Libravatar Alexandre Julliard1-12/+28
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29Fix adding a submodule with a remote urlLibravatar Daniel Barkalow1-1/+1
Without this, a non-path URL gets lost before the clone. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git-remote: exit with non-zero status after detecting error in "rm".Libravatar Jari Aalto1-3/+3
Exit with non-zero status when "git remote rm" was told to remove a non-existing remote. Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29Merge branch 'maint'Libravatar Junio C Hamano5-12/+22
* maint: git-remote: exit with non-zero status after detecting errors. rebase -i: squash should retain the authorship of the _first_ commit git-add--interactive: Improve behavior on bogus input git-add--interactive: Allow Ctrl-D to exit
2007-09-29git-remote: exit with non-zero status after detecting errors.Libravatar Jari Aalto1-4/+10
Some subcommands of "git-remote" detected and issued error messages but did not signal that to the calling process with exit status. Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29rebase -i: squash should retain the authorship of the _first_ commitLibravatar Johannes Schindelin3-3/+3
It was determined on the mailing list, that it makes more sense for a "squash" to keep the author of the first commit as the author for the result of the squash. Make it so. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29rebase -i: support single-letter abbreviations for the actionsLibravatar Johannes Schindelin1-4/+4
When you do many rebases, you can get annoyed by having to type out the actions "edit" or "squash" in total. This commit helps that, by allowing you to enter "e" instead of "edit", "p" instead of "pick", or "s" instead of "squash". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git-add--interactive: Improve behavior on bogus inputLibravatar Jean-Luc Herren1-4/+3
1) Previously, any menu would cause a perl error when entered '0', which is never a valid option. 2) Entering a bogus choice (like 998 or 4-2) surprisingly caused the same behavior as if the user had just hit 'enter', which means to carry out the selected action on the selected items. Entering such bogus input is now a no-op and the sub-menu doesn't exit. Signed-off-by: Jean-Luc Herren <jlh@gmx.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git-add--interactive: Allow Ctrl-D to exitLibravatar Jean-Luc Herren1-1/+6
Hitting Ctrl-D (EOF) is a common way to exit shell-like tools. When in a sub-menu it will still behave as if an empty line had been entered, carrying out the action on the selected items and returning to the previous menu. Signed-off-by: Jean-Luc Herren <jlh@gmx.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29post-checkout hook, tests, and docsLibravatar Josh England3-0/+100
Updated post-checkout hook to take a flag specifying whether the checkout is a branch checkout or a file checkout (from the index). Signed-off-by: Josh England <jjengla@sandia.gov> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29Make for-each-ref's grab_date() support per-atom formattingLibravatar Andy Parkins2-7/+26
grab_date() gets an extra parameter - atomname; this extra parameter is checked to see if it has a ":<format>" extra component in it, and if so that "<format>" string is passed to parse_date_format() to produce an enum date_mode value which is then further passed to show_date(). In short it allows the user of git-for-each-ref to do things like this: $ git-for-each-ref --format='%(taggerdate:default)' refs/tags/v1.5.2 Sun May 20 00:30:42 2007 -0700 $ git-for-each-ref --format='%(taggerdate:relative)' refs/tags/v1.5.2 4 months ago $ git-for-each-ref --format='%(taggerdate:short)' refs/tags/v1.5.2 2007-05-20 $ git-for-each-ref --format='%(taggerdate:local)' refs/tags/v1.5.2 Sun May 20 08:30:42 2007 $ git-for-each-ref --format='%(taggerdate:iso8601)' refs/tags/v1.5.2 2007-05-20 00:30:42 -0700 $ git-for-each-ref --format='%(taggerdate:rfc2822)' refs/tags/v1.5.2 Sun, 20 May 2007 00:30:42 -0700 The default, when no ":<format>" is specified is ":default", leaving the existing behaviour unchanged. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29Make for-each-ref allow atom names like "<name>:<something>"Libravatar Andy Parkins1-1/+10
In anticipation of supplying a per-field date format specifier, this patch makes parse_atom() in builtin-for-each-ref.c allow atoms that have a valid atom name (as determined by the valid_atom[] table) followed by a colon, followed by an arbitrary string. The arbitrary string is where the format for the atom will be specified. Note, if different formats are specified for the same atom, multiple entries will be made in the used_atoms table to allow them to be distinguished by the grab_XXXX() functions. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29parse_date_format(): convert a format name to an enum date_modeLibravatar Andy Parkins3-16/+22
Factor out the code to parse --date=<format> parameter to revision walkers into a separate function, parse_date_format(). This function is passed a string and converts it to an enum date_format: - "relative" => DATE_RELATIVE - "iso8601" or "iso" => DATE_ISO8601 - "rfc2822" => DATE_RFC2822 - "short" => DATE_SHORT - "local" => DATE_LOCAL - "default" => DATE_NORMAL In the event that none of these strings is found, the function die()s. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29Merge branch 'gr/smtp'Libravatar Junio C Hamano2-7/+31
* gr/smtp: send-email --smtp-server-port: allow overriding the default port
2007-09-29Merge branch 'ss/svnimport'Libravatar Junio C Hamano1-11/+12
* ss/svnimport: Fix pool handling in git-svnimport to avoid memory leaks.
2007-09-29Merge branch 'sv/svn'Libravatar Junio C Hamano2-4/+6
* sv/svn: git-svn: handle changed svn command-line syntax git-svn: fix test for trunk svn (transaction out of date) git-svn: fix test for trunk svn (commit message not needed)
2007-09-29Merge branch 'ml/submodule'Libravatar Junio C Hamano2-6/+50
* ml/submodule: git-submodule - allow a relative path as the subproject url
2007-09-29Merge branch 'jb/remote-rm'Libravatar Junio C Hamano3-0/+142
* jb/remote-rm: git-remote rm: add tests and minor fix-ups remote: document the 'rm' subcommand remote: add 'rm' subcommand
2007-09-29Merge branch 'jk/diff-rename'Libravatar Junio C Hamano3-4/+11
* jk/diff-rename: diffcore-rename: cache file deltas
2007-09-29Sync with GIT 1.5.3.3Libravatar Junio C Hamano10-40/+115
Signed-off-by: Junio C Hamano <gitster@pobox.com>