https://github.com/git/git

sort by:
Revision Author Date Message Commit Date
0ad8ff2 configure.ac: properly unset NEEDS_SSL_WITH_CRYPTO when sha1 func is missing The empty assignment NEEDS_SSL_WITH_CRYPTO= was mistakenly paired with the assignment NEEDS_SSL_WITH_CRYPTO=YesPlease in the "action-if-found" parameter of the AC_CHECK_LIB macro. The empty assignment was intended for the "action-if-not-found" section, since in that case, the necessary sha1 hash function was not found and the internal sha1 implementation will be used instead. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2009, 04:57:41 UTC
24deea5 janitor: useless checks before free Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2009, 04:57:41 UTC
98cb6f3 janitor: add DIV_ROUND_UP and use it. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2009, 04:57:41 UTC
f630cfd refactor: use bitsizeof() instead of 8 * sizeof() Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2009, 04:57:41 UTC
67da52b janitor: use NULL and not 0 for pointers. Brought to you thanks to coccinelle: ---8<---- @@ expression *E; @@ ( E == - 0 + NULL | E != - 0 + NULL | E = - 0 + NULL ) @@ identifier f; type T; @@ T *f(...) { <... - return 0; + return NULL; ...> } --->8---- There are a lot more hits in compat/nedmallox and compat/regex but these are borrowed code we rather do not want to maintain our own forks for, and this patch refrains from touching them. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2009, 04:57:41 UTC
5207079 git stash: modernize use of "dashed" git-XXX calls Replace remaining git-XXX calls with git XXX. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Acked-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2009, 04:57:41 UTC
f693b7e Improve doc for format-patch threading options. This hopefully makes the relationship between threading options of format-patch and send-email easier to grasp. Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2009, 04:57:41 UTC
65180c6 List send-email config options in config.txt. Also mention deprecated aliases that do not appear in the send-email manpage. Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2009, 04:57:41 UTC
a114289 configure.ac: rework/fix the NEEDS_RESOLV and NEEDS_LIBGEN tests The "action" parameters for these two tests were supplied incorrectly for the way the tests were implemented. The tests check whether a program which calls hstrerror() or basename() successfully links when -lresolv or -lgen are used, respectively. A successful linking would result in NEEDS_RESOLV or NEEDS_LIBGEN being unset, and failure would result in setting the respective variable. Aside from that issue, the tests did not handle the case where neither library was necessary for accessing the functions in question. So solve both of these issues by re-working the two tests so that their form is like the NEEDS_SOCKET test which attempts to link with just the c library, and if it fails then assumes that the additional library is necessary and sets the appropriate variable. Also an entry in the config.mak.in file is necessary for the NEEDS_LIBGEN variable to appear in the config.mak.autogen file with the value assigned by the configure script. Without it, the generated shell script would contain a snippet like this: for ac_lib in ; do ... which is incorrect. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2009, 04:56:51 UTC
248b6c0 Merge branch 'maint' * maint: Trailing whitespace and no newline fix diff --cc: a lost line at the beginning of the file is shown incorrectly combine-diff.c: fix performance problem when folding common deleted lines 23 July 2009, 04:56:46 UTC
735c674 Trailing whitespace and no newline fix If a patch adds a new line to the end of a file and this line ends with one trailing whitespace character and has no newline, then '--whitespace=fix' currently does not remove that trailing whitespace. This patch fixes this by removing the check for trailing whitespace at the end of the line at a hardcoded offset which does not take the eventual absence of newline into account. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 July 2009, 01:54:55 UTC
b810cbb diff --cc: a lost line at the beginning of the file is shown incorrectly When combine-diff inspected the diff from one parent to the merge result, it misinterpreted a header in the form @@ -l,k +0,0 @@. This hunk header means that K lines were removed from the beginning of the file, so the lost lines must be queued to the sline that represents the first line of the merge result, but we incremented our pointer incorrectly and ended up queuing it to the second line, which in turn made the lossage appear _after_ the first line. Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2009, 22:38:22 UTC
55d5d5b combine-diff.c: fix performance problem when folding common deleted lines For a deleted line in a patch with the parent we are looking at, the append_lost() function finds the same line among a run of lines that were deleted from the same location by patches from parents we previously checked. This is so that patches with two parents @@ -1,4 +1,3 @@ @@ -1,4 +1,3 @@ one one -two -two three three -quatro -fyra +four +four can be coalesced into this sequence, reusing one line that describes the removal of "two" for both parents. @@@ -1,4 -1,4 +1,3 @@@ one --two three - quatro -frya ++four While reading the second patch (that removes "two" and then "fyra"), after finding where removal of the "two" matches, we need to find existing removal of "fyra" (if exists) in the removal list, but the match has to happen after all the existing matches (in this case "two"). The code used a naïve O(n^2) algorithm to compute this by scanning the whole removal list over and over again. This patch remembers where the next scan should be started in the existing removal list to avoid this. Noticed by Linus Torvalds. Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 July 2009, 22:37:55 UTC
2a679c7 git svn: fix reparenting when ugly http(s) URLs are used Mishandling of http(s) in need of escaping was causing t9118-git-svn-funky-branch-names to fail when SVN_HTTPD_PORT was defined. This bug was exposed in (but not caused by) commit 0b2af457a49e3b00d47d556d5301934d27909db8 (Fix branch detection when repository root is inaccessible) Signed-off-by: Eric Wong <normalperson@yhbt.net> 20 July 2009, 05:50:06 UTC
f0e8b1a git svn: rename tests that had conflicting numbers Some unrelated tests were developed simultaneously and resulted in test numbers conflicting. To avoid difficulty when referring to tests via the "tXXXX" convention, rename the newer tests. Suggested by Marc Branchaud. Signed-off-by: Eric Wong <normalperson@yhbt.net> 20 July 2009, 05:50:06 UTC
77acc32 Updates to draft release notes to 1.6.4 Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 July 2009, 00:21:35 UTC
bba0fd2 push: do not give big warning when no preference is configured If the message said "we will be changing the default in the future, so this is to warn people who want to keep the current default what to do", it would have made some sense, but as it stands, the message is merely an unsolicited advertisement for a new feature, which it is not helpful at all. Squelch it. Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 July 2009, 00:20:52 UTC
d5cee0f t4202-log.sh: Test git log --no-walk sort order 'git log --no-walk' sorts commits by commit time whereas 'git show' does not (it leaves them as given on the command line). Document this by two tests so that we never forget why ba1d450 (Tentative built-in "git show", 2006-04-15) introduced it and 8e64006 (Teach revision machinery about --no-walk, 2007-07-24) exposed it as an option argument. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 July 2009, 23:57:49 UTC
3de4a44 cvsexportcommit: reorder tests to quiet intermittent failure Reorder tests introduced in fef3a7cc and 54d5cc0e so an intermittent but unimportant failure on the CVS side related to the former does not interfere with what is actually being tested. Signed-off-by: Mike Ralphson <mike@abacus.co.uk> Tested-by: Tommy Nordgren <tommy.nordgren@comhem.se> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 July 2009, 23:57:49 UTC
58b1ef2 Merge branch 'maint' * maint: checkout -f: deal with a D/F conflict entry correctly sha1_name.c: avoid unnecessary strbuf_release refs.c: release file descriptor on error return 18 July 2009, 23:57:47 UTC
78d3b06 checkout -f: deal with a D/F conflict entry correctly When we switch branches with "checkout -f", unpack_trees() feeds two cache_entries to oneway_merge() function in its src[] array argument. The zeroth entry comes from the current index, and the first entry represents what the merge result should be, taken from the tree recorded in the commit we are switching to. When we have a blob (either regular file or a symlink) in the index and in the work tree at path "foo", and the switched-to tree has "foo/bar", i.e. "foo" becomes a directory, src[0] is obviously that blob currently registered at "foo". Even though we do not have anything at "foo" in the switched-to tree, src[1] is _not_ NULL in this case. The unpack_trees() machinery places a special marker df_conflict_entry to signal that no blob exists at "foo", but it will become a directory that may have somthing underneath it (namely "foo/bar"), so a usual 3-way merge can notice the situation. But oneway_merge() codepath failed to notice this and passed the special marker directly to merged_entry(). This happens to remove the "foo" in the end because the df_conflict_entry does not have any name (hence the "error" message) and its addition in add_index_entry() is rejected, but it is wrong. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> 18 July 2009, 23:57:30 UTC
b45a09c sha1_name.c: avoid unnecessary strbuf_release When we fall back to a standard for_each_reflog_ent() after failing to find the nth branch switch (or if we had a short reflog) with the call to for_each_recent_reflog_ent(), we do not need to free the memory allocated for our strbuf's since a strbuf_reset() will be performed in grab_nth_branch_switch() before assigning to the entry. Plus, the strbuf_release() negates the non-zero hint we initially gave to strbuf_init() just above these lines. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 July 2009, 22:09:21 UTC
9d33f7c refs.c: release file descriptor on error return Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 July 2009, 22:07:24 UTC
4525e8e Revert "mailinfo: Remove only one set of square brackets" This reverts commit 650d30d8a120c8982309ccb9ef40432b4ea2eb74. Some mailing lists are configured add prefix "[listname] " to all their messages, and also people hand-edit subject lines, be it an output from format-patch or a patch generated by some other means. We cannot stop people from mucking with the subject line, and with the change, there always will be need for hand editing the subject when that happens. People have depended on the leading [bracketed string] removal. 15 July 2009, 22:10:06 UTC
05c1da2 Fix extraneous lstat's in 'git checkout -f' In our 'oneway_merge()' we always do an 'lstat()' to see if we might need to mark the entry for updating. But we really shouldn't need to do that when the cache entry is already marked as being ce_uptodate(), and this makes us do unnecessary lstat() calls if we have index preloading enabled. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 July 2009, 22:17:01 UTC
a388373 Improve on the 'invalid object' error message at commit time Not that anybody should ever get it, but somebody did (probably because of a flaky filesystem, but whatever). And each time I see an error message that I haven't seen before, I decide that next time it will look better. So this makes us write more relevant information about exactly which file ended up having issues with a missing object. Which will tell whether it was a tree object, for example, or just a regular file in the index (and which one). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 July 2009, 20:50:33 UTC
f222abd Make 'git show' more useful For some reason, I ended up doing git show HEAD~5.. as an odd way of asking for a log. I realize I should just have used "git log", but at the same time it does make perfect conceptual sense. After all, you _could_ have done git show HEAD HEAD~1 HEAD~2 HEAD~3 HEAD~4 and saying "git show HEAD~5.." is pretty natural. It's not like "git show" only ever showed a single commit (or other object) before either! So conceptually, giving a commit range is a very sensible operation, even though you'd traditionally have used "git log" for that. However, doing that currently results in an error fatal: object ranges do not make sense when not walking revisions which admittedly _also_ makes perfect sense - from an internal git implementation standpoint in 'revision.c'. However, I think that asking to show a range makes sense to a user, while saying "object ranges no not make sense when not walking revisions" only makes sense to a git developer. So on the whole, of the two different "makes perfect sense" behaviors, I think I originally picked the wrong one. And quite frankly, I don't really see anybody actually _depending_ on that error case. So why not change it? So rather than error out, just turn that non-walking error case into a "silently turn on walking" instead. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 July 2009, 20:50:29 UTC
4fe1a61 bash: add '--merges' to common 'git log' options ... so it's available for git log, shortlog and gitk. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 July 2009, 18:09:51 UTC
2657420 Document 'git (rev-list|log) --merges' Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 July 2009, 18:09:41 UTC
69fb828 gitweb: update Git homepage URL git-scm.com is now the "official" Git project page, having taken over from git.or.cz, so update the default link accordingly. This saves a redirect when people hit git.or.cz. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 July 2009, 18:09:02 UTC
b3e9593 git svn: allow uppercase UUIDs from SVN SVN allows uppercase A-F characters in repositories. Although `svnadmin' does not create UUIDs with uppercase by default, it is possible to change the UUID of a SVN repository and SVN itself will make no attempt to normalize them. Thanks to Esben Skovenborg for discovering this issue. Signed-off-by: Eric Wong <normalperson@yhbt.net> 11 July 2009, 21:14:36 UTC
0b2af45 git-svn: Fix branch detection when repository root is inaccessible For the case of multiple projects sharing a single SVN repository, it is common practice to create the standard SVN directory layout within a subdirectory for each project. In such setups, access control is often used to limit what projects a given user may access. git-svn failed to detect branches (e.g. when passing --stdlayout to clone) because it relied on having access to the root directory in the repository. This patch solves this problem by making git-svn use paths relative to the given repository URL instead of the repository root. Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de> Acked-by: Eric Wong <normalperson@yhbt.net> 11 July 2009, 21:14:32 UTC
3c49a03 git-svn: Always duplicate paths returned from get_log This makes get_log more safe to use because callers cannot run into path clobbering any more. The additional overhead will not affect performance since the critical calls from the fetch loop need the path duplication anyway and the rest of the call sites is not performance critical. Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de> Acked-by: Eric Wong <normalperson@yhbt.net> 11 July 2009, 21:14:32 UTC
d9eb020 quickfetch(): Prevent overflow of the rev-list command line quickfetch() calls rev-list to check whether the objects we are about to fetch are already present in the repo (if so, we can skip the object fetch). However, when there are many (~1000) refs to be fetched, the rev-list command line grows larger than the maximum command line size on some systems (32K in Windows). This causes rev-list to fail, making quickfetch() return non-zero, which unnecessarily triggers the transport machinery. This somehow causes fetch to fail with an exit code. By using the --stdin option to rev-list (and feeding the object list to its standard input), we prevent the overflow of the rev-list command line, which causes quickfetch(), and subsequently the overall fetch, to succeed. However, using rev-list --stdin is not entirely straightforward: rev-list terminates immediately when encountering an unknown object, which can trigger SIGPIPE if we are still writing object's to its standard input. We therefore temporarily ignore SIGPIPE so that the fetch process is not terminated. The patch also contains a testcase to verify the fix (note that before the patch, the testcase would only fail on msysGit). Signed-off-by: Johan Herland <johan@herland.net> Improved-by: Johannes Sixt <j6t@kdbg.org> Improved-by: Alex Riesen <raa.lkml@gmail.com> Tested-by: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 July 2009, 06:53:17 UTC
7c74ff5 Makefile: update IRIX64 section Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 July 2009, 06:50:29 UTC
1fdffc1 Makefile: add section for SGI IRIX 6.5 Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 July 2009, 06:50:29 UTC
ecc395c Makefile: add NEEDS_LIBGEN to optionally add -lgen to compile arguments Commit 003b33a8 recently added a call to basename(). On IRIX 6.5, this function resides in libgen and -lgen is required for the linker. Update configure.ac too. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 July 2009, 06:50:29 UTC
9398b85 git-compat-util.h: adjust for SGI IRIX 6.5 Don't define _XOPEN_SOURCE Do define _SGI_SOURCE Defining _XOPEN_SOURCE prevents many of the common functions and macros from being defined. _Not_ setting _XOPEN_SOURCE, and instead setting _SGI_SOURCE, provides all of the XPG4, XPG5, BSD, POSIX functions and declarations, _BUT_ provides a horribly broken snprintf(). SGI does have a working snprintf(), but it is only provided when _NO_XOPEN5 evaluates to zero, and this only happens if _XOPEN_SOURCE is defined which, as mentioned above, prevents many other common functions and defines. The broken snprintf will be worked around with SNPRINTF_RETURNS_BOGUS in the Makefile in a later patch. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 July 2009, 06:50:29 UTC
0039ba7 unpack-trees.c: work around run-time array initialization flaw on IRIX 6.5 The c99 MIPSpro Compiler version 7.4.4m on IRIX 6.5 does not properly initialize run-time initialized arrays. An array which is initialized with fewer elements than the length of the array should have the unitialized elements initialized to zero. This compiler only initializes the remaining elements when the last element is a static parameter. So work around it by adding a "NULL" initialization parameter. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 July 2009, 06:50:29 UTC
20f3749 Merge branch 'lt/dir-cleanup' * lt/dir-cleanup: Make index preloading check the whole path to the file Export thread-safe version of 'has_symlink_leading_path()' Prepare symlink caching for thread-safety Avoid using 'lstat()' to figure out directories Avoid doing extra 'lstat()'s for d_type if we have an up-to-date cache entry Simplify read_directory[_recursive]() arguments Add 'fill_directory()' helper function for directory traversal 11 July 2009, 03:18:37 UTC
73ccb91 Merge branch 'ae/maint-mailinfo-rm-only-one-patch-marker' * ae/maint-mailinfo-rm-only-one-patch-marker: mailinfo: Remove only one set of square brackets 11 July 2009, 03:18:09 UTC
6edd149 Makefile: keep "git" when bindir is execdir For some reason there still are people who use the old style layout to put everything in $(bindir). The previous commit breaks the install for them, because it tries to unconditionally remove git from execdir and cp/ln from bindir --- oops. Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 July 2009, 03:17:33 UTC
f62ce3d Make index preloading check the whole path to the file This uses the new thread-safe 'threaded_has_symlink_leading_path()' function to efficiently verify that the whole path leading up to the filename is a proper path, and does not contain symlinks. This makes 'ce_uptodate()' a much stronger guarantee: it no longer just guarantees that the 'lstat()' of the path would match, it also means that we know that people haven't played games with moving directories around and covered it up with symlinks. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 July 2009, 05:38:34 UTC
b9fd284 Export thread-safe version of 'has_symlink_leading_path()' The threaded index preloading will want it, so that it can avoid locking by simply using a per-thread symlink/directory cache. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 July 2009, 03:05:19 UTC
867f72b Prepare symlink caching for thread-safety This doesn't actually change the external interfaces, so they are still thread-unsafe, but it makes the code internally pass a pointer to a local 'struct cache_def' around, so that the core code can be made thread-safe. The threaded index preloading will want to verify that the paths leading up to a pathname are all real directories. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 July 2009, 03:05:19 UTC
443e061 Avoid using 'lstat()' to figure out directories If we have an up-to-date index entry for a file in that directory, we can know that the directories leading up to that file must be directories. No need to do an lstat() on the directory. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 July 2009, 03:05:19 UTC
4ecbc17 Makefile: install 'git' in execdir When a git command executes a subcommand, it uses the "git foo" form, which relies on finding "git" in the PATH. Normally this should not be a problem, since the same "git" that was used to invoke git in the first place will be found. And if somebody invokes a "git" outside of the PATH (e.g., by giving its absolute path), this case is already covered: we put that absolute path onto the front of PATH. However, if one is using "sudo", then sudo will execute the "git" from the PATH, but pass along a restricted PATH that may not contain the original "git" directory. In this case, executing a subcommand will fail. To solve this, we put the "git" wrapper itself into the execdir; this directory is prepended to the PATH when git starts, so the wrapper will always be found. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 July 2009, 08:19:51 UTC
caa6b78 Avoid doing extra 'lstat()'s for d_type if we have an up-to-date cache entry On filesystems without d_type, we can look at the cache entry first. Doing an lstat() can be expensive. Reported by Dmitry Potapov for Cygwin. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 July 2009, 08:11:30 UTC
dba2e20 Simplify read_directory[_recursive]() arguments Stop the insanity with separate 'path' and 'base' arguments that must match. We don't need that crazy interface any more, since we cleaned up handling of 'path' in commit da4b3e8c28b1dc2b856d2555ac7bb47ab712598c. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 July 2009, 08:11:28 UTC
1d8842d Add 'fill_directory()' helper function for directory traversal Most of the users of "read_directory()" actually want a much simpler interface than the whole complex (but rather powerful) one. In fact 'git add' had already largely abstracted out the core interface issues into a private "fill_directory()" function that was largely applicable almost as-is to a number of callers. Yes, 'git add' wants to do some extra work of its own, specific to the add semantics, but we can easily split that out, and use the core as a generic function. This function does exactly that, and now that much simplified 'fill_directory()' function can be shared with a number of callers, while also ensuring that the rather more complex calling conventions of read_directory() are used by fewer call-sites. This also makes the 'common_prefix()' helper function private to dir.c, since all callers are now in that file. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 July 2009, 08:11:26 UTC
3125be1 Merge branch 'ld/push-porcelain-output-format' * ld/push-porcelain-output-format: add --porcelain option to git-push 09 July 2009, 08:07:54 UTC
1d4bf0b Merge branch 'gb/gitweb-avatar' * gb/gitweb-avatar: gitweb: add empty alt text to avatar img gitweb: picon avatar provider gitweb: gravatar url cache gitweb: (gr)avatar support gitweb: use git_print_authorship_rows in 'tag' view too gitweb: uniform author info for commit and commitdiff gitweb: refactor author name insertion 09 July 2009, 08:00:59 UTC
c535d76 Merge branch 'ml/http' * ml/http: http.c: add http.sslCertPasswordProtected option http.c: prompt for SSL client certificate password Conflicts: http.c 09 July 2009, 08:00:36 UTC
128a9d8 Merge branch 'rs/grep-p' * rs/grep-p: grep: simplify -p output grep -p: support user defined regular expressions grep: add option -p/--show-function grep: handle pre context lines on demand grep: print context hunk marks between files grep: move context hunk mark handling into show_line() userdiff: add xdiff_clear_find_func() 09 July 2009, 07:59:58 UTC
ce4f404 Merge branch 'js/run-command-updates' (early part) * 'js/run-command-updates' (early part): MinGW: truncate exit()'s argument to lowest 8 bits 09 July 2009, 07:59:32 UTC
650d30d mailinfo: Remove only one set of square brackets git-format-patch prepends patches with a [PATCH x/n] prefix, but mailinfo used to remove any number of square-bracket pairs and the content between them. This prevents one from using a commit subject like this: [ and ] must be allowed as input Removing the square bracket pair from this rather clumsily constructed subject line loses important information, so we must take care not to. This patch causes the subject stripping to stop after it has encountered one pair of square brackets. One possible downside of this patch is that the patch-handling programs will now fail at removing author-added square-brackets to be removed, such as [RFC][PATCH x/n] However, since format-patch only adds one set of square brackets, this behaviour is quite easily undesrstood and defended while the previous behaviour is not. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 July 2009, 18:22:51 UTC
0da3e1d git-svn.txt: fix description of fetch flags accepted by clone. Signed-off-by: Yann Dirson <ydirson@altern.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 July 2009, 17:42:27 UTC
eb1f7e0 git-svn.txt: fix fetch flags incorrectly documented as init flags. Signed-off-by: Yann Dirson <ydirson@altern.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 July 2009, 17:42:27 UTC
6c32a7a git-svn.txt: make formatting more consistent. - correctly link paragraphs within list items - consistently format examples - put option alernatives on separate lines - always use [verse] for config items - always indent 1st paragraph of a list item, with a tab Signed-off-by: Yann Dirson <ydirson@altern.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 July 2009, 17:42:27 UTC
647ac70 git-svn.txt: stop using dash-form of commands. Also consistently use single quotes around git commands to make things clear (was only needed at a couple of places). Signed-off-by: Yann Dirson <ydirson@altern.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 July 2009, 17:42:27 UTC
26192be Merge branch 'maint' * maint: Documentation: update description of shell aliases 08 July 2009, 17:42:23 UTC
49902bd Merge branch 'cb/maint-fetch-refspec-wo-dst' into maint * cb/maint-fetch-refspec-wo-dst: fetch: do not create ref from empty name 08 July 2009, 16:52:25 UTC
b13493b Merge branch 'cf/maint-remote-uploadpack-useconfig-fix' into maint * cf/maint-remote-uploadpack-useconfig-fix: git-remote: fix missing .uploadpack usage for show command 08 July 2009, 16:52:14 UTC
595b8db Documentation: update description of shell aliases Aliases that invoke shell commands start from the top-level directory, but this was not documented. Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 July 2009, 16:45:28 UTC
f581de1 completion: __git_config_get_set_variables() handle values with spaces Commit 0065236 (bash completion: complete variable names for "git config" with options 2009-05-08) implemented its config variable search wrong. When a config contains a value with a space and a period (.) in it, completion erroneously thinks that line in the configuration is multiple config variables. For example $ cat .git/config format.cc = Junio C Hamano <gitster@pobox.com> $ git config --unset <TAB> format.cc <gitster@pobox.com> Instead of using a for loop splitting across spaces, pipe each line to a while read loop and beef up the case statement to match only 'config.variable=value'. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 July 2009, 16:45:00 UTC
dd787c1 Merge branch 'tr/die_errno' * tr/die_errno: Use die_errno() instead of die() when checking syscalls Convert existing die(..., strerror(errno)) to die_errno() die_errno(): double % in strerror() output just in case Introduce die_errno() that appends strerror(errno) to die() 06 July 2009, 16:39:46 UTC
864cd94 Merge branch 'cb/maint-fetch-refspec-wo-dst' * cb/maint-fetch-refspec-wo-dst: fetch: do not create ref from empty name 06 July 2009, 16:39:38 UTC
ea1b9b9 Merge branch 'sb/show-ref-parse-options' * sb/show-ref-parse-options: show-ref: migrate to parse-options 06 July 2009, 16:38:58 UTC
7557b34 Merge branch 'gb/am-foreign' * gb/am-foreign: git-am: refactor 'cleaning up and aborting' git-am foreign patch support: StGIT support git-am foreign patch support: autodetect some patch formats git-am foreign patch support: introduce patch_format 06 July 2009, 16:38:33 UTC
e526692 Merge branch 'jk/use-our-regexp' * jk/use-our-regexp: Makefile: Solaris needs HAVE_ALLOCA_H for alloca() Makefile: use compat regex on Solaris Makefile: refactor regex compat support 06 July 2009, 16:38:08 UTC
5cacf3d Merge branch 'uk/rev-parse-parse-opt' * uk/rev-parse-parse-opt: parse-opt: make PARSE_OPT_STOP_AT_NON_OPTION available to git rev-parse more tests for git rev-parse --parse-opt 06 July 2009, 16:38:01 UTC
3115fe9 Avoid generating a warning if $fullname{$file} is undefined Signed-off-by: Nick Woolley <git.wu-lee@noodlefactory.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 July 2009, 16:36:43 UTC
444f29c Remove archaic use of regex capture \1 in favour of $1 Using it will generate a perl warning "\1 better written as $1". Signed-off-by: Nick Woolley <git.wu-lee@noodlefactory.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 July 2009, 16:36:39 UTC
5d0e634 completion: Add --full-diff to log options Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 July 2009, 16:36:24 UTC
f290974 Allow the Unix epoch to be a valid commit date It is common practice to use the Unix epoch as a fallback date when a suitable date is not available. This is true of git svn and possibly other importing tools that import non-git history into git. Instead of clobbering established strtoul() error reporting semantics with our own, preserve the strtoul() error value of ULONG_MAX for fsck.c to handle. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 July 2009, 16:36:16 UTC
c8400d9 http-push: fix xml_entities() string parsing overrun xml_entities() in http-push.c did not properly stop at the end of the string being examined, which would occasionally cause nonsense to be appended to escaped URL strings and result in failed DAV XML queries Signed-off-by: Seth Hunter <hunter@ll.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 06 July 2009, 16:36:08 UTC
47e3de0 MinGW: truncate exit()'s argument to lowest 8 bits For some reason, MinGW's bash cannot reliably detect failure of the child process if a negative value is passed to exit(). This fixes it by truncating the exit code in all calls of exit(). This issue was worked around in run_builtin() of git.c (2488df84 builtin run_command: do not exit with -1, 2007-11-15). This workaround is no longer necessary and is reverted. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 05 July 2009, 19:16:26 UTC
ed24e40 grep: simplify -p output It was found a bit too loud to show == separators between the function headers. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 03 July 2009, 04:36:42 UTC
606475f Remove filename from conflict markers Put filenames into the conflict markers only when they are different. Otherwise they are redundant information clutter. Print the filename explicitely when warning about a binary conflict. Signed-off-by: Martin Renold <martinxyz@gmx.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 July 2009, 02:46:30 UTC
702beb3 Merge branch 'cc/bisect' * cc/bisect: Documentation: remove warning saying that "git bisect skip" may slow bisection bisect: use a PRNG with a bias when skipping away from untestable commits 02 July 2009, 02:41:04 UTC
a4103ba Merge branch 'js/daemon-log' * js/daemon-log: receive-pack: do not send error details to the client upload-pack: squelch progress indicator if client cannot see it daemon: send stderr of service programs to the syslog 02 July 2009, 02:41:00 UTC
59773c7 Merge branch 'cf/maint-remote-uploadpack-useconfig-fix' * cf/maint-remote-uploadpack-useconfig-fix: git-remote: fix missing .uploadpack usage for show command 02 July 2009, 02:40:54 UTC
e6c7c2c Merge branch 'sb/quiet-porcelains' * sb/quiet-porcelains: stash: teach quiet option am, rebase: teach quiet option submodule, repack: migrate to git-sh-setup's say() git-sh-setup: introduce say() for quiet options am: suppress apply errors when using 3-way t4150: test applying with a newline in subject 02 July 2009, 02:40:50 UTC
4197195 Merge branch 'ne/maint-1.6.0-diff-tree-t-r-show-directory' * ne/maint-1.6.0-diff-tree-t-r-show-directory: diff-tree -r -t: include added/removed directories in the output 02 July 2009, 02:40:47 UTC
3eb1e8e Merge branch 'maint' * maint: request-pull: really really disable pager 02 July 2009, 02:40:16 UTC
60ecac9 grep -p: support user defined regular expressions Respect the userdiff attributes and config settings when looking for lines with function definitions in git grep -p. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 July 2009, 02:16:50 UTC
2944e4e grep: add option -p/--show-function The new option -p instructs git grep to print the previous function definition as a context line, similar to diff -p. Such context lines are marked with an equal sign instead of a dash. This option complements the existing context options -A, -B, -C. Function definitions are detected using the same heuristic that diff uses. User defined regular expressions are not supported, yet. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 July 2009, 02:16:49 UTC
49de321 grep: handle pre context lines on demand Factor out pre context line handling into the new function show_pre_context() and change the algorithm to rewind by looking for newline characters and roll forward again, instead of maintaining an array of line beginnings and ends. This is slower for hits, but the cost for non-matching lines becomes zero. Normally, there are far more non-matching lines, so the time spent in total decreases. Before this patch (current Linux kernel repo, best of five runs): $ time git grep --no-ext-grep -B1 memset >/dev/null real 0m2.134s user 0m1.932s sys 0m0.196s $ time git grep --no-ext-grep -B1000 memset >/dev/null real 0m12.059s user 0m11.837s sys 0m0.224s The same with this patch: $ time git grep --no-ext-grep -B1 memset >/dev/null real 0m2.117s user 0m1.892s sys 0m0.228s $ time git grep --no-ext-grep -B1000 memset >/dev/null real 0m2.986s user 0m2.696s sys 0m0.288s Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 July 2009, 02:16:48 UTC
046802d grep: print context hunk marks between files Print a hunk mark before matches from a new file are shown, in addition to the current behaviour of printing them if lines have been skipped. The result is easier to read, as (presumably unrelated) matches from different files are separated by a hunk mark. GNU grep does the same. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 July 2009, 02:16:46 UTC
5dd06d3 grep: move context hunk mark handling into show_line() Move last_shown into struct grep_opt, to make it available in show_line(), and then make the function handle the printing of hunk marks for context lines in a central place. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 July 2009, 02:16:45 UTC
8cfe5f1 userdiff: add xdiff_clear_find_func() xdiff_set_find_func() is used to set user defined regular expressions for finding function signatures. Add xdiff_clear_find_func(), which frees the memory allocated by the former, making the API complete. Also, use the new function in diff.c (the only call site of xdiff_set_find_func()) to clean up after ourselves. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 02 July 2009, 02:16:37 UTC
653a31c request-pull: really really disable pager Earlier 476cc72 (request-pull: really disable pager, 2009-06-30) tried to use the correct environment variable to disable paging from multiple calls to "git log" and friends, but there was one extra call to "git log" that was not covered by the trick. Move the setting and exporting of GIT_PAGER much earlier in the script to cover everybody. Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 July 2009, 20:20:00 UTC
8715227 log-tree: fix confusing comment This comment mentions the case where use_terminator is set, but this case is not handled at all by this chunk of code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 01 July 2009, 18:16:54 UTC
725cf7b Merge branch 'maint' * maint: attr: plug minor memory leak request-pull: really disable pager Makes some cleanup/review in gittutorial Makefile: git.o depends on library headers git-submodule documentation: fix foreach example 30 June 2009, 23:12:35 UTC
d4c9856 attr: plug minor memory leak Free the memory allocated for struct strbuf pathbuf when we're done. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 June 2009, 23:12:24 UTC
6167c13 git.c: avoid allocating one-too-many elements for new argv array When creating a new argv array from a configured alias and the supplied command line arguments, the new argv was allocated with one element too many. Since the first element of the original argv array is skipped when copying it to the new_argv, the number of elements that are allocated should be reduced by one. 'count' is the number of elements that new_argv contains, and *argcp is the number of elements in the original argv array. So the total allocation (including the terminating NULL entry) for the new_argv array should be: count + (*argcp - 1) + 1 Also, the explicit assignment of the NULL terminating entry can be avoided by just copying it over from the original argv array. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 June 2009, 23:12:14 UTC
476cc72 request-pull: really disable pager ff06c74 (Improve request-pull to handle non-rebased branches, 2007-05-01) attempted to disable pager when running subcommands in this script, but with a wrong variable. If GIT_PAGER is set, it takes precedence over PAGER. Noticed by Michal Marek. Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 June 2009, 18:33:30 UTC
b8f2626 git-mv: fix directory separator treatment on Windows The following invocations did not work as expected on Windows: git mv foo\bar dest git mv foo\ dest The first command was interpreted as git mv foo/bar dest/foo/bar because the Windows style directory separator was not obeyed when the basename of 'foo\bar' was computed. The second command failed because the Windows style directory separator was not removed from the source directory, whereupon the lookup of the directory in the index failed. This fixes both issues by using is_dir_sep() and basename(). Signed-off-by: Johannes Sixt <j6t@kdbg.org> Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 June 2009, 18:23:21 UTC
6fac1b8 completion: add missing config variables Update to include branch.*.rebase, remote.*.pushurl, and add.ignore-errors Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 June 2009, 18:20:04 UTC
21d777f Makes some cleanup/review in gittutorial There are some different but little cleanup changes to fix some missing quotes, to fix what seemed to be an unended sentence, to reident a little paragraph with too large a sentence and fix a branch name that was referred to twice later by another name. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 June 2009, 18:17:55 UTC
back to top