summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-12-29diff: add option to show context between close hunksLibravatar René Scharfe7-1/+106
Merge two hunks if there is only the specified number of otherwise unshown context between them. For --inter-hunk-context=1, the resulting patch has the same number of lines but shows uninterrupted context instead of a context header line in between. Patches generated with this option are easier to read but are also more likely to conflict if the file to be patched contains other changes. This patch keeps the default for this option at 0. It is intended to just make the feature available in order to see its advantages and downsides. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-27Merge branch 'maint'Libravatar Junio C Hamano7-97/+145
* maint: git-send-email.txt: move --format-patch paragraph to a proper location git-shortlog.txt: improve documentation about .mailmap files pretty: support multiline subjects with format: pretty: factor out format_subject() pretty: factor out skip_empty_lines() merge-file: handle freopen() failure daemon: cleanup: factor out xstrdup_tolower() daemon: cleanup: replace loop with if daemon: handle freopen() failure describe: Avoid unnecessary warning when using --all
2008-12-27Start 1.6.2 cycleLibravatar Junio C Hamano2-1/+29
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-27Merge branch 'rs/maint-tformat-foldline' into maintLibravatar Junio C Hamano1-46/+73
* rs/maint-tformat-foldline: pretty: support multiline subjects with format: pretty: factor out format_subject() pretty: factor out skip_empty_lines()
2008-12-27Merge branch 'rs/maint-retval-fix' into maintLibravatar Junio C Hamano2-37/+26
* rs/maint-retval-fix: merge-file: handle freopen() failure daemon: cleanup: factor out xstrdup_tolower() daemon: cleanup: replace loop with if daemon: handle freopen() failure
2008-12-27Merge branch 'sp/maint-describe-all-tag-warning' into maintLibravatar Junio C Hamano2-1/+7
* sp/maint-describe-all-tag-warning: describe: Avoid unnecessary warning when using --all
2008-12-27git-send-email.txt: move --format-patch paragraph to a proper locationLibravatar Adeodato Simó1-6/+6
When introducing --format-patch, its documentation was accidentally inserted in the middle of documentation for --validate. Signed-off-by: Adeodato Simó <dato@net.com.org.es> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-27git-shortlog.txt: improve documentation about .mailmap filesLibravatar Adeodato Simó1-7/+33
The description on .mailmap made it seem like they are only useful for commits with a wrong address for an author, but they are about fixing the real name. Explain this better in the text, and replace the existing example with a new one that hopefully makes things clearer. Signed-off-by: Adeodato Simó <dato@net.com.org.es> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-27pretty: support multiline subjects with format:Libravatar René Scharfe1-19/+34
git log --pretty=format:%s (and tformat:) used to display the first line of the subject, unlike the other --pretty options, which would construct a subject line from all lines of the first paragraph of the commit message. For consistency and increased code reuse, change format: to do the same as the other options. Before: $ git log --pretty=oneline v1.6.1 | md5sum 7c0896d2a94fc3315a0372b9b3373a8f - $ git log --pretty=tformat:"%H %s" v1.6.1 | md5sum 298903b1c065002e15daa5329213c51f - After: $ git log --pretty=tformat:"%H %s" v1.6.1 | md5sum 7c0896d2a94fc3315a0372b9b3373a8f - $ git log --pretty=oneline v1.6.1 | md5sum 7c0896d2a94fc3315a0372b9b3373a8f - Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-27pretty: factor out format_subject()Libravatar René Scharfe1-18/+24
The next patch will use it. In the version that was factored out, we can't rely on the len of the struct strbuf to find out if a line separator needs to be added, as it might already contain something. Add a guard variable ("first") instead. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-27pretty: factor out skip_empty_lines()Libravatar René Scharfe1-9/+15
The patch after the next one will use it. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-26merge-file: handle freopen() failureLibravatar René Scharfe1-2/+5
Report the error if redirection of stderr to /dev/null failed. This silences a compiler warning about ignoring the return value of freopen() on Ubuntu 8.10. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-26daemon: cleanup: factor out xstrdup_tolower()Libravatar René Scharfe1-21/+13
Add xstrdup_tolower(), a helper to get a lower case copy of a string, and use it in two cases. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-26daemon: cleanup: replace loop with ifLibravatar René Scharfe1-13/+5
Replace a loop around an enter_repo() call, which was used to retry a single time with a different parameter in case the first call fails, with two calls and an if. This is shorter and cleaner. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-26daemon: handle freopen() failureLibravatar René Scharfe1-1/+3
Die if stderr couldn't be sent to /dev/null when operating in inetd mode and report the error message from the OS. This fixes a compiler warning about the return value of freopen() being ignored on Ubuntu 8.10. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-26describe: Avoid unnecessary warning when using --allLibravatar Shawn O. Pearce2-1/+7
In 212945d4 ("Teach git-describe to verify annotated tag names before output") git-describe learned how to output a warning if an annotated tag object was matched but its internal name doesn't match the local ref name. However, "git describe --all" causes the local ref name to be prefixed with "tags/", so we need to skip over this prefix before comparing the local ref name with the name recorded inside of the tag object. Patch-by: René Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-24GIT 1.6.1Libravatar Junio C Hamano2-0/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-24Merge branch 'js/rebase-i-p'Libravatar Junio C Hamano2-16/+58
* js/rebase-i-p: rebase -i -p: leave a --cc patch when a merge could not be redone rebase -i -p: Fix --continue after a merge could not be redone Show a failure of rebase -p if the merge had a conflict
2008-12-24rebase -i -p: leave a --cc patch when a merge could not be redoneLibravatar Johannes Schindelin2-3/+13
The result is easier to review this way, and the merge resolution has to be done inside the work tree, not by adjusting "the patch" anyway.
2008-12-22t9129: skip the last three tests if UTF-8 locale is not availableLibravatar Miklos Vajna1-13/+17
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21GIT 1.6.1-rc4Libravatar Junio C Hamano1-1/+18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21Always show which directory is not a git repositoryLibravatar Richard Hartmann3-4/+4
Unify all fatal: Not a git repository error messages so they include path information. Signed-off-by: Richard Hartmann <richih@net.in.tum.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21Make help entries alphabeticalLibravatar Richard Hartmann1-4/+4
Signed-off-by: Richard Hartmann <richih@net.in.tum.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21Merge branch 'maint'Libravatar Junio C Hamano1-1/+2
* maint: doc/git-fsck: change the way for getting heads' SHA1s
2008-12-21git-revert documentation: refer to new HOWTO on reverting faulty mergesLibravatar Boyd Stephen Smith Jr1-0/+8
Signed-off-by: Boyd Stephen Smith Jr <bss@iguanasuicide.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21git-revert: record the parent against which a revert was madeLibravatar Robin Rosenberg1-0/+5
As described in Documentation/howto/revert-a-faulty-merge.txt, re-merging from a previously reverted a merge of a side branch may need a revert of the revert beforehand. Record against which parent the revert was made in the commit, so that later the user can figure out what went on. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21Merge git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano2-63/+213
* git://git.kernel.org/pub/scm/gitk/gitk: gitk: Force the focus to the main window on Windows gitk: Allow unbalanced quotes/braces in commit headers gitk: Update German translation gitk: Mark forgotten strings (header sentence parts in color chooser) for translation gitk: Ensure that "Reset branch" menu entry is enabled gitk: Use check-buttons' -text property instead of separate labels gitk: Map / to focus the search box gitk: Fix bugs in blaming code
2008-12-22gitk: Force the focus to the main window on WindowsLibravatar Johannes Sixt1-0/+5
On msysGit, the focus is first on the (Tk) console. This console is then hidden, but keeps the focus. Work around that by forcing the focus onto the gitk window. This fixes msysGit issue 14. Diagnosed and originally fixed by Johannes Schindelin. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-22gitk: Allow unbalanced quotes/braces in commit headersLibravatar Kevin Ballard1-2/+3
When parsing commits, gitk treats the headers of the commit as tcl lists. This causes errors if the header contains an unbalanced quote or open brace. Splitting the line on spaces allows us to treat it as a set of words instead of as a tcl list, which prevents errors. Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-22gitk: Update German translationLibravatar Christian Stimming1-29/+157
Attached to avoid whitespace problems. Regards, Christian From 282060ac531fee722142f9d39c4ff29570723cbb Mon Sep 17 00:00:00 2001 From: Christian Stimming <stimming@tuhh.de> Date: Sat, 6 Dec 2008 20:47:15 +0100 Subject: [PATCH 2/2] gitk: Update German translation Merged with most recent "make update-po" result. Signed-off-by: Christian Stimming <stimming@tuhh.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-22gitk: Mark forgotten strings (header sentence parts in color chooser) for ↵Libravatar Christian Stimming1-6/+6
translation Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-22gitk: Ensure that "Reset branch" menu entry is enabledLibravatar Johannes Sixt1-1/+1
Consider this sequence of events: 1. Detach HEAD and fire up gitk 2. Call the context menu on some commit. Notice that the last menu entry says "Detached HEAD: can't reset" and it is disabled. 3. Now checkout some regular branch (e.g. 'master') using the context menu. 4. Call the context menu again on some commit. Previously, at this point the last menu entry said "Reset master branch to here", but it was still disabled. With this fix it is now enabled again. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-22gitk: Use check-buttons' -text property instead of separate labelsLibravatar Johannes Sixt1-20/+10
Previously the check-buttons' labels in the Preferences were separate widgets. This had the disadvantage that in order to toggle the check-button with the mouse the check-box had to be clicked. With this change the check-box can also be toggled by clicking the label. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-22gitk: Map / to focus the search boxLibravatar Giuseppe Bilotta1-2/+2
The / key is often used to initiate searches (less, vim, some web browsers). This changes the binding for the / (slash) key from 'find next' to 'focus the search box' to follow this convention. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-21doc/git-fsck: change the way for getting heads' SHA1sLibravatar Markus Heidelberg1-1/+2
The straightforward way with using 'cat .git/refs/heads/*' doesn't work with packed refs as well as branches of the form topic/topic1. So let's use git-for-each-ref for getting the heads' SHA1s in this example. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21Documentation/git-show-branch: work around "single quote" typesetting glitchLibravatar Markus Heidelberg1-1/+1
The displayed example is typeset with acute accents around the string that should be surrounded by a pair of single quotes in manpage. Replace them with double quotes (the semantics of the example does not change). Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21send-email: futureproof split_addrs() subLibravatar Junio C Hamano1-1/+1
Matt Kraai points out that calling parse_line() assuming that the caller ever passes only one argument is a bug waiting to happen, and he is right. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21Make sure lockfiles are unlocked when dying on SIGPIPELibravatar Junio C Hamano2-0/+18
We cleaned up lockfiles upon receiving the usual suspects HUP, TERM, QUIT but a wicked user could kill us of asphyxiation by piping our output to a pipe that does not read. Protect ourselves by catching SIGPIPE and clean up the lockfiles as well in such a case. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21fast-import.c: stricter strtoul check, silence compiler warningLibravatar René Scharfe1-4/+7
Store the return value of strtoul() in order to avoid compiler warnings on Ubuntu 8.10. Also check errno after each call, which is the only way to notice an overflow without making ULONG_MAX an illegal date. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21connect.c: stricter port validation, silence compiler warningLibravatar René Scharfe1-2/+2
In addition to checking if the provided port is numeric, also check that the string isn't empty and that the port number is within the valid range. Incidentally, this silences a compiler warning about ignoring strtol's return value. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21Add a documentat on how to revert a faulty mergeLibravatar Nanako Shiraishi1-0/+179
Linus and Junio explained issues that are involved in reverting a merge and how to continue working with a branch that was updated since such a revert on the mailing list. This is to help new people who did not see these messages. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21Remove the requirement opaquelocktoken uri schemeLibravatar Kirill A. Korinskiy1-8/+6
The program flow of pushing over http is: - call lock_remote() to issue a DAV_LOCK request to the server to lock info/refs and branch refs being pushed into; handle_new_lock_ctx() is used to parse its response to populate "struct remote_lock" that is returned from lock_remote(); - send objects; - call unlock_remote() to drop the lock. The handle_new_lock_ctx() function assumed that the server will use a lock token in opaquelocktoken URI scheme, which may have been an Ok assumption under RFC 2518, but under RFC 4918 which obsoletes the older standard it is not necessarily true. This resulted in push failure (often resulted in "cannot lock existing info/refs" error message) when talking to a server that does not use opaquelocktoken URI scheme. Signed-off-by: Kirill A. Korinskiy <catap@catap.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21git-sh-setup: Fix scripts whose PWD is a symlink into a git work-dirLibravatar Marcel M. Cary3-2/+136
I want directories of my working tree to be linked to from various paths on my filesystem where third-party components expect them, both in development and production environments. A build system's install step could solve this, but I develop scripts and web pages that don't need to be built. Git's submodule system could solve this, but we tend to develop, branch, and test those directories all in unison, so one big repository feels more natural. We prefer to edit and commit on the symlinked paths, not the canonical ones, and in that setting, "git pull" fails to find the top-level directory of the repository while other commands work fine. "git pull" fails because POSIX shells have a notion of current working directory that is different from getcwd(). The shell stores this path in PWD. As a result, "cd ../" can be interpreted differently in a shell script than chdir("../") in a C program. The shell interprets "../" by essentially stripping the last textual path component from PWD, whereas C chdir() follows the ".." link in the current directory on the filesystem. When PWD is a symlink, these are different destinations. As a result, Git's C commands find the correct top-level working tree, and shell scripts do not. Changes: * When interpreting a relative upward (../) path in cd_to_toplevel, prepend the cwd without symlinks, given by /bin/pwd * Add tests for cd_to_toplevel and "git pull" in a symlinked directory that failed before this fix, plus contrasting scenarios that already worked Signed-off-by: Marcel M. Cary <marcel@oak.homeunix.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21rebase -i -p: Fix --continue after a merge could not be redoneLibravatar Johannes Sixt2-3/+2
When a merge that has a conflict was rebased, then rebase stopped to let the user resolve the conflicts. However, thereafter --continue failed because the author-script was not saved. (This is rebase -i's way to preserve a commit's authorship.) This fixes it by doing taking the same failure route after a merge that is also taken after a normal cherry-pick. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21Show a failure of rebase -p if the merge had a conflictLibravatar Johannes Sixt1-11/+44
This extends t3409-rebase-preserve-merges by a case where the merge that is rebased has a conflict. Therefore, the rebase stops and expects that the user resolves the conflict. However, currently rebase --continue fails because .git/rebase-merge/author-script is missing. The test script had allocated two identical clones, but only one of them (clone2) was used. Now we use both as indicated in the comment. Also, two instances of && was missing in the setup part. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-19Documentation: fix typos, grammar, asciidoc syntaxLibravatar Markus Heidelberg1-1/+1
[jc: the original patch was against master but 99% of it applied to maint; this commit splits out the part that applies only to master.] Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-19Merge branch 'maint' to sync with GIT 1.6.0.6Libravatar Junio C Hamano26-48/+185
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-19GIT 1.6.0.6Libravatar Junio C Hamano6-38/+67
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-19fast-import: make tagger information optionalLibravatar Junio C Hamano2-11/+33
Even though newer Porcelain tools always record the tagger information when creating new tags, export/import pair should be able to faithfully reproduce ancient tag objects that lack tagger information. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-19fast-export: deal with tag objects that do not have a taggerLibravatar Johannes Schindelin3-5/+42
When no tagger was found (old Git produced tags like this), no "tagger" line is printed (but this is incompatible with the current git fast-import). Alternatively, you can pass the option --fake-missing-tagger, forcing fast-export to fake a tagger Unspecified Tagger <no-tagger> with a tag date of the beginning of (Unix) time in the case of a missing tagger, so that fast-import is still able to import the result. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>