summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-02-25t3301-notes: insert a shbang line in ./fake_editor.shLibravatar Johannes Sixt1-0/+1
This is required on Windows because git-notes is now a built-in rather than a shell script. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-16Merge branch 'maint-1.6.5' into maint-1.6.6Libravatar Junio C Hamano4-4/+17
* maint-1.6.5: dwim_ref: fix dangling symref warning stash pop: remove 'apply' options during 'drop' invocation diff: make sure --output=/bad/path is caught
2010-02-16dwim_ref: fix dangling symref warningLibravatar Jeff King1-2/+1
If we encounter a symref that is dangling, in most cases we will warn about it. The one exception is a dangling HEAD, as that indicates a branch yet to be born. However, the check in dwim_ref was not quite right. If we were fed something like "HEAD^0" we would try to resolve "HEAD", see that it is dangling, and then check whether the _original_ string we got was "HEAD" (which it wasn't in this case). And that makes no sense; the dangling thing we found was not "HEAD^0" but rather "HEAD". Fixing this squelches a scary warning from "submodule summary HEAD" (and consequently "git status" with status.submodulesummary set) in an empty repo, as the submodule script calls "git rev-parse -q --verify HEAD^0". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-15stash pop: remove 'apply' options during 'drop' invocationLibravatar Thomas Rast2-2/+14
The 'git stash pop' option parsing used to remove the first argument in --index mode. At the time this was implemented, this first argument was always --index. However, since the invention of the -q option in fcdd0e9 (stash: teach quiet option, 2009-06-17) you can cause an internal invocation of git stash drop --index by running git stash pop -q --index which then of course fails because drop doesn't know --index. To handle this, instead let 'git stash apply' decide what the future argument to 'drop' should be. Warning: this means that 'git stash apply' must parse all options that 'drop' can take, and deal with them in the same way. This is currently true for its only option -q. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-15diff: make sure --output=/bad/path is caughtLibravatar Larry D'Anna1-0/+2
The return value from fopen wasn't being checked. Signed-off-by: Larry D'Anna <larry@elder-gods.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-15Remove hyphen from "git-command" in two error messagesLibravatar Pete Harlan2-2/+2
Signed-off-by: Pete Harlan <pgit@pcharlan.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-14fix minor memory leak in get_tree_entry()Libravatar René Scharfe1-0/+1
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-12Fix typo in 1.6.6.2 release notesLibravatar Junio C Hamano1-1/+1
Of course, these are changes since 1.6.6.1; changes since 1.6.6.2 would have been nil. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-12Re-fix check-ref-format documentation mark-upLibravatar Junio C Hamano1-1/+1
It is not double-backslash we forbid; backslashes are forbidden since a4c2e699 (Disallow '\' in ref names, 2009-05-08) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-11filter-branch: Fix error message for --prune-empty --commit-filterLibravatar Jacob Helwig1-1/+1
Running filter-branch with --prune-empty and --commit-filter reports: "Cannot set --prune-empty and --filter-commit at the same time". Change it to use the correct option name: --commit-filter Signed-off-by: Jacob Helwig <jacob.helwig@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-10Git 1.6.6.2Libravatar Junio C Hamano4-3/+50
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-10Merge branch 'maint-1.6.5' into maintLibravatar Junio C Hamano1-2/+4
* maint-1.6.5: t8003: check exit code of command and error message separately
2010-02-10t8003: check exit code of command and error message separatelyLibravatar Junio C Hamano1-2/+4
Shell reports exit status only from the most downstream command in a pipeline. In these tests, we want to make sure that the command fails in a controlled way, and produces a correct error message. This issue was known by Jay who submitted the patch, and also was pointed out by Hannes during the review process, but I forgot to fix it up before applying. Sorry about that. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-10Merge branch 'sp/maint-fast-import-large-blob' into maintLibravatar Junio C Hamano5-20/+227
* sp/maint-fast-import-large-blob: fast-import: Stream very large blobs directly to pack
2010-02-10Merge branch 'gp/maint-cvsserver' into maintLibravatar Junio C Hamano1-1/+1
* gp/maint-cvsserver: git-cvsserver: allow regex metacharacters in CVSROOT
2010-02-10Merge branch 'jc/maint-reflog-bad-timestamp' into maintLibravatar Junio C Hamano4-10/+86
* jc/maint-reflog-bad-timestamp: t0101: use a fixed timestamp when searching in the reflog Update @{bogus.timestamp} fix not to die() approxidate_careful() reports errorneous date string
2010-02-10Merge branch 'il/maint-xmallocz' into maintLibravatar Junio C Hamano4-10/+15
* il/maint-xmallocz: Fix integer overflow in unpack_compressed_entry() Fix integer overflow in unpack_sha1_rest() Fix integer overflow in patch_delta() Add xmallocz()
2010-02-10Merge branch 'jh/maint-config-file-prefix' into maintLibravatar Junio C Hamano2-1/+12
* jh/maint-config-file-prefix: builtin-config: Fix crash when using "-f <relative path>" from non-root dir
2010-02-10Merge branch 'nd/include-termios-for-osol' into maintLibravatar Junio C Hamano1-0/+1
* nd/include-termios-for-osol: Add missing #include to support TIOCGWINSZ on Solaris
2010-02-10Merge branch 'jc/maint-1.6.1-checkout-m-custom-merge' into maintLibravatar Junio C Hamano2-1/+58
* jc/maint-1.6.1-checkout-m-custom-merge: checkout -m path: fix recreating conflicts Conflicts: t/t7201-co.sh
2010-02-10Merge branch 'rs/maint-archive-match-pathspec' into maintLibravatar Junio C Hamano1-1/+24
* rs/maint-archive-match-pathspec: archive: complain about path specs that don't match anything
2010-02-10check-ref-format documentation: fix enumeration mark-upLibravatar Junio C Hamano1-1/+1
The last item in the enumerated refname rule was mistakenly made into a sub-item of the 7th one. It should be the 8th one in the list on its own. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-08Merge branch 'maint-1.6.5' into maintLibravatar Junio C Hamano2-1/+9
* maint-1.6.5: blame: prevent a segv when -L given start > EOF
2010-02-08blame: prevent a segv when -L given start > EOFLibravatar Jay Soffian2-1/+9
blame would segv if given -L <lineno> with <lineno> past the end of the file. While we're fixing the bug, add test cases for an invalid <start> when called as -L <start>,<end> or -L<start>. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-08Merge branch 'jc/maint-push-doc-status' into maintLibravatar Junio C Hamano1-5/+10
* jc/maint-push-doc-status: git-push: document all the status flags used in the output
2010-02-08git-push: document all the status flags used in the outputLibravatar Junio C Hamano1-5/+10
We didn't talk about '-' (deletion), '*' (addition), nor '+' (forced). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-08Merge branch 'jc/maint-imap-config-parse' into maintLibravatar Junio C Hamano1-7/+8
* jc/maint-imap-config-parse: Fix parsing of imap.preformattedHTML and imap.sslverify
2010-02-08Fix parsing of imap.preformattedHTML and imap.sslverifyLibravatar Junio C Hamano1-7/+8
These two variables are boolean and can lack "= value" in the configuration file. Do not reject such input early in the parser callback function. Also the key are downcased before being given to the callback, so we should run strcmp() with keyword spelled in all-lowercase. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-08Merge branch 'jc/maint-doc-git-add-example' into maintLibravatar Junio C Hamano1-1/+1
* jc/maint-doc-git-add-example: git-add documentation: Fix shell quoting example
2010-02-08git-add documentation: Fix shell quoting exampleLibravatar Junio C Hamano1-1/+1
When 921177f (Documentation: improve "add", "pull" and "format-patch" examples, 2008-05-07) converted this from enumeration header to displayed text, it failed to adjust for the AsciiDoc's rule to quote backslashes. In displayed text, backslash is shown verbatim, while in enumeration header, we need to double it. We have a similar construct in git-rm.txt documentation, and need to be careful when somebody wants to update it to match the style of the "git add" example. Noticed by: Greg Bacon <gbacon@dbresearch.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-07archive: simplify archive format guessingLibravatar René Scharfe2-18/+26
The code to guess an output archive's format consumed any --format options and built a new one. Jonathan noticed that it does so in an unsafe way, risking to overflow the static buffer fmt_opt. Change the code to keep the existing --format options intact and to only add a new one if a format could be guessed based on the output file name. The new option is added as the first one, allowing the existing ones to overrule it, i.e. explicit --format options given on the command line win over format guesses, as before. To simplify the code further, format_from_name() is changed to return the full --format option, thus no potentially dangerous sprintf() calls are needed any more. Reported-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-05Update git fsck --full short description to mention packsLibravatar Wesley J. Landaker1-1/+1
The '--full' option to git fsck does two things: 1) Check objects in packs 2) Check alternate objects This is documented in the git fsck manual; this patch reflects that in the short git fsck option help message as well. Signed-off-by: Wesley J. Landaker <wjl@icecavern.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-05Merge branch 'jc/maint-limit-note-output' into maintLibravatar Junio C Hamano8-1/+85
* jc/maint-limit-note-output: Fix "log --oneline" not to show notes Fix "log" family not to be too agressive about showing notes
2010-02-01fast-import: Stream very large blobs directly to packLibravatar Shawn O. Pearce5-20/+227
If a blob is larger than the configured big-file-threshold, instead of reading it into a single buffer obtained from malloc, stream it onto the end of the current pack file. Streaming the larger objects into the pack avoids the 4+ GiB memory footprint that occurs when fast-import is processing 2+ GiB blobs. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-01Merge branch 'sb/maint-octopus' into maint-1.6.5Libravatar Junio C Hamano2-9/+57
* sb/maint-octopus: octopus: remove dead code octopus: reenable fast-forward merges octopus: make merge process simpler to follow
2010-02-01Merge branch 'bg/maint-add-all-doc' into maint-1.6.5Libravatar Junio C Hamano2-29/+88
* bg/maint-add-all-doc: git-rm doc: Describe how to sync index & work tree git-add/rm doc: Consistently back-quote Documentation: 'git add -A' can remove files
2010-01-29Merge branch 'maint-1.6.5' into maintLibravatar Junio C Hamano1-1/+1
* maint-1.6.5: fix memcpy of overlapping area
2010-01-29fix memcpy of overlapping areaLibravatar Jeff King1-1/+1
Caught by valgrind in t5500, but it is pretty obvious from reading the code that this is shifting elements of an array to the left, which needs memmove. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-28bash: don't offer remote transport helpers as subcommandsLibravatar SZEDER Gábor1-0/+1
Since commits a2d725b7 (Use an external program to implement fetching with curl, 2009-08-05) and c9e388bb (Make the "traditionally-supported" URLs a special case, 2009-09-03) remote transport helpers like 'remote-ftp' and 'remote-curl' are offered by the completion script as available subcommands. Not good, since they are helpers, therefore should not be offered, so filter them out. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-27t0101: use a fixed timestamp when searching in the reflogLibravatar Junio C Hamano1-2/+2
That will give us a better reproducibility during tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-27Update @{bogus.timestamp} fix not to die()Libravatar Junio C Hamano1-2/+2
The caller will say "It is not a valid object name" if it wants to, and some callers may even try to see if it names an object and otherwise try to see if it is a path. Pointed out by Jeff King. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26approxidate_careful() reports errorneous date stringLibravatar Junio C Hamano4-10/+86
For a long time, the time based reflog syntax (e.g. master@{yesterday}) didn't complain when the "human readable" timestamp was misspelled, as the underlying mechanism tried to be as lenient as possible. The funny thing was that parsing of "@{now}" even relied on the fact that anything not recognized by the machinery returned the current timestamp. Introduce approxidate_careful() that takes an optional pointer to an integer, that gets assigned 1 when the input does not make sense as a timestamp. As I am too lazy to fix all the callers that use approxidate(), most of the callers do not take advantage of the error checking, but convert the code to parse reflog to use it as a demonstration. Tests are mostly from Jeff King. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26Fix integer overflow in unpack_compressed_entry()Libravatar Ilari Liusvaara1-2/+1
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26Fix integer overflow in unpack_sha1_rest()Libravatar Ilari Liusvaara1-2/+1
[jc: later NUL termination by the caller becomes unnecessary] Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26Fix integer overflow in patch_delta()Libravatar Ilari Liusvaara1-2/+1
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26Add xmallocz()Libravatar Ilari Liusvaara2-4/+12
Add routine for allocating NUL-terminated memory block without risking integer overflow in addition of +1 for NUL byte. [jc: with suggestion from Bill Lear] Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26git-cvsserver: allow regex metacharacters in CVSROOTLibravatar Gerrit Pape1-1/+1
When run in a repository with a path name containing regex metacharacters (e.g. +), git-cvsserver failed to split the client request into CVSROOT and module. Now metacharacters are disabled for the value of CVSROOT in the perl regex so that directory names containing metacharacters are handled properly. Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-26builtin-config: Fix crash when using "-f <relative path>" from non-root dirLibravatar Johan Herland2-1/+12
When your current directory is not at the root of the working tree, and you use the "-f" option with a relative path, the current code tries to read from a wrong file, since argv[2] is now beyond the end of the rearranged argument list. This patch replaces the incorrect argv[2] with the variable holding the given config file name. The bug was introduced by d64ec16 (git config: reorganize to use parseopt). [jc: added test] Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-24Merge branch 'maint' of git://git.spearce.org/git-gui into maintLibravatar Junio C Hamano5-23/+48
* 'maint' of git://git.spearce.org/git-gui: git-gui: work from the .git dir git-gui: Fix applying a line when all following lines are deletions git-gui: Correct file_states when unstaging partly staged entry git-gui: Fix gitk for branch whose name matches local file git-gui: Keep repo_config(gui.recentrepos) and .gitconfig in sync git-gui: handle really long error messages in updateindex. git-gui: Add hotkeys for "Unstage from commit" and "Revert changes" git-gui: Makefile: consolidate .FORCE-* targets
2010-01-23git-gui: work from the .git dirLibravatar Giuseppe Bilotta1-0/+10
When git-gui is run from a .git dir, _gitdir would be set to "." by rev-parse, something that confuses the worktree detection. Fix by expanding the value of _gitdir to pwd in this special case. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>