summaryrefslogtreecommitdiffstats
path: root/tools
AgeCommit message (Collapse)AuthorLines
6 daysmeson: precompile "git-compat-util.h"Patrick Steinhardt-0/+1
Every compilation unit in Git is expected to include "git-compat-util.h" first, either directly or indirectly via "builtin.h". This header papers over differences between platforms so that we can expect the typical POSIX functions to exist. Furthermore, it provides functionality that we end up using everywhere. This header is thus quite heavy as a consequence. Preprocessing it as a standalone unit via `clang -E git-compat-util.h` yields over 23,000 lines of code overall. Naturally, it takes quite some time to compile all of this. Luckily, this is exactly the kind of use case that precompiled headers aim to solve: instead of recompiling it every single time, we compile it once and then link the result into the executable. If include guards are set up properly it means that the file won't need to be reprocessed. Set up such a precompiled header for "git-compat-util.h" and wire it up via Meson. This leads to a significant speedup when performing full builds: Benchmark 1: ninja (rev = HEAD~) Time (mean ± σ): 14.467 s ± 0.126 s [User: 248.133 s, System: 31.298 s] Range (min … max): 14.195 s … 14.633 s 10 runs Benchmark 2: ninja (rev = HEAD) Time (mean ± σ): 10.307 s ± 0.111 s [User: 173.290 s, System: 23.998 s] Range (min … max): 10.030 s … 10.433 s 10 runs Summary ninja (rev = HEAD) ran 1.40 ± 0.02 times faster than ninja (rev = HEAD~) Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 daysbuilds: move build scripts into "tools/"Patrick Steinhardt-0/+388
We have a bunch of scripts used by our different build systems that are all located in the top-level directory. Now that we have introduced the new "tools/" directory though we have a better home for them. Move the scripts into the "tools/" directory. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 dayscontrib: move "update-unicode.sh" script into "tools/"Patrick Steinhardt-0/+56
The "update-unicode.sh" script is used to update the unicode data compiled into Git whenever a new version of the Unicode standard has been released. As such, it is a natural part of our developer-facing tooling, and its presence in "contrib/" is misleading. Promote the script into the new "tools/" directory. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 dayscontrib: move "coverage-diff.sh" script into "tools/"Patrick Steinhardt-0/+103
The "coverage-diff.sh" script can be used to get information about test coverage fro the Git codebase. It is thus rather specific to our build and test infrastructure and part of the developer-facing tooling. The fact that this script is part of "contrib/" is thus rather misleading and a historic wart. Promote the tool into the new "tools/" directory. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 dayscontrib: move "coccinelle/" directory into "tools/"Patrick Steinhardt-0/+1557
The Coccinelle tool is an ingrained part of our build infrastructure. It is executed by our CI to detect antipatterns and is used to detect misuses of certain interfaces. It's presence in "contrib/" is thus rather misleading. Promote the configuration into the new "tools/" directory. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 daysIntroduce new "tools/" directoryPatrick Steinhardt-0/+7
According to its readme, the "contrib/" directory's main intent is to collect stuff that is not an official part of Git, either because it is too specialized or because it is still considered experimental. The reality tells a bit of a different story though: while it _does_ contain such things, it also contains other things: - Our credential helpers, which are being distributed by many packagers nowadays and which can be considered "stable". - A bunch of tooling that relates to our build and test infrastructure. Especially the second category is somewhat of a sore spot. You really wouldn't expect build-related tooling to be considered an optional part of Git. Quite the opposite. Create a new top-level "tools/" directory to fix this discrepancy. This directory will contain all kind of tools that are related to our build infrastructure and that Git developers are likely to use day to day. For now, this directory doesn't contain anything yet except for a readme and a Meson skeleton. This will change in subsequent commits. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2005-09-07Flatten tools/ directory to make build procedure simpler.Junio C Hamano-1148/+0
Also make platform specific part more isolated. Currently we only have Darwin defined, but I've taken a look at SunOS specific patch (which I dropped on the floor for now) as well. Doing things this way would make adding it easier. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-06mailinfo: barf and exist upon nested multipart.Junio C Hamano-0/+4
At least we can detect what we do not handle. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-04git-applymbox: fix '-c'.Junio C Hamano-1/+2
Earlier round b50abe8843006e9856c633b5abeb4eab53b46629 broke it by carelessly rewriting the main loop. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-29mailinfo and applymbox updatesJunio C Hamano-86/+554
This attempts to minimally cope with a subset of MIME "features" often seen in patches sent to our mailing lists. Namely: - People's name spelled in characters outside ASCII (both on From: header and the signed-off-by line). - Content-transfer-encoding using quoted-printable (both in multipart and non-multipart messages). These MIME features are detected and decoded by "git mailinfo". Optionally, with the '-u' flag, the output to .info and .msg is transliterated from its original chaset to utf-8. This is to encourage people to use utf8 in their commit messages for interoperability. Applymbox accepts additional flag '-u' which is passed to mailinfo. Signed-off-by: Junio C Hamano / 濱野 純 <junkio@cox.net>
2005-08-26[PATCH] git bugfixes and cleanups, mainly Debian thingsTommi Virtanen-0/+2
Ignore generated files. Signed-off-by: Tommi Virtanen <tv@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-19Add hooks to tools/git-applypatch.Junio C Hamano-18/+69
This teachs git-applypatch, which is used from git-applymbox, three hooks, similar to what git-commit-script uses. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-18[PATCH] git-applymbox: verify that index is cleanLinus Torvalds-0/+8
This makes git-applymbox verify that the index matches the current HEAD before it starts applying patches. Otherwise, you might have updated the index with unrelated changes, and the first patch will commit not just the patch from the mbox, but also any changes you had in your index. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-16Teach applymbox to keep the Subject: line.Junio C Hamano-4/+27
This corresponds to the -k flag to git format-patch --mbox option. The option should probably not be used when applying a real e-mail patch, but is needed when format-patch and applymbox pair is used for cherrypicking. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-16Make tools use DESTDIR as well (otherwise rpm build is broken).Chris Wright-1/+1
Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-12[PATCH] Use $DESTDIR instead of $destPetr Baudis-2/+2
$DESTDIR is more usual during the build than $dest and is what is usually used in the makefiles, so let's use it too. Signed-off-by: Petr Baudis <pasky@ucw.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-12Make CFLAGS overridable from make command line.Pavel Roskin-4/+3
This patch renames COPTS to CFLAGS, because it's COPTS that was user overridable. Also, -Wall is moved there because it's optional. What was CFLAGS is now ALL_CFLAGS, which users should not override. Defines are added to DEFINES. Since ALL_CFLAGS is recursively expanded, it uses the final value of DEFINES. Implicit rules are made explicit since the implicit rules use CFLAGS rather than ALL_CFLAGS. I believe that serious projects should not rely on implicit rules anyway. Percent rules are used because they are used already and because they don't need the .SUFFIXES target. [jc: in addition to updating the patch for 0.99.4, I fixed up a glitch in Pavel's original patch which compiled sha1.o out of mozilla-sha1/sha1.c, where it should have left the resulting object file in mozilla-sha1 directory for later "ar".] Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-09Small typofix in mailsplit.cJunio C Hamano-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-05git-applymbox: allow retrying after fixing up.Junio C Hamano-15/+41
After failing to apply a patch, when operating under -q (query) flag, give the user an opportunity to fix up the patch in a separate window and retry. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-03[PATCH] Fix sparse warningsAlecs King-1/+1
fix one 'should it be static?' warning and two 'mixing declarations and code' warnings. Signed-off-by: Alecs King <alecsk@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-31Fix typo in recent Makefile cleanup (again).Junio C Hamano-3/+3
Another instance of $(bin) was missed when it was renamed to $(bindir). Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-29[PATCH] mmap error handlingPavel Roskin-1/+2
I have reviewed all occurrences of mmap() in git and fixed three types of errors/defects: 1) The result is not checked. 2) The file descriptor is closed if mmap() succeeds, but not when it fails. 3) Various casts applied to -1 are used instead of MAP_FAILED, which is specifically defined to check mmap() return value. [jc: This is a second round of Pavel's patch. He fixed up the problem that close() potentially clobbering the errno from mmap, which the first round had.] Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-23Fix up applymbox script for the addition of "git-" prefixLinus Torvalds-3/+3
Ehh, it works much better that way ;)
2005-07-23Rename the "tools" programs to also have the "git-" prefixLinus Torvalds-2/+5
Hey, people are using them, and we have an install target for them, so make sure that we can actually install them sanely without disturbing the namespace.
2005-07-23[PATCH] mailinfo: handle folded header.Junio C Hamano-37/+27
Some people split their long E-mail address over two lines using the RFC2822 header "folding". We can lose authorship information this way, so make a minimum effort to deal with it, instead of special casing only the "Subject:" field. We could teach mailsplit to unfold the folded header, but teaching mailinfo about folding would make more sense; a single message can be fed to mailinfo without going through mailsplit. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-22[PATCH] Install tools with "make install-tools".Junio C Hamano-2/+11
Match the main Makefile by separating COPTS from CFLAGS, defining INSTALL, prefix, and bin. Add a new target 'install-tools' to the main Makefile to install them. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-22[PATCH] git-format-patch-script and mailinfo updates.Junio C Hamano-1/+9
- avoid duplicating [PATCH] in the commit message body if the original commit has it already (happens for commits done from mails via applymbox). - check if the commit author is different from the one who is running the script, and emit an appropriate "From:" and "Date: " lines to the output. - with '--date', emit "Date: " line to preserve the original author date even for the user's own commit. - teach mailinfo to grok not just "From: " but "Date: ". The patch e-mail output by format-patch starts with the first line from the original commit message, prefixed with [PATCH], and optionally a From: line if you are reformatting a patch obtained from somebody else, a Date: line from the original commit if (1) --date is specified or (2) for somebody else's patch, and the rest of the commit message body. Expected use of this is to move the title line from the commit to Subject: when sending it via an e-mail, and leave the From: and the Date: lines as the first lines of your message. The mailinfo command has been changed to read Date: (in addition to From: it already understands) and do sensible things when running applymbox. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-22[PATCH] tools/applymbox: allow manual fixing and continuing after a failure.Junio C Hamano-10/+38
With "-c .dotest/0002" flag, the applymbox command can be told to use existing .dotest/patch file after hand-fixing the patch conflicts for the second patch in the mailbox, and continue on from that message, skipping the already applied first patch in .dotest/0001. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-16Prepare git-tools for merging into the main git archiveLinus Torvalds-0/+527
Rename into a "tools" subdirectory, and change name of "dotest" to "applymbox". Remove stripspace (which was already copied into git) and cvs2git (which was likewise already copied into git, and then replaced by a much better perl version). All of this was brought on by Ryan Anderson shaming me into it. Thanks. I guess.