Staging
v0.8.1
https://github.com/git/git

sort by:
Revision Author Date Message Commit Date
3928097 diff: Help "less" hide ^M from the output When the tracked contents have CRLF line endings, colored diff output shows "^M" at the end of output lines, which is distracting, even though the pager we use by default ("less") knows to hide them. The problem is that "less" hides a carriage-return only at the end of the line, immediately before a line feed. The colored diff output does not take this into account, and emits four element sequence for each line: - force this color; - the line up to but not including the terminating line feed; - reset color - line feed. By including the carriage return at the end of the line in the second item, we are breaking the smart our pager has in order not to show "^M". This can be fixed by changing the sequence to: - force this color; - the line up to but not including the terminating end-of-line; - reset color - end-of-line. where end-of-line is either a single linefeed or a CRLF pair. When the output is not colored, "force this color" and "reset color" sequences are both empty, so we won't have this problem with or without this patch. Signed-off-by: Junio C Hamano <gitster@pobox.com> 31 August 2008, 03:34:45 UTC
bbb896d gitattributes: -crlf is not binary The description of crlf attribute incorrectly said that "-crlf" means binary. It is true that for binary files you would want "-crlf", but that is not the same thing. We also have supported attribute macros and via that mechanism a handy "binary" to specify "-crlf -diff" at the same time. It was not documented anywhere as far as I can tell, even though the support was there from the very beginning. Signed-off-by: Junio C Hamano <gitster@pobox.com> 31 August 2008, 03:30:45 UTC
ed0f47a git-apply: Loosen "match_beginning" logic Even after a handfle attempts, match_beginning logic still has corner cases: 1bf1a85 (apply: treat EOF as proper context., 2006-05-23) 65aadb9 (apply: force matching at the beginning., 2006-05-24) 4be6096 (apply --unidiff-zero: loosen sanity checks ..., 2006-09-17) ee5a317 (Fix "git apply" to correctly enforce "match ..., 2008-04-06) This is a tricky piece of code. We still incorrectly enforce "match_beginning" for -U0 matches. I noticed this while trying out an example sequence from Clemens Buchacher: $ echo a >victim $ git add victim $ echo b >>victim $ git diff -U0 >patch $ cat patch diff --git i/victim w/victim index 7898192..422c2b7 100644 --- i/victim +++ w/victim @@ -1,0 +2 @@ a +b $ git apply --cached --unidiff-zero <patch $ git show :victim b a The change inserts a new line before the second line, but we insist it to be applied at the beginning. As the result, the code refuses to apply it at the original offset, and we end up adding the line at the beginning. Updates to the test script are by Clemens Buchacher. Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 August 2008, 20:23:02 UTC
ee83724 Fix example in git-name-rev documentation Since 59d3f54 (name-rev: avoid "^0" when unneeded, 2007-02-20), name-rev stopped showing an unnecessary "^0" to dereference a tag down to a commit. The patch should have made a matching update to the documentation, but we forgot. Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 August 2008, 20:23:01 UTC
df85f78 Merge branch 'sp/missing-thin-base' into maint * sp/missing-thin-base: pack-objects: Allow missing base objects when creating thin packs 30 August 2008, 15:38:19 UTC
014aff7 Merge branch 'af/maint-install-no-handlink' into maint * af/maint-install-no-handlink: Fix use of hardlinks in "make install" Makefile: always provide a fallback when hardlinks fail 30 August 2008, 05:39:25 UTC
6ffaecc shell: do not play duplicated definition games to shrink the executable Playing with linker games to shrink git-shell did not go well with various other platforms and compilers. Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 August 2008, 05:38:41 UTC
4e3ae59 Fix use of hardlinks in "make install" The code failed to filter-out git-add properly on platforms were $X is not empty (ATM there is only one such a platform). Than it tried to create a hardlink to the file ($execdir/git-add) it just removed (because git-add is first in the BUILT_INS), so ln failed (but because stderr was redirected into /dev/null the error was never seen), and the whole install ended up using "ln -s" instead. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 August 2008, 05:37:04 UTC
d2b9dff Merge branch 'np/verify-pack' into maint * np/verify-pack: discard revindex data when pack list changes 30 August 2008, 04:48:02 UTC
53d1589 tutorial: gentler illustration of Alice/Bob workflow using gitk Update to gitutorial as discussedin the git mailing list: http://marc.info/?t=121969390900002&r=1&w=2 Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 August 2008, 07:14:30 UTC
d36f867 pretty=format: respect date format options When running a command like: git log --pretty=format:%ad --date=short the date option was ignored. This patch causes it to use whatever format was specified by --date (or by --relative-date, etc), just as the non-user formats would do. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 August 2008, 07:14:29 UTC
0cfeed2 make git-shell paranoid about closed stdin/stdout/stderr It is in general unsafe to start a program with one or more of file descriptors 0/1/2 closed. Karl Chen for example noticed that stat_command does this in order to rename a pipe file descriptor to 0: dup2(from, 0); close(from); ... but if stdin was closed (for example) from == 0, so that dup2(0, 0); close(0); just ends up closing the pipe. Another extremely rare but nasty problem would occur if an "important" file ends up in file descriptor 2, and is corrupted by a call to die(). Fixing this in git was considered to be overkill, so this patch works around it only for git-shell. The fix is simply to open all the "low" descriptors to /dev/null in main. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Acked-by: Stephen R. van den Berg <srb@cuci.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 August 2008, 07:14:29 UTC
29f2815 Document gitk --argscmd flag. This was part of my original patch, but appears to have been lost. Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 August 2008, 07:14:29 UTC
441bca0 Fix '--dirstat' with cross-directory renaming The dirstat code depends on the fact that we always generate diffs with the names sorted, since it then just does a single-pass walk-over of the sorted list of names and how many changes there were. The sorting means that all files are nicely grouped by directory. That all works fine. Except when we have rename detection, and suddenly the nicely sorted list of pathnames isn't all that sorted at all. And now the single-pass dirstat walk gets all confused, and you can get results like this: [torvalds@nehalem linux]$ git diff --dirstat=2 -M v2.6.27-rc4..v2.6.27-rc5 3.0% arch/powerpc/configs/ 6.8% arch/arm/configs/ 2.7% arch/powerpc/configs/ 4.2% arch/arm/configs/ 5.6% arch/powerpc/configs/ 8.4% arch/arm/configs/ 5.5% arch/powerpc/configs/ 23.3% arch/arm/configs/ 8.6% arch/powerpc/configs/ 4.0% arch/ 4.4% drivers/usb/musb/ 4.0% drivers/watchdog/ 7.6% drivers/ 3.5% fs/ The trivial fix is to add a sorting pass, fixing it to: [torvalds@nehalem linux]$ git diff --dirstat=2 -M v2.6.27-rc4..v2.6.27-rc5 43.0% arch/arm/configs/ 25.5% arch/powerpc/configs/ 5.3% arch/ 4.4% drivers/usb/musb/ 4.0% drivers/watchdog/ 7.6% drivers/ 3.5% fs/ Spot the difference. In case anybody wonders: it's because of a ton of renames from {include/asm-blackfin => arch/blackfin/include/asm} that just totally messed up the file ordering in between arch/arm and arch/powerpc. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 August 2008, 07:14:29 UTC
114ef90 for-each-ref: Allow a trailing slash in the patterns More often than not, I end up using something like refs/remotes/ as the pattern for for-each-ref, but that doesn't work, because it expects to see the slash in the ref name right after the matched pattern. So teach it to accept the slash as the final character in the pattern as well. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 August 2008, 07:14:06 UTC
c67b1fa ctype.c: protect tiny C preprocessor constants Some platforms contaminate the preprocessor token namespace with their own definition of SS without being asked. Avoid getting hit by redefinition warning messages by explicitly undef SS, AA and DD shorthand we use in this table definition. Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 August 2008, 23:14:22 UTC
0c68d38 index-pack: be careful after fixing up the header/footer The index-pack command, when processing a thin pack, fixed up the pack after-the-fact. It forgets to fsync the result, because it only did that in one path rather in all cases of fixup. This moves the fsync_or_die() to the fix-up routine itself, rather than doing it in one of the callers, so that all cases are covered. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 27 August 2008, 20:33:56 UTC
d0b92a3 index-pack: setup git repository "git index-pack" is an independent command and does not setup git repository while still need pack.indexversion. It may miss the info if it is in a subdirectory of the repository. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 August 2008, 23:25:48 UTC
2b84373 Suppress some bash redirection error messages In particular, when testing if the filesystem allows tabs in filenames, bash issues an error something like: ./t4016-diff-quote.sh: pathname with HT: No such file or directory which is caused by the failure of the (stdout) redirection, since the file cannot be created. In order to suppress the error message, you must redirect stderr to /dev/null, *before* the stdout redirection on the command-line. Also, remove a redundant filesystem check from the begining of the t3902-quoted.sh test and standardise the "test skipped" message to 'say' on exit. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 August 2008, 23:25:30 UTC
d47fb8b Fix a warning (on cygwin) to allow -Werror Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 August 2008, 23:22:00 UTC
3e073dc Makefile: always provide a fallback when hardlinks fail We make hardlinks from "git" to "git-<cmd>" built-ins and have been careful to avoid cross-device links when linking "git-<cmd>" to gitexecdir. However, we were not prepared to deal with a build directory that is incapable of making hard links within itself. This patch corrects it. Instead of temporarily linking "git" to gitexecdir, directly link "git- add", falling back to "cp". Try hardlinking that as "git-<cmd>", falling back to symlinks or "cp" on error. While at it, avoid 100+ error messages from hardlink failures when we are going to fall back to symlinks or "cp" by redirecting the standard error to /dev/null. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 August 2008, 06:14:39 UTC
0843acf Fix "git log -i --grep" This has been broken in v1.6.0 due to the reorganization of the revision option parsing code. The "-i" is completely ignored, but works fine in "git log --grep -i". What happens is that the code for "-i" looks for revs->grep_filter; if it is NULL, we do nothing, since there are no grep filters. But that is obviously not correct, since we want it to influence the later --grep option. Doing it the other way around works, since "-i" just impacts the existing grep_filter option. Instead, we now always initialize the grep_filter member and just fill in options and patterns as we get them. This means that we can no longer check grep_filter for NULL, but instead must check the pattern list to see if we have any actual patterns. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 25 August 2008, 06:28:02 UTC
5760a6b GIT 1.6.0.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 August 2008, 21:47:24 UTC
fb70928 Merge branch 'ag/maint-combine-diff-fix' into maint * ag/maint-combine-diff-fix: Respect core.autocrlf in combined diff 24 August 2008, 21:32:18 UTC
97e5f49 Merge branch 'mv/maint-merge-fix' into maint * mv/maint-merge-fix: merge: fix numerus bugs around "trivial merge" area 24 August 2008, 21:29:37 UTC
ab54cd6 Documentation: clarify pager configuration The unwary user may not know how to disable the -FRSX options. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 August 2008, 19:04:14 UTC
3281808 Documentation: clarify pager.<cmd> configuration It was not obvious from the text that pager.<cmd> is a boolean setting. While we're changing the description, make some other improvements: lest we forget and fret, clarify that -p and pager.<cmd> do not kick in when stdout is not a tty; point to related core.pager and GIT_PAGER settings; use renamed --paginate option. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 August 2008, 19:01:28 UTC
f5f7e4a Clean up the git-p4 documentation This patch massages the documentation a bit for improved readability and cleans it up from outdated options/commands. Signed-off-by: Simon Hausmann <simon@lst.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 August 2008, 19:00:14 UTC
5e568f9 Respect core.autocrlf in combined diff Fix git-diff to make it produce useful 3-way diffs for merge conflicts in repositories with autocrlf enabled. Otherwise it always reports that the whole file was changed, because it uses the contents from the working tree without necessary conversion. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 August 2008, 06:59:20 UTC
7d77016 Makefile: enable SNPRINTF_RETURNS_BOGUS for HP-UX In 81cc66a, customization has been added to Makefile for supporting HP-UX, but git commit is still problematic. This should fix the issue. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Acked-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 August 2008, 04:53:35 UTC
446247d merge: fix numerus bugs around "trivial merge" area The "trivial merge" codepath wants to optimize itself by making an internal call to the read-tree machinery, but it does not read the index before doing so, and the codepath is never exercised. Incidentally, this failure to read the index upfront means that the safety to refuse doing anything when the index is unmerged does not kick in, either. These two problem are fixed by using read_cache_unmerged() that does read the index before checking if it is unmerged at the beginning of cmd_merge(). The primary logic of the merge, however, assumes that the process never reads the index in-core, and the call to write_cache_as_tree() it makes from write_tree_trivial() will always read from the on-disk index that is prepared the strategy back-ends. This assumption is now broken by the above fix. To fix this issue, we now call discard_cache() before calling write_tree_trivial() when it wants to write the on-disk index as a tree. When multiple strategies are tried, their results are evaluated by reading the resulting index and inspecting it. The codepath needs to make a call to read_cache() for each successful strategy, and for that to work, they need to discard_cache() the one read by the previous round. Also the "trivial merge" forgot that the current commit is one of the parents of the resulting commit. Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 August 2008, 01:17:22 UTC
913e0e9 unpack_trees(): protect the handcrafted in-core index from read_cache() unpack_trees() rebuilds the in-core index from scratch by allocating a new structure and finishing it off by copying the built one to the final index. The resulting in-core index is Ok for most use, but read_cache() does not recognize it as such. The function is meant to be no-op if you already have loaded the index, until you call discard_cache(). This change the way read_cache() detects an already initialized in-core index, by introducing an extra bit, and marks the handcrafted in-core index as initialized, to avoid this problem. A better fix in the longer term would be to change the read_cache() API so that it will always discard and re-read from the on-disk index to avoid confusion. But there are higher level API that have relied on the current semantics, and they and their users all need to get converted, which is outside the scope of 'maint' track. An example of such a higher level API is write_cache_as_tree(), which is used by git-write-tree as well as later Porcelains like git-merge, revert and cherry-pick. In the longer term, we should remove read_cache() from there and add one to cmd_write_tree(); other callers expect that the in-core index they prepared is what gets written as a tree so no other change is necessary for this particular codepath. The original version of this patch marked the index by pointing an otherwise wasted malloc'ed memory with o->result.alloc, but this version uses Linus's idea to use a new "initialized" bit, which is conceptually much cleaner. Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 August 2008, 01:09:27 UTC
893d340 git-p4: Fix one-liner in p4_write_pipe function. The function built a p4 command string via the p4_build_cmd function, but ignored the result. Signed-off-by: Tor Arvid Lund <torarvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 August 2008, 05:40:13 UTC
4b480c6 discard revindex data when pack list changes This is needed to fix verify-pack -v with multiple pack arguments. Also, in theory, revindex data (if any) must be discarded whenever reprepare_packed_git() is called. In practice this is hard to trigger though. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 23 August 2008, 05:00:22 UTC
f135aac Completion: add missing '=' for 'diff --diff-filter' Signed-off-by: Eric Raible <raible@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 August 2008, 23:15:21 UTC
26463c8 Fix 'git help help' git help foo invokes man git-foo if foo is a git command, otherwise it invokes man gitfoo. 'help' is not a git command, but the manual page is called git-help, so add this special exception. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Acked-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 August 2008, 05:18:21 UTC
a81892d compat/snprintf.c: handle snprintf's that always return the # chars transmitted Some platforms provide a horribly broken snprintf. More broken than the platforms that return -1 when there is too little space in the target buffer for the formatted string. Some platforms provide an snprintf which _always_ returns the number of characters transmitted to the buffer, regardless of whether there was enough space or not. IRIX 6.5 is such a platform. IRIX 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, but definition of _XOPEN_SOURCE prevents inclusion of many other common functions and defines. So it must be avoided. Work around these horribly broken snprintf implementations by detecting an snprintf call which results in the number of transmitted characters exactly equal to the length of our buffer and retrying with a larger buffer just to be safe. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Acked-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 August 2008, 08:53:44 UTC
711521e git-svn: fix dcommit to urls with embedded usernames Don't rely on the extracted URL from working_head_info since that has the username removed. Instead use the $gs->full_url method (as before with ba24e74 (git-svn: add ability to specify --commit-url for dcommit, 2008-08-07)) to give us the URL to commit to if --commit-url is not specified. Aditionally, since we clean usernames from URLs, checking the URL after rebase can fail because it doesn't match the URL we used to commit; so unconditionally provide a username-free URL for checking the result of the refetch. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 August 2008, 06:48:07 UTC
4dc1db0 revision.h: make show_early_output an extern which is defined in revision.c The variable show_early_output is defined in revision.c and should be declared extern in revision.h so that the linker does not complain about multiply defined variables. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 21 August 2008, 02:59:06 UTC
9b99e64 Update draft release notes for 1.6.0.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2008, 23:05:01 UTC
3a634dc Add hints to revert documentation about other ways to undo changes Based on its name, people may read the 'git revert' documentation when they want to undo local changes, especially people who have used other SCM's. 'git revert' may not be what they had in mind, but git provides several other ways to undo changes to files. We can help them by pointing them towards the git commands that do what they might want to do. Cc: Daniel Barkalow <barkalow@iabervon.org> Cc: Lea Wiemann <lewiemann@gmail.com> Signed-off-by: Tarmigan Casebolt <tarmigan+git@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2008, 23:04:45 UTC
71f4637 Install templates with the user and group of the installing personality If 'make install' was run with sufficient privileges, then the installed templates, which are copied using 'tar', would receive the user and group of whoever built git. This instructs 'tar' to ignore the user and group that are recorded in the archive. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2008, 23:01:45 UTC
9ca8f60 "git-merge": allow fast-forwarding in a stat-dirty tree We used to refresh the index to clear stat-dirtyness before a fast-forward merge. Recent C rewrite forgot to do this. Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2008, 22:49:21 UTC
25b3d4d completion: find out supported merge strategies correctly "git-merge" is a binary executable these days, and looking for assignment to $all_strategies variable with grep/sed does not work well. When asked for an unknown strategy, pre-1.6.0 and post-1.6.0 "git merge" commands respectively say: $ $HOME/git-snap-v1.5.6.5/bin/git merge -s help available strategies are: recur recursive octopus resolve stupid ours subtree $ $HOME/git-snap-v1.6.0/bin/git merge -s help Could not find merge strategy 'help'. Available strategies are: recursive octopus resolve ours subtree. both on their standard error stream. We can use this to learn what strategies are supported. The sed script is written in such a way that it catches both old and new message styles ("Available" vs "available", and the full stop at the end). It also allows future versions of "git merge" to line-wrap the list of strategies, and add extra comments, like this: $ $HOME/git-snap-v1.6.1/bin/git merge -s help Could not find merge strategy 'help'. Available strategies are: blame recursive octopus resolve ours subtree. Also you have custom strategies: theirs Make sure you spell strategy names correctly. Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2008, 22:48:52 UTC
54988bd decorate: allow const objects to be decorated We don't actually modify the struct object, so there is no reason not to accept const versions (and this allows other callsites, like the next patch, to use the decoration machinery). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2008, 20:30:49 UTC
e276c26 for-each-ref: cope with tags with incomplete lines If you have a tag with a single, incomplete line as its payload, asking git-for-each-ref for its %(body) element accessed a NULL pointer. Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2008, 20:29:30 UTC
c35539e diff --check: do not get confused by new blank lines in the middle The code remembered that the last diff output it saw was an empty line, and tried to reset that state whenever it sees a context line, a non-blank new line, or a new hunk. However, this codepath asks the underlying diff engine to feed diff without any context, and the "just saw an empty line" state was not reset if you added a new blank line in the last hunk of your patch, even if it is not the last line of the file. Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2008, 20:28:19 UTC
c71e917 remote.c: remove useless if-before-free test We removed a handful of these useless if-before-free tests several months ago. This change removes a new one that snuck back in. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2008, 04:09:30 UTC
e9d7d10 mailinfo: avoid violating strbuf assertion In handle_from, we calculate the end boundary of a section to remove from a strbuf using strcspn like this: el = strcspn(buf, set_of_end_boundaries); strbuf_remove(&sb, start, el + 1); This works fine if "el" is the offset of the boundary character, meaning we remove up to and including that character. But if the end boundary didn't match (that is, we hit the end of the string as the boundary instead) then we want just "el". Asking for "el+1" caught an out-of-bounds assertion in the strbuf library. This manifested itself when we got a 'From' header that had just an email address with nothing else in it (the end of the string was the end of the address, rather than, e.g., a trailing '>' character), causing git-mailinfo to barf. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2008, 02:36:56 UTC
c8c4450 git format-patch: avoid underrun when format.headers is empty or all NLs * builtin-log.c (add_header): Avoid a buffer underrun when format.headers is empty or all newlines. Reproduce with this: git config format.headers '' && git format-patch -1 Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 20 August 2008, 01:08:00 UTC
26e08a0 t1002-read-tree-m-u-2way.sh: use 'git diff -U0' rather than 'diff -U0' Some old platforms have an old diff which doesn't have the -U option. 'git diff' can be used in its place. Adjust the comparison function to strip git's additional header lines to make this possible. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 August 2008, 06:27:14 UTC
da9973c adapt git-cvsserver manpage to dash-free syntax Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 August 2008, 05:05:44 UTC
289796d mailinfo: re-fix MIME multipart boundary parsing Recent changes to is_multipart_boundary() caused git-mailinfo to segfault. The reason was after handling the end of the boundary the code tried to look for another boundary. Because the boundary list was empty, dereferencing the pointer to the top of the boundary caused the program to go boom. The fix is to check to see if the list is empty and if so go on its merry way instead of looking for another boundary. I also fixed a couple of increments and decrements that didn't look correct relating to content_top. The boundary test case was updated to catch future problems like this again. Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 August 2008, 05:05:02 UTC
dba9194 Start 1.6.0.X maintenance series Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 August 2008, 22:44:11 UTC
ea02eef GIT 1.6.0 Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 August 2008, 18:42:10 UTC
373a273 Merge git-gui 0.11.0 17 August 2008, 18:41:19 UTC
a1975c4 Merge branch 'ak/p4' * ak/p4: Utilise our new p4_read_pipe and p4_write_pipe wrappers Add p4 read_pipe and write_pipe wrappers Put in the two other configuration elements found in the source Put some documentation in about the parameters that have been added Move git-p4.syncFromOrigin into a configuration parameters section Consistently use 'git-p4' for the configuration entries If the user has configured various parameters, use them. Switch to using 'p4_build_cmd' If we are in verbose mode, output what we are about to run (or return) Add a single command that will be used to construct the 'p4' command Utilise the new 'p4_system' function. Have a command that specifically invokes 'p4' (via system) Utilise the new 'p4_read_pipe_lines' command Create a specific version of the read_pipe_lines command for p4 invocations Conflicts: contrib/fast-import/git-p4 17 August 2008, 17:53:57 UTC
053fd0c git-p4: chdir now properly sets PWD environment variable in msysGit P4 on Windows expects the PWD environment variable to be set to the current working dir, but os.chdir in python doesn't do so. Signed-off-by: Robert Blum <rob.blum@gmail.com> Acked-by: Simon Hausmann <simon@lst.de> Acked-by: Han-Wen Nienhuys <hanwen@xs4all.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 August 2008, 06:37:04 UTC
9b752a6 Improve error output of git-rebase "git rebase" without arguments on initial startup showed: fatal: Needed a single revision invalid upstream This patch makes it show the ordinary usage string. If .git/rebase-merge or .git/rebase-apply/rebasing exists, git-rebase will die with a message saying that a rebase is in progress and the user should try --skip/--abort/--continue. If .git/rebase-apply/applying exists, git-rebase will die with a message saying that git-am is in progress, regardless how many arguments are given. If no arguments are given and .git/rebase-apply/ exists, but neither a rebasing nor applying file is in that directory, git-rebase dies with a message saying that rebase-apply exists and no arguments were given. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 August 2008, 06:21:18 UTC
20a55f4 t9300: replace '!' with test_must_fail Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 August 2008, 06:21:18 UTC
a0d74d1 Merge git://git.kernel.org/pub/scm/gitk/gitk * git://git.kernel.org/pub/scm/gitk/gitk: gitk: Allow safely calling nukefile from a run queue handler 17 August 2008, 06:21:07 UTC
c14c8ce Git.pm: Make File::Spec and File::Temp requirement lazy This will ensure that the API at large is accessible to nearly all Perl versions, while only the temp file caching API is tied to the File::Temp and File::Spec modules being available. Signed-off-by: Marcus Griep <marcus@griep.us> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 August 2008, 09:58:22 UTC
4370c2d Documentation: document the pager.* configuration setting It was already documented in RelNotes-1.6.0, but not in the git-config manual page. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 August 2008, 09:58:22 UTC
a5ab00c git-stash: improve synopsis in help and manual page "git stash -h" showed some incomplete and ugly usage information. For example, the useful "--keep-index" option for "save" or the "--index" option for "apply" were not shown. Also in the documentation synopsis they were not shown, so that there is no incentive to scroll down and even see that such options exist. This patch improves the git-stash synopsis in the documentation by mentioning that further options to the stash commands and then copies this synopsis to the usage information string of git-stash.sh. For the latter, the dashless git command string has to be inserted on the second and the following usage lines. The code of this is taken from git-sh-setup so that all lines will show the command string. Note that the "create" command is not advertised at all now, because it was not mentioned in git-stash.txt. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 August 2008, 09:58:18 UTC
0d768f7 Makefile: building git in cygwin 1.7.0 On platforms with $X, make removes any leftover scripts 'a' from earlier builds if a new binary 'a.exe' is now built. However, on cygwin 1.7.0, 'git' and 'git.exe' now consistently name the same file. Test for file equality before attempting a remove, in order to avoid nuking just-built binaries. Signed-off-by: Eric Blake <ebb9@byu.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 August 2008, 09:34:23 UTC
cb3a160 git-am: ignore --binary option The git-apply documentation says that --binary is a historical option. This patch lets git-am ignore --binary and removes advertisements of this option. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 August 2008, 09:32:36 UTC
2946ccc bash-completion: Add non-command git help files to bash-completion Git allows access to the gitattributes man page via `git help attributes`, but this is not discoverable via the bash-completion mechanism. This patch adds all current non-command man pages to the completion candidate list. Signed-off-by: Marcus Griep <marcus@griep.us> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 August 2008, 09:32:01 UTC
8134a00 Fix t3700 on filesystems which do not support question marks in names Use square brackets instead. And the prominent example of the deficiency are, as usual, the filesystems of Microsoft house. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 August 2008, 08:38:37 UTC
a7d3ef9 Utilise our new p4_read_pipe and p4_write_pipe wrappers Signed-off-by: Anand Kumria <wildfire@progsoc.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 August 2008, 01:14:24 UTC
d942919 Add p4 read_pipe and write_pipe wrappers Two additional wrappers to cover 3 places where we utilise p4 in piped form. Found by Tor Arvid Lund. Signed-off-by: Anand Kumria <wildfire@progsoc.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 August 2008, 01:14:23 UTC
5a13c8f bash completion: Add '--merge' long option for 'git log' Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 August 2008, 00:49:12 UTC
b4c7216 bash completion: Add completion for 'git mergetool' The --tool= long option to "git mergetool" can be completed with: kdiff3 tkdiff meld xxdiff emerge vimdiff gvimdiff ecmerge opendiff Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 August 2008, 00:49:12 UTC
f491239 git format-patch documentation: clarify what --cover-letter does Signed-off-by: Matt McCutchen <matt@mattmccutchen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 August 2008, 00:49:12 UTC
7950659 bash completion: 'git apply' should use 'fix' not 'strip' Bring completion up to date with the man page. Signed-off-by: Eric Raible <raible@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 August 2008, 00:49:12 UTC
a0653d5 Merge branch 'maint' * maint: t5304-prune: adjust file mtime based on system time rather than file mtime Fix escaping of glob special characters in pathspecs 14 August 2008, 02:22:29 UTC
21926fe t5304-prune: adjust file mtime based on system time rather than file mtime test-chmtime can adjust the mtime of a file based on the file's mtime, or based on the system time. For files accessed over NFS, the file's mtime is set by the NFS server, and as such may vary a great deal from the NFS client's system time if the clocks of the client and server are out of sync. Since these tests are testing the expire feature of git-prune, an incorrect mtime could cause a file to be expired or not expired incorrectly and produce a test failure. Avoid this NFS pitfall by modifying the calls to test-chmtime so that the mtime is adjusted based on the system time, rather than the file's mtime. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 August 2008, 01:18:23 UTC
8caa3ac test-parse-options: use appropriate cast in length_callback OPT_CALLBACK() is passed &integer which is now an "int" rather than "unsigned long". Update the length_callback function. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 August 2008, 01:11:44 UTC
ea335b5 Fix escaping of glob special characters in pathspecs match_one implements an optimized pathspec match where it only uses fnmatch if it detects glob special characters in the pattern. Unfortunately it didn't treat \ as a special character, so attempts to escape a glob special character would fail even though fnmatch() supports it. Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 August 2008, 00:11:03 UTC
a96dc01 rebase -i -p: fix parent rewriting The existing parent rewriting did not handle the case where a previous commit was amended (via edit or squash). Fix by always putting the new sha1 of the last commit into the $REWRITTEN map. Signed-off-by: Thomas Rast <trast@student.ethz.ch> 13 August 2008, 22:17:10 UTC
71d9451 rebase -i -p: handle index and workdir correctly 'git rebase -i -p' forgot to update the index and working directory during fast forwards. Fix this. Makes 'GIT_EDITOR=true rebase -i -p <ancestor>' a no-op again. Also, it attempted to do a fast forward even if it was instructed not to commit (via -n). Fall back to the cherry-pick code path and let that handle the issue for us. Signed-off-by: Thomas Rast <trast@student.ethz.ch> 13 August 2008, 22:17:09 UTC
65f59e2 GIT 1.6.0-rc3 Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 August 2008, 05:46:33 UTC
fc721b6 Merge branch 'maint' * maint: Do not talk about "diff" in rev-list documentation. 13 August 2008, 05:46:22 UTC
9612e74 Do not talk about "diff" in rev-list documentation. Since 8c02eee (git-rev-list(1): group options; reformat; document more options, 2006-09-01), git-rev-list documentation talks as if it supports any kind of diff output. It doesn't. Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 August 2008, 05:40:44 UTC
c67a9e2 Merge git://git.bogomips.org/git-svn * git://git.bogomips.org/git-svn: git-svn: Reduce temp file usage when dealing with non-links git-svn: Make it incrementally faster by minimizing temp files Git.pm: Add faculties to allow temp files to be cached 13 August 2008, 04:41:29 UTC
510b094 git-svn: Reduce temp file usage when dealing with non-links Currently, in sub 'close_file', git-svn creates a temporary file and copies the contents of the blob to be written into it. This is useful for symlinks because svn stores symlinks in the form: link $FILE_PATH Git creates a blob only out of '$FILE_PATH' and uses file mode to indicate that the blob should be interpreted as a symlink. As git-hash-object is invoked with --stdin-paths, a duplicate of the link from svn must be created that leaves off the first five bytes, i.e. 'link '. However, this is wholly unnecessary for normal blobs, though, as we already have a temp file with their contents. Copying the entire file gains nothing, and effectively requires a file to be written twice before making it into the object db. This patch corrects that issue, holding onto the substr-like duplication for symlinks, but skipping it altogether for normal blobs by reusing the existing temp file. Signed-off-by: Marcus Griep <marcus@griep.us> Acked-by: Eric Wong <normalperson@yhbt.net> 13 August 2008, 03:46:54 UTC
0b19138 git-svn: Make it incrementally faster by minimizing temp files Currently, git-svn would create a temp file on four occasions: 1. Reading a blob out of the object db 2. Creating a delta from svn 3. Hashing and writing a blob into the object db 4. Reading a blob out of the object db (in another place in code) Any time git-svn did the above, it would dutifully create and then delete said temp file. Unfortunately, this means that between 2-4 temporary files are created/deleted per file 'add/modify'-ed in svn (O(n)). This causes significant overhead and helps the inode counter to spin beautifully. By its nature, git-svn is a serial beast. Thus, reusing a temp file does not pose significant problems. "truncate and seek" takes much less time than "unlink and create". This patch centralizes the tempfile creation and holds onto the tempfile until they are deleted on exit. This significantly reduces file overhead, now requiring at most three (3) temp files per run (O(1)). Signed-off-by: Marcus Griep <marcus@griep.us> Acked-by: Eric Wong <normalperson@yhbt.net> 13 August 2008, 03:46:54 UTC
e41352b Git.pm: Add faculties to allow temp files to be cached This patch offers a generic interface to allow temp files to be cached while using an instance of the 'Git' package. If many temp files are created and destroyed during the execution of a program, this caching mechanism can help reduce the amount of files created and destroyed by the filesystem. The temp_acquire method provides a weak guarantee that a temp file will not be stolen by subsequent requests. If a file is locked when another acquire request is made, a simple error is thrown. Signed-off-by: Marcus Griep <marcus@griep.us> Acked-by: Eric Wong <normalperson@yhbt.net> 13 August 2008, 03:46:54 UTC
70d9895 Documentation: rev-list-options: Rewrite simplification descriptions for clarity This completely rewrites the documentation of --full-history with lots of examples. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 August 2008, 00:54:06 UTC
23b5beb Teach git diff about BibTeX head hunk patterns All BibTeX entries starts with an @ followed by an entry type. Since there are many entry types and own can be defined, the pattern matches legal entry type names instead of just the default types (which would be a long list). The pattern also matches strings and comments since they will also be useful to position oneself in a bib-file. Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2008, 22:43:55 UTC
d08ed6d gitattributes: Document built in hunk header patterns Since the hunk header pattern text was written patterns for Ruby and Pascal/Delphi have been added. For users to be able to find them they should be documented not only in code. Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2008, 22:41:32 UTC
bd7b371 git-daemon: SysV needs the signal handler reinstated. Fixes the bug on (amongst others) Solaris that only the first child ever is reaped. Signed-off-by: Stephen R. van den Berg <srb@cuci.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2008, 22:41:08 UTC
6d6f9cd pack-objects: Allow missing base objects when creating thin packs If we are building a thin pack and one of the base objects we would consider for deltification is missing its OK, the other side already has that base object. We may be able to get a delta from another object, or we can simply send the new object whole (no delta). This change allows a shallow clone to store only the objects which are unique to it, as well as the boundary commit and its trees, but avoids storing the boundary blobs. This special form of a shallow clone is able to represent just the difference between two trees. Pack objects change suggested by Nicolas Pitre. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2008, 22:39:46 UTC
04c6e9e diff --check: do not unconditionally complain about trailing empty lines Recently "git diff --check" learned to detect new trailing blank lines just like "git apply --whitespace" does. However this check should not trigger unconditionally. This patch makes it honor the whitespace settings from core.whitespace and gitattributes. Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2008, 05:15:28 UTC
7e4ad90 Merge branch 'maint' * maint: git-bisect: fix wrong usage of read(1) 12 August 2008, 02:24:28 UTC
5b5aa22 Put in the two other configuration elements found in the source I am not entirely clear what these parameters do but felt it useful to call them out in the documentation. Signed-off-by: Anand Kumria <wildfire@progsoc.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2008, 01:57:04 UTC
b87a659 Put some documentation in about the parameters that have been added Signed-off-by: Anand Kumria <wildfire@progsoc.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2008, 01:57:04 UTC
bc02acf Move git-p4.syncFromOrigin into a configuration parameters section Signed-off-by: Anand Kumria <wildfire@progsoc.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2008, 01:57:04 UTC
3cafb7d Consistently use 'git-p4' for the configuration entries Signed-off-by: Anand Kumria <wildfire@progsoc.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2008, 01:57:04 UTC
abcaf07 If the user has configured various parameters, use them. Some repositories require authentication and access to certain hosts. Allow git-p4 to pull this information from the configuration Signed-off-by: Anand Kumria <wildfire@progsoc.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2008, 01:57:04 UTC
155af83 Switch to using 'p4_build_cmd' Signed-off-by: Anand Kumria <wildfire@progsoc.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 August 2008, 01:57:04 UTC
back to top