summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-08-26git-log: allow --decorate[=short|full]Libravatar Lars Hjemli9-10/+65
Commit de435ac0 changed the behavior of --decorate from printing the full ref (e.g., "refs/heads/master") to a shorter, more human-readable version (e.g., just "master"). While this is nice for human readers, external tools using the output from "git log" may prefer the full version. This patch introduces an extension to --decorate to allow the caller to specify either the short or the full versions. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26Minor improvement to the write-tree documentationLibravatar David Kågedal1-1/+2
Signed-off-by: David Kågedal <davidk@lysator.liu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26git-bisect: call the found commit "*the* first bad commit"Libravatar Nanako Shiraishi3-11/+11
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-26Merge branch 'js/maint-cover-letter-non-ascii' into maintLibravatar Junio C Hamano4-12/+17
* js/maint-cover-letter-non-ascii: Correctly mark cover letters' encodings if they are not pure ASCII Expose the has_non_ascii() function
2009-08-26Merge branch 'jc/maint-clean-nested-dir-safety' into maintLibravatar Junio C Hamano6-5/+63
* jc/maint-clean-nested-dir-safety: clean: require double -f options to nuke nested git repository and work tree
2009-08-26Merge branch 'jk/maint-merge-msg-fix' into maintLibravatar Junio C Hamano4-11/+75
* jk/maint-merge-msg-fix: merge: indicate remote tracking branches in merge message merge: fix incorrect merge message for ambiguous tag/branch add tests for merge message headings
2009-08-26Merge branch 'jc/apply-epoch-patch' into maintLibravatar Junio C Hamano2-1/+176
* jc/apply-epoch-patch: apply: notice creation/removal patches produced by GNU diff
2009-08-26Merge branch 'jp/symlink-dirs' into maintLibravatar Junio C Hamano4-1/+114
* jp/symlink-dirs: t6035-merge-dir-to-symlink depends on SYMLINKS prerequisite git-checkout: be careful about untracked symlinks lstat_cache: guard against full match of length of 'name' parameter Demonstrate bugs when a directory is replaced with a symlink
2009-08-26Merge branch 'maint-1.6.3' into maintLibravatar Junio C Hamano2-0/+15
* maint-1.6.3: add -p: do not attempt to coalesce mode changes git add -p: demonstrate failure when staging both mode and hunk
2009-08-26Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into maint-1.6.3Libravatar Junio C Hamano2-0/+15
* tr/maint-1.6.3-add-p-modeonly-fix: add -p: do not attempt to coalesce mode changes git add -p: demonstrate failure when staging both mode and hunk
2009-08-21GIT 1.6.4.1Libravatar Junio C Hamano4-3/+50
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-21Merge branch 'bc/maint-am-email' into maintLibravatar Junio C Hamano2-1/+34
* bc/maint-am-email: git-am: print fair error message when format detection fails am: allow individual e-mail files as input
2009-08-21Merge branch 'jc/maint-merge-recursive-fix' into maintLibravatar Junio C Hamano2-3/+80
* jc/maint-merge-recursive-fix: merge-recursive: don't segfault while handling rename clashes
2009-08-21Merge branch 'zf/maint-gitweb-acname' into maintLibravatar Junio C Hamano1-3/+2
* zf/maint-gitweb-acname: gitweb: parse_commit_text encoding fix
2009-08-21Merge branch 'np/maint-limit-delta-cache' into maintLibravatar Junio C Hamano2-4/+12
* np/maint-limit-delta-cache: don't let the delta cache grow unbounded in 'git repack'
2009-08-21Merge branch 'jk/maint-show-tag' into maintLibravatar Junio C Hamano1-1/+7
* jk/maint-show-tag: show: add space between multiple items show: suppress extra newline when showing annotated tag
2009-08-21Merge branch 'sb/maint-pull-rebase' into maintLibravatar Junio C Hamano2-3/+24
* sb/maint-pull-rebase: pull: support rebased upstream + fetch + pull --rebase t5520-pull: Test for rebased upstream + fetch + pull --rebase
2009-08-18filter-branch: make the usage string fit on 80 chars terminals.Libravatar Matthieu Moy1-6/+6
It used to be a single, huge line, badly wrapped by xterm. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-18filter-branch: add an example how to add ACKs to a range of commitsLibravatar Johannes Schindelin1-0/+10
When you have to add certain lines like ACKs (or for that matter, Signed-off-by:s) to a range of commits starting with HEAD, you might be tempted to use 'git rebase -i -10', but that is a waste of your time. It is better to use 'git filter-branch' with an appropriate message filter, and this commit adds an example how to do so to filter-branch's man page. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-17docs: describe impact of repack on "clone -s"Libravatar Jeff King1-2/+10
The effects of repacking on a repository with alternates are a bit subtle. The two main things users will want are: 1. Not to waste disk space by accidentally copying objects which could be shared. 2. Copying all objects explicitly to break the dependency on the source repo. This patch describes both under the "clone -s" documentation. It makes sense to put it there rather than in git-repack.txt for both cases. For (1), we are warning the user who is using "clone -s" about what _not_ to do, so we need to get their attention when reading about "clone -s". For (2), we are telling them how git-repack can be used to accomplish a task, but until they know that git-repack is the right tool, they have no reason to look at the repack documentation. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-15add -p: do not attempt to coalesce mode changesLibravatar Thomas Rast2-1/+5
In 0392513 (add-interactive: refactor mode hunk handling, 2009-04-16), we merged the interaction loops for mode changes and hunk staging. This was fine at the time, because 0beee4c (git-add--interactive: remove hunk coalescing, 2008-07-02) removed hunk coalescing. However, in 7a26e65 (Revert "git-add--interactive: remove hunk coalescing", 2009-05-16), we resurrected it. Since then, the code would attempt in vain to merge mode changes with diff hunks, corrupting both in the process. We add a check to the coalescing loop to ensure it only looks at diff hunks, thus skipping mode changes. Noticed-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-15git add -p: demonstrate failure when staging both mode and hunkLibravatar Kirill Smelkov1-0/+11
When trying to stage changes to file which has also pending `chmod +x`, `git add -p` produces lots of 'Use of uninitialized value ...' warnings and fails to do the job: $ echo content >> file $ chmod +x file $ git add -p diff --git a/file b/file index e69de29..d95f3ad --- a/file +++ b/file old mode 100644 new mode 100755 Stage mode change [y,n,q,a,d,/,j,J,g,?]? y @@ -0,0 +1 @@ +content Stage this hunk [y,n,q,a,d,/,K,g,e,?]? y Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776. Use of uninitialized value $ofs in numeric le (<=) at .../git-add--interactive line 806. Use of uninitialized value $o0_ofs in concatenation (.) or string at .../git-add--interactive line 830. Use of uninitialized value $n0_ofs in concatenation (.) or string at .../git-add--interactive line 830. Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776. fatal: corrupt patch at line 5 diff --git a/file b/file index e69de29..d95f3ad --- a/file +++ b/file @@ -,0 + @@ +content Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-12Merge branch 'maint-1.6.3' into maintLibravatar Junio C Hamano9-12/+12
* maint-1.6.3: Change mentions of "git programs" to "git commands" Documentation: merge: one <remote> is required help.c: give correct structure's size to memset()
2009-08-12push: point to 'git pull' and 'git push --force' in case of non-fast forwardLibravatar Matthieu Moy4-5/+103
'git push' failing because of non-fast forward is a very common situation, and a beginner does not necessarily understand "fast forward" immediately. Add a new section to the git-push documentation and refer them to it. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-12Documentation: add: <filepattern>... is optionalLibravatar Paul Bolle1-1/+1
<filepattern>... is optional (e.g. when the --all or --update options are used) so use square brackets in the synopsis. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-12Change mentions of "git programs" to "git commands"Libravatar Ori Avtalion8-10/+10
Most of the docs and printouts refer to "commands" when discussing what the end users call via the "git" top-level program. We should refer them as "git programs" when we discuss the fact that the commands are implemented as separate programs, but in other contexts, it is better to use the term "git commands" consistently. Signed-off-by: Ori Avtalion <ori@avtalion.name> Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-12Documentation: merge: one <remote> is requiredLibravatar Paul Bolle1-1/+1
merge only requires one <remote>, so "<remote>..." should be used in the synopsis (and not "<remote> <remote>..."). Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-12help.c: give correct structure's size to memset()Libravatar Johan Herland1-1/+1
These two structures are of the same type, but we'd better be consistent. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-10Merge branch 'maint-1.6.3' into maintLibravatar Junio C Hamano2-4/+4
* maint-1.6.3: Fix typos in git-remote.txt and git-symbolic-ref.txt
2009-08-10Fix typos in git-remote.txt and git-symbolic-ref.txtLibravatar Štěpán Němec2-4/+4
Signed-off-by: Štěpán Němec <stepnem@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-10git-am: print fair error message when format detection failsLibravatar Nicolas Sebrecht1-1/+5
Avoid git ending with this message: "Patch format is not supported." With improved error message in the format detection failure case by Giuseppe Bilotta. Signed-off-by: Nicolas Sebrecht <ni.s@laposte.net> Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-10am: allow individual e-mail files as inputLibravatar Junio C Hamano2-0/+29
We traditionally allowed a mbox file or a directory name of a maildir (but never an individual file inside a maildir) to be given to "git am". Even though an individual file in a maildir (or more generally, a piece of RFC2822 e-mail) is not a mbox file, it contains enough information to create a commit out of it, so there is no reason to reject one. Running mailsplit on such a file feels stupid, but it does not hurt. This builds on top of a5a6755 (git-am foreign patch support: introduce patch_format, 2009-05-27) that introduced mailbox format detection. The codepath to deal with a mbox requires it to begin with "From " line and also allows it to begin with "From: ", but a random piece of e-mail can and often do begin with any valid RFC2822 header lines. Instead of checking the first line, we extract all the lines up to the first empty line, and make sure they look like e-mail headers. A test is added to t4150 to demonstrate this feature. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-10Correctly mark cover letters' encodings if they are not pure ASCIILibravatar Johannes Schindelin1-0/+4
If your name is, say, Üwë, you want your cover letters to appear correctly. Convince format-patch to mark it as 8-bit. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-10Expose the has_non_ascii() functionLibravatar Johannes Schindelin3-12/+13
This function is useful outside of log-tree.c, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09git-instaweb: fix mod_perl detection for apache2Libravatar Mark A Rada1-1/+1
The script was looking for something that matched the '^our $gitbin' regex, which no longer exists in gitweb.cgi. Now it looks for 'MOD_PERL', which should be on the line that checks to see if the script is running in a mod_perl environment. Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09merge: indicate remote tracking branches in merge messageLibravatar Jeff King3-1/+16
Previously when merging directly from a local tracking branch like: git merge origin/master The merge message said: Merge commit 'origin/master' * commit 'origin/master': ... Instead, let's be more explicit about what we are merging: Merge remote branch 'origin/master' * origin/master: ... We accomplish this by recognizing remote tracking branches in git-merge when we build the simulated FETCH_HEAD output that we feed to fmt-merge-msg. In addition to a new test in t7608, we have to tweak the expected output of t3409, which does such a merge. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09merge: fix incorrect merge message for ambiguous tag/branchLibravatar Jeff King3-11/+10
If we have both a tag and a branch named "foo", then calling "git merge foo" will warn about the ambiguous ref, but merge the tag. When generating the commit message, though, we simply checked whether "refs/heads/foo" existed, and if it did, assumed it was a branch. This led to the statement "Merge branch 'foo'" in the commit message, which is quite wrong. Instead, we should use dwim_ref to find the actual ref used, and describe it appropriately. In addition to the test in t7608, we must also tweak the expected output of t4202, which was accidentally triggering this bug. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09add tests for merge message headingsLibravatar Jeff King1-0/+50
When calling "git merge $X", we automatically generate a commit message containing something like "Merge branch '$X'". This test script checks that those messages say what they should, and exposes a failure when merging a refname that is ambiguous between a tag and a branch. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-09t6035-merge-dir-to-symlink depends on SYMLINKS prerequisiteLibravatar Johannes Sixt1-0/+6
Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-07Merge branch 'maint-1.6.3' into maintLibravatar Junio C Hamano2-11/+27
* maint-1.6.3: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
2009-08-07Merge branch 'maint-1.6.2' into maint-1.6.3Libravatar Junio C Hamano2-11/+27
* maint-1.6.2: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
2009-08-07Merge branch 'maint-1.6.1' into maint-1.6.2Libravatar Junio C Hamano2-11/+27
* maint-1.6.1: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
2009-08-07Merge branch 'maint-1.6.0' into maint-1.6.1Libravatar Junio C Hamano2-11/+27
* maint-1.6.0: verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used
2009-08-07verify-pack -v: do not report "chain length 0"Libravatar Junio C Hamano1-8/+19
When making a histogram of delta chain length in the pack, the program collects number of objects whose delta depth exceeds the MAX_CHAIN limit in histogram[0], and showed it as the number of items that exceeds the limit correctly. HOWEVER, it also showed the same number labeled as "chain length = 0". In fact, we are not showing the number of objects whose chain length is zero, i.e. the base objects. Correct this. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-07t5510: harden the way verify-pack is usedLibravatar Junio C Hamano1-3/+8
The test ignored the exit status from verify pack command, and also relied on not seeing any delta chain statistics. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-05don't let the delta cache grow unbounded in 'git repack'Libravatar Nicolas Pitre2-4/+12
I have 4GB of RAM on my system which should, in theory, be quite enough to repack a 600 MB repository. However the unbounded delta cache size always pushes it into swap, at which point everything virtually comes to a halt. So unbounded caches are never a good idea. A default of 256MB should be a good compromize between memory usage and speed where medium sized repositories are still likely to fit in the cache with a reasonable memory usage, and larger repositories are going to take quite some time to repack already anyway. While at it, clarify the associated config variable documentation entries a bit. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-05Merge branch 'maint-1.6.3' into maintLibravatar Junio C Hamano5-9/+11
* maint-1.6.3: Better usage string for reflog. hg-to-git: don't import the unused popen2 module send-email: remove debug trace config: Keep inner whitespace verbatim
2009-08-05gitweb: parse_commit_text encoding fixLibravatar Zoltán Füzesi1-3/+2
Call to_utf8 when parsing author and committer names, otherwise they will appear with bad encoding if they written by using chop_and_escape_str. Signed-off-by: Zoltán Füzesi <zfuzesi@eaglet.hu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-05gitweb/README: Document $base_urlLibravatar Jakub Narebski1-0/+6
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-05Documentation: git submodule: add missing options to synopsisLibravatar Jens Lehmann1-2/+2
The option --merge was missing for submodule update and --cached for submodule summary. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>