summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-11-14Merge branch 'maint'Libravatar Junio C Hamano4-5/+11
* maint: Documentation: git-svn: fix example for centralized SVN clone Documentation: fix links to "everyday.html" revision.c: use proper data type in call to sizeof() within xrealloc
2008-11-14Documentation: git-svn: fix example for centralized SVN cloneLibravatar Jan Krüger1-0/+2
The example that tells users how to centralize the effort of the initial git svn clone operation doesn't work properly. It uses rebase but that only works if HEAD exists. This adds one extra command to create a somewhat sensible HEAD that should work in all cases. Signed-off-by: Jan Krüger <jk@jk.gs> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-14Documentation: fix links to "everyday.html"Libravatar Christian Couder2-4/+8
In some places the links are wrong. They should be: "link:everyday.html", instead of: "linkgit:everyday[7]". This patch fixes that. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-14revision.c: use proper data type in call to sizeof() within xreallocLibravatar Brandon Casey1-1/+1
A type char** was being used instead of char*. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-14Documentation: New GUI configuration and command-line options.Libravatar Alexander Gavrilov4-0/+65
Add information on new git-gui and gitk command-line options, configuration variables, and the encoding attribute. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-14Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano2-9/+15
* git://git.bogomips.org/git-svn: git-svn: Update git-svn to use the ability to place temporary files within repository directory Git.pm: Make _temp_cache use the repository directory git-svn: proper detection of bare repositories git-svn: respect i18n.commitencoding config git-svn: don't escape tilde ('~') for http(s) URLs
2008-11-13git-svn: Update git-svn to use the ability to place temporary files within ↵Libravatar Marten Svanfeldt (dev)1-4/+5
repository directory This fixes git-svn within msys where Perl will provide temporary files with path such as /tmp while the git suit expects native Windows paths. Signed-off-by: Marten Svanfeldt <developer@svanfeldt.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-11-13Git.pm: Make _temp_cache use the repository directoryLibravatar Marten Svanfeldt (dev)1-5/+10
Update the usage of File::Temp->tempfile to place the temporary files within the repository directory instead of just letting Perl decide what directory to use, given there is a repository specified when requesting the temporary file. This is needed to be able to fix git-svn on msys as msysperl generates paths with UNIX-style paths (/tmp/xxx) while the git tools expect natvie path format (c:/..). The repository dir is stored in native format so by using it as the base directory for temporary files we always get a usable native full path. Signed-off-by: Marten Svanfeldt <developer@svanfeldt.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-11-13git-svn: proper detection of bare repositoriesLibravatar Deskin Miller2-5/+16
When in a bare repository (or .git, for that matter), git-svn would fail to initialise properly, since git rev-parse --show-cdup would not output anything. However, git rev-parse --show-cdup actually returns an error code if it's really not in a git directory. Fix the issue by checking for an explicit error from git rev-parse, and setting $git_dir appropriately if instead it just does not output. Signed-off-by: Deskin Miller <deskinm@umich.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-11-13git-svn: respect i18n.commitencoding configLibravatar Eric Wong2-3/+101
SVN itself always stores log messages in the repository as UTF-8. git always stores/retrieves everything as raw binary data with no transformations whatsoever. To interact with SVN, we need to encode log messages as UTF-8 before sending them to SVN, as SVN cannot do it for us. When retrieving log messages from SVN, we also need to (attempt to) reencode the UTF-8 log message back to the user-specified commit encoding. Note, handling i18n.logoutputencoding for "git svn log" also needs to be done in a future change. Also, this change only deals with the encoding of commit messages and nothing else (path names, blob content, ...). In-Reply-To: <8b168cfb0810282014r789ac01dnec51824de1078f0@mail.gmail.com> James North <tocapicha@gmail.com> wrote: > Hi, > > I'm using git-svn on a system with ISO-8859-1 encoding. The problem is > when I try to use "git svn dcommit" to send changes to a remote svn > (also ISO-8859-1). > > Seems like git-svn is sending commit messages with utf-8 (just a > guessing...) and they look bad on the remote svn log. E.g. "Ca?\241a > de cami?\243n" > > I have tried using i18n.commitencoding=ISO-8859-1 as suggested by the > warning when doing "git svn dcommit" but messages still are sent with > wrong encoding. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2008-11-13git-svn: don't escape tilde ('~') for http(s) URLsLibravatar Eric Wong1-3/+3
Thanks to Jose Carlos Garcia Sogo and Björn Steinbrink for the bug report. On 2008.10.18 23:39:19 +0200, Björn Steinbrink wrote: > Hi, > > Jose Carlos Garcia Sogo reported on #git that a git-svn clone of this > svn repo fails for him: > https://sucs.org/~welshbyte/svn/backuptool/trunk > > I can reproduce that here with: > git-svn version 1.6.0.2.541.g46dc1.dirty (svn 1.5.1) > > The error message I get is: > Apache got a malformed URI: Unusable URI: it does not refer to this > repository at /usr/local/libexec/git-core/git-svn line 4057 > > strace revealed that git-svn url-encodes ~ while svn does not do that. > > For svn we have: > write(5, "<S:update-report send-all=\"true\" xmlns:S=\"svn:\"> > <S:src-path>https://sucs.org/~welshbyte/svn/backuptool/trunk</S:src-path>... > > While git-svn shows: > write(7, "<S:update-report send-all=\"true\" xmlns:S=\"svn:\"> > <S:src-path>https://sucs.org/%7Ewelshbyte/svn/backuptool/trunk</S:src-path>... Signed-off-by: Eric Wong <normalperson@yhbt.net>
2008-11-13Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano3-11/+120
* git://git.bogomips.org/git-svn: git-svn: proper detection of bare repositories git-svn: respect i18n.commitencoding config git-svn: don't escape tilde ('~') for http(s) URLs
2008-11-13Merge branch 'maint'Libravatar Junio C Hamano0-0/+0
* maint: date/time: do not get confused by fractional seconds
2008-11-13date/time: do not get confused by fractional secondsLibravatar Linus Torvalds1-6/+20
The date/time parsing code was confused if the input time HH:MM:SS is followed by fractional seconds. Since we do not record anything finer grained than seconds, we could just drop fractional part, but there is a twist. We have taught people that not just spaces but dot can be used as word separators when spelling things like: $ git log --since 2.days $ git show @{12:34:56.7.days.ago} and we shouldn't mistake "7" in the latter example as a fraction and discard it. The rules are: - valid days of month/mday are always single or double digits. - valid years are either two or four digits No, we don't support the year 600 _anyway_, since our encoding is based on the UNIX epoch, and the day we worry about the year 10,000 is far away and we can raise the limit to five digits when we get closer. - Other numbers (eg "600 days ago") can have any number of digits, but they cannot start with a zero. Again, the only exception is for two-digit numbers, since that is fairly common for dates ("Dec 01" is not unheard of) So that means that any milli- or micro-second would be thrown out just because the number of digits shows that it cannot be an interesting date. A milli- or micro-second can obviously be a perfectly fine number according to the rules above, as long as it doesn't start with a '0'. So if we have 12:34:56.123 then that '123' gets parsed as a number, and we remember it. But because it's bigger than 31, we'll never use it as such _unless_ there is something after it to trigger that use. So you can say "12:34:56.123.days.ago", and because of the "days", that 123 will actually be meaninful now. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-13Merge git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano1-227/+810
* git://git.kernel.org/pub/scm/gitk/gitk: gitk: Fix linehtag undefined error with file highlighting gitk: Fix commit encoding support gitk: Fix transient windows on Win32 and MacOS gitk: Add accelerators to frequently used menu commands gitk: Implement a user-friendly Edit View dialog gitk: Improve cherry-pick error handling gitk: Make cherry-pick call git-citool on conflicts gitk: Make gitk dialog windows transient gitk: Add Return and Escape bindings to dialogs gitk: Cope with unmerged files in local changes gitk: Make "show origin of this line" work on fake commits gitk: Unify handling of merge diffs with normal 2-way diffs gitk: Make the background color of marked lines configurable gitk: Add a menu item to show where a given line comes from gitk: Fix some off-by-one errors in computing which line to blame gitk: Allow starting gui blame for a specific line gitk: Fix file list context menu for merge commits gitk: Allow forcing branch creation if it already exists
2008-11-13gitk: Fix linehtag undefined error with file highlightingLibravatar Paul Mackerras1-2/+5
Occasionally gitk will throw a Tcl error complaining that linehtag(n) is undefined when. It happens when the commit list is still growing (e.g. when updating the commit list) and gitk is set to highlight commits that affect certain file(s). What happens is that the changes to the commit list set need_redisplay to indicate that the display needs to be redrawn. That causes the next call to drawcommits to call clear_display, which unsets iddrawn and thus ensures that readfhighlight won't call bolden on any rows that have moved. However, it is possible for readfhighlight to be called after the commit list has changed but before drawcommits has run, meaning that readfhighlight will potentially think that rows have been drawn when they haven't, because of the change in the id -> row mapping (and the fact that iddrawn is indexed by id but line[hnd]tag are indexed by row number). This fixes it (and also optimizes things a little) by making bolden and bolden_name check need_redisplay before doing anything. If need_redisplay is set, then there is no point doing anything because the whole display is about to get cleared and redrawn, and it avoids looking up line[hn]tag using stale row numbers. Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-11-13gitk: Fix commit encoding supportLibravatar Alexander Gavrilov1-2/+23
This commit fixes two problems with commit encodings: 1) git-log actually uses i18n.logoutputencoding to generate its output, and falls back to i18n.commitencoding only when that option is not set. Thus, gitk should use its value to read the results, if available. 2) The readcommit function did not process encodings at all. This led to randomly appearing misconverted commits if the commit encoding differed from the current locale. Now commit messages should be displayed correctly, except when logoutputencoding is set to an encoding that cannot represent charecters in the message. For example, it is impossible to convert Japanese characters from Shift-JIS to CP-1251 (although the reverse conversion works). The reason for using git log to read the commit and then getting Tcl to convert its output is that is essentially what happens in the normal path through getcommitlines, hence there is less chance for unintended differences in how commits are processed in getcommitlines and do_readcommit. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-11-13gitk: Fix transient windows on Win32 and MacOSLibravatar Alexander Gavrilov1-13/+31
Transient windows cause problems on these platforms: - On Win32 the windows appear in the top left corner of the screen. In order to fix it, this patch causes them to be explicitly centered on their parents by an idle handler. - On MacOS with Tk 8.4 they appear without a title bar. Since it is clearly unacceptable, this patch disables transient on that platform. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-11-13gitk: Add accelerators to frequently used menu commandsLibravatar Alexander Gavrilov1-7/+29
This commit documents keyboard accelerators used for menu commands in the menu, as it is usually done, and adds some more, e.g. F4 to invoke Edit View (or New View if the current view is the un-editable "All files" view). The changes include a workaround for handling Shift-F4 on systems where XKB binds special XF86_Switch_VT_* symbols to Ctrl-Alt-F* combinations. Tk often receives these codes when Shift-F* is pressed, so it is necessary to bind the relevant actions to them as well. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-11-12Update draft release notes to 1.6.1Libravatar Junio C Hamano1-1/+33
A large number of topics are merged to prepare for -rc0 now. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12Merge branch 'jn/gitweb-customlinks'Libravatar Junio C Hamano1-7/+12
* jn/gitweb-customlinks: gitweb: Better processing format string in custom links in navbar
2008-11-12Merge branch 'gb/gitweb-snapshot-pathinfo'Libravatar Junio C Hamano1-8/+63
* gb/gitweb-snapshot-pathinfo: gitweb: embed snapshot format parameter in PATH_INFO gitweb: retrieve snapshot format from PATH_INFO gitweb: make the supported snapshot formats array global
2008-11-12Merge branch 'ds/uintmax-config' (early part)Libravatar Junio C Hamano3-1/+36
* 'ds/uintmax-config' (early part): Add autoconf tests for pthreads Make Pthread link flags configurable Add Makefile check for FreeBSD 4.9-SECURITY Build: add NO_UINTMAX_T to support ancient systems Conflicts: Makefile
2008-11-12Merge branch 'jk/maint-commit-v-strip'Libravatar Junio C Hamano2-3/+78
* jk/maint-commit-v-strip: commit: Fix stripping of patch in verbose mode.
2008-11-12Merge branch 'np/pack-safer'Libravatar Junio C Hamano8-49/+224
* np/pack-safer: t5303: fix printf format string for portability t5303: work around printf breakage in dash pack-objects: don't leak pack window reference when splitting packs extend test coverage for latest pack corruption resilience improvements pack-objects: allow "fixing" a corrupted pack without a full repack make find_pack_revindex() aware of the nasty world make check_object() resilient to pack corruptions make packed_object_info() resilient to pack corruptions make unpack_object_header() non fatal better validation on delta base object offsets close another possibility for propagating pack corruption
2008-11-12Merge branch 'mk/maint-cg-push'Libravatar Junio C Hamano3-5/+75
* mk/maint-cg-push: git push: Interpret $GIT_DIR/branches in a Cogito compatible way Conflicts: t/t5516-fetch-push.sh
2008-11-12Merge branch 'bc/maint-keep-pack'Libravatar Junio C Hamano7-27/+116
* bc/maint-keep-pack: t7700: test that 'repack -a' packs alternate packed objects pack-objects: extend --local to mean ignore non-local loose objects too sha1_file.c: split has_loose_object() into local and non-local counterparts t7700: demonstrate mishandling of loose objects in an alternate ODB builtin-gc.c: use new pack_keep bitfield to detect .keep file existence repack: do not fall back to incremental repacking with [-a|-A] repack: don't repack local objects in packs with .keep file pack-objects: new option --honor-pack-keep packed_git: convert pack_local flag into a bitfield and add pack_keep t7700: demonstrate mishandling of objects in packs with a .keep file
2008-11-12Merge branch 'mv/remote-rename'Libravatar Junio C Hamano5-0/+256
* mv/remote-rename: git-remote: document the migration feature of the rename subcommand git-remote rename: migrate from remotes/ and branches/ remote: add a new 'origin' variable to the struct Implement git remote rename
2008-11-12Merge branch 'jk/deny-push-to-current'Libravatar Junio C Hamano3-29/+126
* jk/deny-push-to-current: receive-pack: detect push to current branch of non-bare repo t5516: refactor oddball tests
2008-11-12Merge branch 'dl/xdiff'Libravatar Junio C Hamano1-2/+13
* dl/xdiff: xdiff: give up scanning similar lines early
2008-11-12Merge branch 'lt/decorate'Libravatar Junio C Hamano8-14/+113
* lt/decorate: rev-list documentation: clarify the two parts of history simplification Document "git log --simplify-by-decoration" Document "git log --source" revision traversal: '--simplify-by-decoration' Make '--decorate' set an explicit 'show_decorations' flag revision: make tree comparison functions take commits rather than trees Add a 'source' decorator for commits Conflicts: Documentation/rev-list-options.txt
2008-11-12Merge branch 'jk/diff-convfilter'Libravatar Junio C Hamano9-42/+81
* jk/diff-convfilter: enable textconv for diff in verbose status/commit wt-status: load diff ui config only textconv regular files userdiff: require explicitly allowing textconv refactor userdiff textconv code Conflicts: t/t4030-diff-textconv.sh
2008-11-12Merge branch 'jk/diff-convfilter-test-fix'Libravatar Junio C Hamano7-20/+178
* jk/diff-convfilter-test-fix: Avoid using non-portable `echo -n` in tests. add userdiff textconv tests document the diff driver textconv feature diff: add missing static declaration Conflicts: Documentation/gitattributes.txt
2008-11-12Merge branch 'st/tag'Libravatar Junio C Hamano2-7/+23
* st/tag: tag: Add more tests about mixing incompatible modes and options tag: Check that options are only allowed in the appropriate mode
2008-11-12Merge git://repo.or.cz/git-guiLibravatar Junio C Hamano4-17/+41
* git://repo.or.cz/git-gui: git-gui: Request blame metadata in utf-8. git-gui: Add the Show SSH Key item to the clone dialog. git-gui: Fix focus transition in the blame viewer.
2008-11-12t7700: test that 'repack -a' packs alternate packed objectsLibravatar Brandon Casey1-0/+16
Previously, when 'repack -a' was called and there were no packs in the local repository without a .keep file, the repack would fall back to calling pack-objects with '--unpacked --incremental'. This resulted in the created pack file, if any, to be missing the packed objects in the alternate object store. Test that this specific case has been fixed. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12git.html: Update the links to stale versionsLibravatar Junio C Hamano1-1/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12Merge branch 'maint'Libravatar Junio C Hamano8-6/+47
* maint: Start 1.6.0.5 cycle Fix pack.packSizeLimit and --max-pack-size handling checkout: Fix "initial checkout" detection Remove the period after the git-check-attr summary Conflicts: RelNotes
2008-11-12Start 1.6.0.5 cycleLibravatar Junio C Hamano2-1/+22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12Fix pack.packSizeLimit and --max-pack-size handlingLibravatar Nicolas Pitre2-2/+16
If the limit was sufficiently low, having a single object written could bust the limit (by design), but caused the remaining allowed size to go negative for subsequent objects, which for an unsigned variable is a rather huge limit. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12rev-list documentation: clarify the two parts of history simplificationLibravatar Santi Béjar1-2/+46
One set of options and parameters determine what commits are involved in the simplification process, and another set of options determine how the simplification is done. Clarify their distinction at the beginning. Signed-off-by: Santi Béjar <santi@agolina.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12Document "git log --simplify-by-decoration"Libravatar Nanako Shiraishi1-0/+8
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12checkout: Fix "initial checkout" detectionLibravatar Junio C Hamano4-3/+9
Earlier commit 5521883 (checkout: do not lose staged removal, 2008-09-07) tightened the rule to prevent switching branches from losing local changes, so that staged removal of paths can be protected, while attempting to keep a loophole to still allow a special case of switching out of an un-checked-out state. However, the loophole was made a bit too tight, and did not allow switching from one branch (in an un-checked-out state) to check out another branch. The change to builtin-checkout.c in this commit loosens it to allow this, by not insisting the original commit and the new commit to be the same. It also introduces a new function, is_index_unborn (and an associated macro, is_cache_unborn), to check if the repository is truly in an un-checked-out state more reliably, by making sure that $GIT_INDEX_FILE did not exist when populating the in-core index structure. A few places the earlier commit 5521883 added the check for the initial checkout condition are updated to use this function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12commit: Fix stripping of patch in verbose mode.Libravatar Jeff King2-3/+78
When the "-v" option is given, we put diff of what is to be committed into the commit template, and then strip it back out again after the user has edited it. We used to look for the diff by searching for the "diff --git a/" header. With diff.mnemonicprefix set in the configuration, however, this pattern does not match. The pattern is loosened to cover this case. Also, if the user puts their own diff in the message (e.g., as a sample output), then we will accidentally trigger the pattern, removing part of their output. We can avoid doing this stripping altogether if the user didn't use "-v" in the first place, so we know that any match we find will be a false positive. [jc: this fix was split out of a series originally meant for master.] Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12Remove the period after the git-check-attr summaryLibravatar Matt Kraai1-1/+1
The period at the end of the git-check-attr summary causes there to be two periods after the summary in the git(1) manual page. Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12pack-objects: extend --local to mean ignore non-local loose objects tooLibravatar Brandon Casey3-2/+5
With this patch, --local means pack only local objects that are not already packed. Additionally, this fixes t7700 testing whether loose objects in an alternate object database are repacked. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12sha1_file.c: split has_loose_object() into local and non-local counterpartsLibravatar Brandon Casey2-6/+14
Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12t7700: demonstrate mishandling of loose objects in an alternate ODBLibravatar Brandon Casey1-0/+19
Loose objects residing in an alternate object database should not be packed when the -l option to repack is used. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12builtin-gc.c: use new pack_keep bitfield to detect .keep file existenceLibravatar Brandon Casey1-11/+1
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12repack: do not fall back to incremental repacking with [-a|-A]Libravatar Brandon Casey1-7/+4
When repack is called with either the -a or -A option, the user has requested to repack all objects including those referenced by the alternates mechanism. Currently, if there are no local packs without .keep files, then repack will call pack-objects with the '--unpacked --incremental' options which causes it to exclude alternate packed objects. So, remove this fallback. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>