1
0
mirror of https://github.com/git/git.git synced 2024-10-20 20:28:13 +02:00
Commit Graph

17004 Commits

Author SHA1 Message Date
Johannes Schindelin
cca1704897 git wrapper: Make while loop more reader-friendly
It is not a good practice to prefer performance over readability in
something as performance uncritical as finding the trailing slash
of argv[0].

So avoid head-scratching by making the loop user-readable, and not
hyper-performance-optimized.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-02 13:19:40 -08:00
Junio C Hamano
3827210b91 Merge branch 'cb/mergetool'
* cb/mergetool:
  mergetool: Don't keep temporary merge files unless told to
  mergetool: Add prompt to continue after failing to merge a file
  Add -y/--no-prompt option to mergetool
  Fix some tab/space inconsistencies in git-mergetool.sh
2009-01-01 05:48:40 -08:00
Junio C Hamano
42e778bfec Merge branch 'maint'
* maint:
  Documentation/git-tag.txt: minor typo and grammar fix
2009-01-01 05:48:35 -08:00
jidanni@jidanni.org
d99bf51add Documentation/git-tag.txt: minor typo and grammar fix
Signed-off-by: jidanni <jidanni@jidanni.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-01-01 05:33:35 -08:00
Junio C Hamano
c32f76f4d2 Merge branch 'lt/reset-merge'
* lt/reset-merge:
  Document "git-reset --merge"
  Add 'merge' mode to 'git reset'
2008-12-29 01:21:45 -08:00
Junio C Hamano
78d4096d57 Merge branch 'np/auto-thread'
* np/auto-thread:
  Force t5302 to use a single thread
  pack-objects: don't use too many threads with few objects
  autodetect number of CPUs by default when using threads
2008-12-29 01:21:33 -08:00
Junio C Hamano
373654ee0f Merge branch 'maint'
* maint:
  Prepare for v1.6.1.1 maintenance release
  Documentation/diff-options.txt: unify options
  gitweb: Fix export check in git_get_projects_list

Conflicts:
	RelNotes
2008-12-29 01:18:34 -08:00
Junio C Hamano
936b7057e8 Prepare for v1.6.1.1 maintenance release
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-29 01:17:34 -08:00
jidanni@jidanni.org
a9e67c8ccc Documentation/diff-options.txt: unify options
Instead of listing short option (e.g. "-U<n>") as a shorthand for its
longer counterpart (e.g. "--unified=<n>"), list the synonyms together.  It
saves one indirection to find what the reader wants.

Signed-off-by: jidanni <jidanni@jidanni.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-29 01:08:02 -08:00
Teemu Likonen
9c6c304d6a Fix the building of gitman.info document
"makeinfo" failed to generate gitman.info from gitman.texi input file
because the combined manual page file contains several nodes with the
same name (DESCRIPTION, OPTIONS, SEE ALSO etc.). An Info document should
contain unique node names.

This patch creates a simple (read: ugly) work-around by suppressing the
validation of the final Info file. Jumping to nodes in the Info document
still works but they are not very useful. Common man-page headings like
DESCRIPTION and OPTIONS appear in the Info node list and they point to
the man page where they appear first (that is git-add currently).

Also, this patch adds directory-entry information for Info document to
make the document appear in the top-level Info directory.

Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-29 00:40:10 -08:00
Teemu Likonen
8b30ad01b4 Fix the building of user-manual.texi and gitman.texi documents
Previously "docbook2x-texi" failed to generate user-manual.texi and
gitman.texi files from .xml input files because "iconv" stopped at
"illegal input sequence" error. This was due to some UTF-8 octets in the
input .xml files. This patch adds option --encoding=UTF-8 for
"docbook2x-texi" to allow the building of .texi files complete.

Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-29 00:40:04 -08:00
Devin Doucette
fb3bb3d132 gitweb: Fix export check in git_get_projects_list
When $filter was empty, the path passed to check_export_ok would
contain an extra '/', which some implementations of export_auth_hook
are sensitive to.

It makes more sense to fix this here than to handle the special case
in each implementation of export_auth_hook.

Signed-off-by: Devin Doucette <devin@doucette.cc>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-27 22:34:03 -08:00
Junio C Hamano
159c88e5ae Merge branch 'maint'
* 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-27 14:25:14 -08:00
Junio C Hamano
78f8fbc9d6 Start 1.6.2 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-27 14:25:10 -08:00
Junio C Hamano
a9012e343e Merge branch 'rs/maint-tformat-foldline' into maint
* rs/maint-tformat-foldline:
  pretty: support multiline subjects with format:
  pretty: factor out format_subject()
  pretty: factor out skip_empty_lines()
2008-12-27 14:22:37 -08:00
Junio C Hamano
f611c8c0d1 Merge branch 'rs/maint-retval-fix' into maint
* 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-27 14:21:24 -08:00
Junio C Hamano
fcd3549ef2 Merge branch 'sp/maint-describe-all-tag-warning' into maint
* sp/maint-describe-all-tag-warning:
  describe: Avoid unnecessary warning when using --all
2008-12-27 14:21:15 -08:00
Adeodato SimĂ³
f83b9ba209 git-send-email.txt: move --format-patch paragraph to a proper location
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-27 13:54:00 -08:00
Adeodato SimĂ³
3a882d9696 git-shortlog.txt: improve documentation about .mailmap files
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-27 13:52:19 -08:00
René Scharfe
f53bd743ff pretty: support multiline subjects with format:
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-27 12:02:49 -08:00
René Scharfe
88c44735ab pretty: factor out format_subject()
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-27 12:02:40 -08:00
René Scharfe
a010966844 pretty: factor out skip_empty_lines()
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-27 12:02:32 -08:00
René Scharfe
4deba8b779 merge-file: handle freopen() failure
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-26 19:10:02 -08:00
René Scharfe
6720e95b30 daemon: cleanup: factor out xstrdup_tolower()
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-26 19:09:56 -08:00
René Scharfe
a583971f15 daemon: cleanup: replace loop with if
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-26 19:08:32 -08:00
René Scharfe
c569b1fee1 daemon: handle freopen() failure
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-26 19:07:56 -08:00
Shawn O. Pearce
81dc223deb describe: Avoid unnecessary warning when using --all
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-26 16:37:53 -08:00
Junio C Hamano
8104ebfe82 GIT 1.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.6.1
2008-12-24 19:41:08 -08:00
Junio C Hamano
768c728e7c Merge branch 'js/rebase-i-p'
* 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-24 00:14:14 -08:00
Johannes Schindelin
4fb1a19d50 rebase -i -p: leave a --cc patch when a merge could not be redone
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-24 00:14:08 -08:00
Miklos Vajna
c66c0cbc7e t9129: skip the last three tests if UTF-8 locale is not available
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-22 18:11:33 -08:00
Junio C Hamano
779e3a8f8b GIT 1.6.1-rc4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.6.1-rc4
2008-12-21 19:20:21 -08:00
Richard Hartmann
f66bc5f928 Always show which directory is not a git repository
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-21 18:46:41 -08:00
Richard Hartmann
5fdb709835 Make help entries alphabetical
Signed-off-by: Richard Hartmann <richih@net.in.tum.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21 18:45:05 -08:00
Junio C Hamano
71cbf773df Merge branch 'maint'
* maint:
  doc/git-fsck: change the way for getting heads' SHA1s
2008-12-21 18:35:54 -08:00
Boyd Stephen Smith Jr
b80b5d6799 git-revert documentation: refer to new HOWTO on reverting faulty merges
Signed-off-by: Boyd Stephen Smith Jr <bss@iguanasuicide.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-21 18:34:49 -08:00
Robin Rosenberg
d5be89d8ad git-revert: record the parent against which a revert was made
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-21 18:32:04 -08:00
Junio C Hamano
834caf9a7b Merge git://git.kernel.org/pub/scm/gitk/gitk
* 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-21 18:31:12 -08:00
Johannes Sixt
e4df519f05 gitk: Force the focus to the main window on Windows
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-22 10:16:18 +11:00
Kevin Ballard
61f57cb07d gitk: Allow unbalanced quotes/braces in commit headers
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-22 10:16:18 +11:00
Christian Stimming
48027a918d gitk: Update German translation
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-22 10:16:18 +11:00
Christian Stimming
968b016a4a gitk: Mark forgotten strings (header sentence parts in color chooser) for translation
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-22 10:16:18 +11:00
Johannes Sixt
da12e59dd6 gitk: Ensure that "Reset branch" menu entry is enabled
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-22 10:16:17 +11:00
Johannes Sixt
adcbec13b9 gitk: Use check-buttons' -text property instead of separate labels
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-22 10:16:17 +11:00
Giuseppe Bilotta
97bed03448 gitk: Map / to focus the search box
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-22 10:16:17 +11:00
Markus Heidelberg
27c03aafdf doc/git-fsck: change the way for getting heads' SHA1s
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-21 12:04:12 -08:00
Markus Heidelberg
b3eae84dc1 Documentation/git-show-branch: work around "single quote" typesetting glitch
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-21 02:00:31 -08:00
Junio C Hamano
2f0e7cbbb0 send-email: futureproof split_addrs() sub
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-21 01:57:59 -08:00
Junio C Hamano
0693f9ddad Make sure lockfiles are unlocked when dying on SIGPIPE
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-21 01:56:20 -08:00
René Scharfe
c55fae43c4 fast-import.c: stricter strtoul check, silence compiler warning
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-21 01:48:26 -08:00