Code

git.git
13 years ago--dirstat: In case of renames, use target filename instead of source filename
Johan Herland [Tue, 12 Apr 2011 09:24:34 +0000 (11:24 +0200)]
--dirstat: In case of renames, use target filename instead of source filename

This changes --dirstat analysis to count "damage" toward the target filename,
rather than the source filename. For renames within a directory, this won't
matter to the final output, but when moving files between diretories, the
output now lists the target directory rather than the source directory.

Signed-off-by: Johan Herland <johan@herland.net>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'js/checkout-untracked-symlink'
Junio C Hamano [Tue, 12 Apr 2011 07:05:50 +0000 (00:05 -0700)]
Merge branch 'js/checkout-untracked-symlink'

* js/checkout-untracked-symlink:
  t2021: mark a test as fixed

13 years agoMerge branch 'nd/init-gitdir'
Junio C Hamano [Tue, 12 Apr 2011 07:04:53 +0000 (00:04 -0700)]
Merge branch 'nd/init-gitdir'

* nd/init-gitdir:
  t0001: guard a new test with SYMLINKS prerequisite

13 years agot2021: mark a test as fixed
Johannes Sixt [Tue, 12 Apr 2011 06:41:19 +0000 (08:41 +0200)]
t2021: mark a test as fixed

The failure was fixed by the previous commit.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot0001: guard a new test with SYMLINKS prerequisite
Johannes Sixt [Tue, 12 Apr 2011 06:30:49 +0000 (08:30 +0200)]
t0001: guard a new test with SYMLINKS prerequisite

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoTeach --dirstat not to completely ignore rearranged lines within a file
Johan Herland [Sun, 10 Apr 2011 22:48:52 +0000 (00:48 +0200)]
Teach --dirstat not to completely ignore rearranged lines within a file

Currently, the --dirstat analysis ignores when lines within a file are
rearranged, because the "damage" calculated by show_dirstat() is 0.
However, if the object name has changed, we already know that there is
some damage, and it is unintuitive to claim there is _no_ damage.

Teach show_dirstat() to assign a minimum amount of damage (== 1) to
entries for which the analysis otherwise yields zero damage, to still
represent that these files are changed, instead of saying that there
is no change.

Also, skip --dirstat analysis when the object names are the same (e.g. for
a pure file rename).

Signed-off-by: Johan Herland <johan@herland.net>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: extract Q_() source strings as ngettext()
Ævar Arnfjörð Bjarmason [Sun, 10 Apr 2011 19:37:01 +0000 (19:37 +0000)]
Makefile: extract Q_() source strings as ngettext()

The Q_() wrapper added by 0c9ea33 (i18n: add stub Q_() wrapper for
ngettext, 2011-03-09) needs to be noticed by xgettext.

Add an appropriate --keyword option to the Makefile, so that "make pot"
would notice the strings in the plural form marked with the wrapper.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: avoid parenthesized string as array initializer
Ramsay Jones [Thu, 7 Apr 2011 18:41:48 +0000 (19:41 +0100)]
i18n: avoid parenthesized string as array initializer

The syntax

    static const char ignore_error[] = ("something");

is invalid C.  A parenthesized string is not allowed as an array
initializer.

Some compilers, for example GCC and MSVC, allow this syntax as an
extension, but it is not a portable construct.  tcc does not parse it, for
example.

Remove the parenthesis from the definition of the N_() macro to
fix this.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years ago--dirstat-by-file: Make it faster and more correct
Johan Herland [Sun, 10 Apr 2011 22:48:51 +0000 (00:48 +0200)]
--dirstat-by-file: Make it faster and more correct

Currently, when using --dirstat-by-file, it first does the full --dirstat
analysis (using diffcore_count_changes()), and then resets 'damage' to 1,
if any damage was found by diffcore_count_changes().

But --dirstat-by-file is not interested in the file damage per se. It only
cares if the file changed at all. In that sense it only cares if the blob
object for a file has changed. We therefore only need to compare the
object names of each file pair in the diff queue and we can skip the
entire --dirstat analysis and simply set 'damage' to 1 for each entry
where the object name has changed.

This makes --dirstat-by-file faster, and also bypasses --dirstat's practice
of ignoring rearranged lines within a file.

The patch also contains an added testcase verifying that --dirstat-by-file
now detects changes that only rearrange lines within a file.

Signed-off-by: Johan Herland <johan@herland.net>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years ago--dirstat: Describe non-obvious differences relative to --stat or regular diff
Johan Herland [Sun, 10 Apr 2011 22:48:50 +0000 (00:48 +0200)]
--dirstat: Describe non-obvious differences relative to --stat or regular diff

Also add a testcase documenting the current behavior.

Improved-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johan Herland <johan@herland.net>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Mon, 11 Apr 2011 16:34:19 +0000 (09:34 -0700)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git-svn: Cache results of running the executable "git config"
  git-svn: Add a svn-remote.<name>.pushurl config key

13 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Mon, 11 Apr 2011 16:33:06 +0000 (09:33 -0700)]
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Update cherry-pick error message parsing
  gitk: Quote tag names in event bindings to avoid problems with % chars
  gitk: Allow user to control how much of the SHA1 ID gets auto-selected
  gitk: spelling fixes in Russian translation
  gitk: Take only numeric version components when computing $git_version

13 years agogit-svn: Cache results of running the executable "git config"
James Y Knight [Mon, 4 Apr 2011 19:09:08 +0000 (15:09 -0400)]
git-svn: Cache results of running the executable "git config"

Running programs is not cheap!

Signed-off-by: James Y Knight <jknight@itasoftware.com>
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogit-svn: Add a svn-remote.<name>.pushurl config key
Alejandro R. Sedeño [Fri, 8 Apr 2011 14:57:54 +0000 (10:57 -0400)]
git-svn: Add a svn-remote.<name>.pushurl config key

Similar to the 'remote.<name>.pushurl' config key for git remotes,
'pushurl' is designed to be used in cases where 'url' points to an SVN
repository via a read-only transport, to provide an alternate
read/write transport. It is assumed that both keys point to the same
repository.

The 'pushurl' key is distinct from the 'commiturl' key in that
'commiturl' is a full svn path while 'pushurl' (like 'url') is a base
path. 'commiturl' takes precendece over 'pushurl' in cases where
either might be used.

The 'pushurl' is used by git-svn's dcommit and branch commands.

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Reviewed-by: James Y Knight <jknight@itasoftware.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogitk: Update cherry-pick error message parsing
Anders Kaseorg [Wed, 19 Jan 2011 19:45:00 +0000 (14:45 -0500)]
gitk: Update cherry-pick error message parsing

Commit 981ff5c37ae20687c98d98c8689d5e89016026d2 changed the error
message from git cherry-pick from
    Automatic cherry-pick failed.  [...advice...]
to
    error: could not apply 7ab78c9... Do something neat.
    [...advice...]

Update gitk’s regex to match this, restoring the ability to launch git
citool to resolve conflicted cherry-picks.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Paul Mackerras <paulus@samba.org>
13 years agostash: ensure --no-keep-index and --patch can be used in any order
Dan McGee [Thu, 7 Apr 2011 17:04:20 +0000 (12:04 -0500)]
stash: ensure --no-keep-index and --patch can be used in any order

Don't assume one comes after the other on the command line. Use a
three-state variable to track and check its value accordingly.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostash: add two more tests for --no-keep-index
Dan McGee [Thu, 7 Apr 2011 17:04:19 +0000 (12:04 -0500)]
stash: add two more tests for --no-keep-index

One of these passes just fine; the other one exposes a problem where
command line flag order matters for --no-keep-index and --patch
interaction.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-p4: replace each tab with 8 spaces for consistency
Andrew Garber [Thu, 7 Apr 2011 06:01:21 +0000 (02:01 -0400)]
git-p4: replace each tab with 8 spaces for consistency

Note that the majority of git-p4 uses spaces, not tabs, for indentation.
Consistent indentation is a good hygiene for Python scripts, and mixing
tabs and spaces in Python can lead to hard-to-find bugs.

Signed-off-by: Andrew Garber <andrew@andrewgarber.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoupload-pack: start pack-objects before async rev-list
Jeff King [Wed, 6 Apr 2011 21:33:33 +0000 (17:33 -0400)]
upload-pack: start pack-objects before async rev-list

In a pthread-enabled version of upload-pack, there's a race condition
that can cause a deadlock on the fflush(NULL) we call from run-command.

What happens is this:

  1. Upload-pack is informed we are doing a shallow clone.

  2. We call start_async() to spawn a thread that will generate rev-list
     results to feed to pack-objects. It gets a file descriptor to a
     pipe which will eventually hook to pack-objects.

  3. The rev-list thread uses fdopen to create a new output stream
     around the fd we gave it, called pack_pipe.

  4. The thread writes results to pack_pipe. Outside of our control,
     libc is doing locking on the stream. We keep writing until the OS
     pipe buffer is full, and then we block in write(), still holding
     the lock.

  5. The main thread now uses start_command to spawn pack-objects.
     Before forking, it calls fflush(NULL) to flush every stdio output
     buffer. It blocks trying to get the lock on pack_pipe.

And we have a deadlock. The thread will block until somebody starts
reading from the pipe. But nobody will read from the pipe until we
finish flushing to the pipe.

To fix this, we swap the start order: we start the
pack-objects reader first, and then the rev-list writer
after. Thus the problematic fflush(NULL) happens before we
even open the new file descriptor (and even if it didn't,
flushing should no longer block, as the reader at the end of
the pipe is now active).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.5-rc1 v1.7.5-rc1
Junio C Hamano [Wed, 6 Apr 2011 17:57:32 +0000 (10:57 -0700)]
Git 1.7.5-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSync with 1.7.4.4
Junio C Hamano [Wed, 6 Apr 2011 17:51:30 +0000 (10:51 -0700)]
Sync with 1.7.4.4

13 years agoGit 1.7.4.4 v1.7.4.4
Junio C Hamano [Wed, 6 Apr 2011 17:49:35 +0000 (10:49 -0700)]
Git 1.7.4.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'nm/maint-conflicted-submodule-entries' into maint
Junio C Hamano [Wed, 6 Apr 2011 17:41:17 +0000 (10:41 -0700)]
Merge branch 'nm/maint-conflicted-submodule-entries' into maint

* nm/maint-conflicted-submodule-entries:
  submodule: process conflicting submodules only once

13 years agoMerge branch 'mg/rev-list-n-reverse-doc' into maint
Junio C Hamano [Wed, 6 Apr 2011 17:40:49 +0000 (10:40 -0700)]
Merge branch 'mg/rev-list-n-reverse-doc' into maint

* mg/rev-list-n-reverse-doc:
  git-log.txt,rev-list-options.txt: put option blocks in proper order
  git-log.txt,rev-list-options.txt: -n/--max-count is commit limiting

13 years agoMerge branch 'jk/maint-remote-mirror-safer'
Junio C Hamano [Wed, 6 Apr 2011 17:38:14 +0000 (10:38 -0700)]
Merge branch 'jk/maint-remote-mirror-safer'

* jk/maint-remote-mirror-safer:
  remote: deprecate --mirror
  remote: separate the concept of push and fetch mirrors
  remote: disallow some nonsensical option combinations

13 years agoMerge branch 'mg/doc-revisions-txt'
Junio C Hamano [Wed, 6 Apr 2011 17:37:56 +0000 (10:37 -0700)]
Merge branch 'mg/doc-revisions-txt'

* mg/doc-revisions-txt:
  revisions.txt: language improvements
  revisions.txt: structure with a labelled list
  revisions.txt: consistent use of quotes

13 years agostash: drop dirty worktree check on apply
Jeff King [Tue, 5 Apr 2011 21:23:15 +0000 (17:23 -0400)]
stash: drop dirty worktree check on apply

Before we apply a stash, we make sure there are no changes
in the worktree that are not in the index. This check dates
back to the original git-stash.sh, and is presumably
intended to prevent changes in the working tree from being
accidentally lost during the merge.

However, this check has two problems:

  1. It is overly restrictive. If my stash changes only file
     "foo", but "bar" is dirty in the working tree, it will
     prevent us from applying the stash.

  2. It is redundant. We don't touch the working tree at all
     until we actually call merge-recursive. But it has its
     own (much more accurate) checks to avoid losing working
     tree data, and will abort the merge with a nicer
     message telling us which paths were problems.

So we can simply drop the check entirely.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoTeach core.bigfilethreashold to pack-objects
Junio C Hamano [Tue, 5 Apr 2011 17:44:11 +0000 (10:44 -0700)]
Teach core.bigfilethreashold to pack-objects

The pack-objects command should take notice of the object file and
refrain from attempting to delta large ones, to be consistent with
the fast-import command.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostash: fix false positive in the invalid ref test.
Jon Seymour [Tue, 5 Apr 2011 23:21:13 +0000 (09:21 +1000)]
stash: fix false positive in the invalid ref test.

Jeff King reported a problem with git stash apply incorrectly
applying an invalid stash reference.

There is an existing test that should have caught this, but
the test itself was broken, resulting in a false positive.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostash: fix accidental apply of non-existent stashes
Jeff King [Tue, 5 Apr 2011 21:20:25 +0000 (17:20 -0400)]
stash: fix accidental apply of non-existent stashes

Once upon a time, "git rev-parse ref@{9999999}" did not
generate an error. Therefore when we got an invalid stash
reference in "stash apply", we could end up not noticing
until quite late.  Commit b0f0ecd (detached-stash: work
around git rev-parse failure to detect bad log refs,
2010-08-21) handled this by checking for the "Log for stash
has only %d entries" warning on stderr when we validated the
ref.

A few days later, e6eedc3 (rev-parse: exit with non-zero
status if ref@{n} is not valid., 2010-08-24) fixed the
original issue. That made the extra stderr test superfluous,
but also introduced a new bug. Now the early call to:

  git rev-parse --symbolic "$@"

fails, but we don't notice the exit code. Worse, its empty
output means we think the user didn't provide us a ref, and
we try to apply stash@{0}.

This patch checks the rev-parse exit code and fails early in
the revision parsing process. We can also get rid of the
stderr test; as a bonus, this means that "stash apply" can
now run under GIT_TRACE=1 properly.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorevisions.txt: language improvements
Michael J Gruber [Mon, 4 Apr 2011 15:27:05 +0000 (17:27 +0200)]
revisions.txt: language improvements

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Mon, 4 Apr 2011 22:02:08 +0000 (15:02 -0700)]
Merge branch 'maint'

* maint:
  Documentation: trivial grammar fix in core.worktree description
  gitweb: Fix parsing of negative fractional timezones in JavaScript

13 years agoMerge branch 'jl/submodule-fetch-on-demand'
Junio C Hamano [Mon, 4 Apr 2011 22:02:01 +0000 (15:02 -0700)]
Merge branch 'jl/submodule-fetch-on-demand'

* jl/submodule-fetch-on-demand:
  fetch/pull: Describe --recurse-submodule restrictions in the BUGS section
  submodule update: Don't fetch when the submodule commit is already present
  fetch/pull: Don't recurse into a submodule when commits are already present
  Submodules: Add 'on-demand' value for the 'fetchRecurseSubmodule' option
  config: teach the fetch.recurseSubmodules option the 'on-demand' value
  fetch/pull: Add the 'on-demand' value to the --recurse-submodules option
  fetch/pull: recurse into submodules when necessary

Conflicts:
builtin/fetch.c
submodule.c

13 years agoMerge branch 'jc/rev-list-options-fix'
Junio C Hamano [Mon, 4 Apr 2011 17:55:38 +0000 (10:55 -0700)]
Merge branch 'jc/rev-list-options-fix'

* jc/rev-list-options-fix:
  "log --cherry-pick" documentation regression fix

13 years agoDocumentation: trivial grammar fix in core.worktree description
SZEDER Gábor [Mon, 4 Apr 2011 14:59:25 +0000 (16:59 +0200)]
Documentation: trivial grammar fix in core.worktree description

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogitweb: Fix parsing of negative fractional timezones in JavaScript
Jakub Narebski [Fri, 1 Apr 2011 19:06:28 +0000 (21:06 +0200)]
gitweb: Fix parsing of negative fractional timezones in JavaScript

Extract converting numerical timezone in the form of '(+|-)HHMM' to
timezoneOffset function, and fix parsing of negative fractional
timezones.

This is used to format timestamps in 'blame_incremental' view; this
complements commit 2b1e172 (gitweb: Fix handling of fractional
timezones in parse_date, 2011-03-25).

Now

  gitweb.cgi/git.git/blame_incremental/3fe5489:/contrib/gitview/gitview#l853

and

  gitweb.cgi/git.git/blame/3fe5489:/contrib/gitview/gitview#l853

show the same correct time in author's local timezone in title
(on mouseover) [Aneesh Kumar K.V, 2006-02-24 00:59:42 +0530].

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'nm/maint-conflicted-submodule-entries'
Junio C Hamano [Mon, 4 Apr 2011 10:41:24 +0000 (03:41 -0700)]
Merge branch 'nm/maint-conflicted-submodule-entries'

* nm/maint-conflicted-submodule-entries:
  submodule: process conflicting submodules only once

13 years agoMerge branch 'maint'
Junio C Hamano [Sun, 3 Apr 2011 20:53:11 +0000 (13:53 -0700)]
Merge branch 'maint'

* maint:
  Start preparing for 1.7.4.4
  pull: do not clobber untracked files on initial pull
  compat: add missing #include <sys/resource.h>

Conflicts:
RelNotes

13 years agoStart preparing for 1.7.4.4
Junio C Hamano [Sun, 3 Apr 2011 19:58:23 +0000 (12:58 -0700)]
Start preparing for 1.7.4.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agopull: do not clobber untracked files on initial pull
Jeff King [Fri, 25 Mar 2011 18:13:31 +0000 (14:13 -0400)]
pull: do not clobber untracked files on initial pull

For a pull into an unborn branch, we do not use "git merge"
at all. Instead, we call read-tree directly. However, we
used the --reset parameter instead of "-m", which turns off
the safety features.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/index-update-if-able' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:33:05 +0000 (12:33 -0700)]
Merge branch 'jc/index-update-if-able' into maint

* jc/index-update-if-able:
  update $GIT_INDEX_FILE when there are racily clean entries
  diff/status: refactor opportunistic index update

13 years agoMerge branch 'lt/default-abbrev' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:32:51 +0000 (12:32 -0700)]
Merge branch 'lt/default-abbrev' into maint

* lt/default-abbrev:
  Rename core.abbrevlength back to core.abbrev
  Make the default abbrev length configurable

13 years agoMerge branch 'jc/maint-rev-list-culled-boundary' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:32:35 +0000 (12:32 -0700)]
Merge branch 'jc/maint-rev-list-culled-boundary' into maint

* jc/maint-rev-list-culled-boundary:
  list-objects.c: don't add an unparsed NULL as a pending tree

Conflicts:
list-objects.c

13 years agoMerge branch 'mm/maint-log-n-with-diff-filtering' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:31:59 +0000 (12:31 -0700)]
Merge branch 'mm/maint-log-n-with-diff-filtering' into maint

* mm/maint-log-n-with-diff-filtering:
  log: fix --max-count when used together with -S or -G

13 years agoMerge branch 'jk/format-patch-multiline-header' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:31:19 +0000 (12:31 -0700)]
Merge branch 'jk/format-patch-multiline-header' into maint

* jk/format-patch-multiline-header:
  format-patch: rfc2047-encode newlines in headers
  format-patch: wrap long header lines
  strbuf: add fixed-length version of add_wrapped_text

13 years agoMerge branch 'jn/maint-instaweb-plack-fix' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:30:58 +0000 (12:30 -0700)]
Merge branch 'jn/maint-instaweb-plack-fix' into maint

* jn/maint-instaweb-plack-fix:
  git-instaweb: Change how gitweb.psgi is made runnable as standalone app

13 years agoMerge branch 'lp/config-vername-check' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:29:45 +0000 (12:29 -0700)]
Merge branch 'lp/config-vername-check' into maint

* lp/config-vername-check:
  Disallow empty section and variable names
  Sanity-check config variable names

13 years agosha1_name: Suggest commit:./file for path in subdir
Michael J Gruber [Thu, 31 Mar 2011 09:17:34 +0000 (11:17 +0200)]
sha1_name: Suggest commit:./file for path in subdir

Currently, the "Did you mean..." message suggests "commit:fullpath"
only. Extend this to show the more convenient "commit:./file" form also.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot1506: factor out test for "Did you mean..."
Michael J Gruber [Thu, 31 Mar 2011 09:17:33 +0000 (11:17 +0200)]
t1506: factor out test for "Did you mean..."

With the current code, it's a "'"'"'" jungle, and we test only 1 line of
the 2 line response. Factor out and test both.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocompat: add missing #include <sys/resource.h>
Jonathan Nieder [Fri, 18 Mar 2011 20:23:52 +0000 (15:23 -0500)]
compat: add missing #include <sys/resource.h>

Starting with commit c793430 (Limit file descriptors used by packs,
2011-02-28), git uses getrlimit to tell how many file descriptors it
can use.  Unfortunately it does not include the header declaring that
function, resulting in compilation errors:

 sha1_file.c: In function 'open_packed_git_1':
 sha1_file.c:718: error: storage size of 'lim' isn't known
 sha1_file.c:721: warning: implicit declaration of function 'getrlimit'
 sha1_file.c:721: error: 'RLIMIT_NOFILE' undeclared (first use in this function)
 sha1_file.c:718: warning: unused variable 'lim'

The standard header to include for this is <sys/resource.h> (which on
some systems itself requires declarations from <sys/types.h> or
<sys/time.h>).  Probably the problem was missed until now because in
current glibc sys/resource.h happens to be included by sys/wait.h.

MinGW does not provide sys/resource.h (and compat/mingw takes care of
providing getrlimit some other way), so add the missing #include to
the "#ifndef __MINGW32__" block in git-compat-util.h.

Reported-by: Stefan Sperling <stsp@stsp.name>
Tested-by: Stefan Sperling <stsp@stsp.name> [on OpenBSD]
Tested-by: Arnaud Lacombe <lacombar@gmail.com> [on FreeBSD 8]
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit.el: Don't use font-lock-compile-keywords
Lawrence Mitchell [Fri, 4 Feb 2011 10:59:18 +0000 (10:59 +0000)]
git.el: Don't use font-lock-compile-keywords

If font-lock is disabled, font-lock-compile-keywords complains.
Really what we want to do is to replace log-edit's font-lock
definitions with our own, so define a major mode deriving from
log-edit and set up font-lock-defaults there.  We then use the
optional MODE argument to log-edit to set up the major mode of the
commit buffer appropriately.

Signed-off-by: Lawrence Mitchell <wence@gmx.li>
Acked-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot2019-checkout-ambiguous-ref.sh: depend on C_LOCALE_OUTPUT
Ævar Arnfjörð Bjarmason [Sun, 3 Apr 2011 13:33:39 +0000 (13:33 +0000)]
t2019-checkout-ambiguous-ref.sh: depend on C_LOCALE_OUTPUT

The t2019-checkout-ambiguous-ref.sh tests added in v1.7.4.3~12^2
examines the output for a translatable string, and must be marked
with C_LOCALE_OUTPUT; otherwise, GETTEXT_POISON=YesPlease tests
will break.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix two unused variable warnings in gcc 4.6
Dan McGee [Mon, 28 Mar 2011 01:32:19 +0000 (20:32 -0500)]
Fix two unused variable warnings in gcc 4.6

Seen with -Wunused-but-set-variable.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoRemove old binaries from .gitignore
Dan McGee [Thu, 31 Mar 2011 02:26:01 +0000 (21:26 -0500)]
Remove old binaries from .gitignore

These two programs were dumped a while ago.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosparse: Fix errors and silence warnings
Stephen Boyd [Sun, 3 Apr 2011 07:06:54 +0000 (00:06 -0700)]
sparse: Fix errors and silence warnings

 * load_file() returns a void pointer but is using 0 for the return
   value

 * builtin/receive-pack.c forgot to include builtin.h

 * packet_trace_prefix can be marked static

 * ll_merge takes a pointer for its last argument, not an int

 * crc32 expects a pointer as the second argument but Z_NULL is defined
   to be 0 (see 38f4d13 sparse fix: Using plain integer as NULL pointer,
   2006-11-18 for more info)

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoUpdate release notes
Junio C Hamano [Sun, 3 Apr 2011 07:18:50 +0000 (00:18 -0700)]
Update release notes

As 1.7.4.3 has backmerged a handful of fixes from the master,
drop these entries from 1.7.5 release notes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSync with 1.7.4.3
Junio C Hamano [Sun, 3 Apr 2011 07:14:16 +0000 (00:14 -0700)]
Sync with 1.7.4.3

13 years agoGit 1.7.4.3 v1.7.4.3
Junio C Hamano [Sun, 3 Apr 2011 07:12:31 +0000 (00:12 -0700)]
Git 1.7.4.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDoc: mention --delta-base-offset is the default for Porcelain commands
Junio C Hamano [Sun, 3 Apr 2011 06:08:13 +0000 (23:08 -0700)]
Doc: mention --delta-base-offset is the default for Porcelain commands

The underlying pack-objects plumbing command still needs an explicit
option from the command line, but these days Porcelain passes the
option, so there is no need for end users to worry about it anymore.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'nd/init-gitdir'
Junio C Hamano [Sat, 2 Apr 2011 00:57:37 +0000 (17:57 -0700)]
Merge branch 'nd/init-gitdir'

* nd/init-gitdir:
  init, clone: support --separate-git-dir for .git file
  git-init.txt: move description section up

Conflicts:
builtin/clone.c

13 years agoMerge branch 'jc/merge-sans-branch'
Junio C Hamano [Sat, 2 Apr 2011 00:57:16 +0000 (17:57 -0700)]
Merge branch 'jc/merge-sans-branch'

* jc/merge-sans-branch:
  merge: merge with the default upstream branch without argument
  merge: match the help text with the documentation

Conflicts:
builtin/merge.c

13 years agoMerge branch 'jr/grep-en-config'
Junio C Hamano [Sat, 2 Apr 2011 00:56:27 +0000 (17:56 -0700)]
Merge branch 'jr/grep-en-config'

* jr/grep-en-config:
  grep: allow -E and -n to be turned on by default via configuration

13 years agoMerge branch 'ab/i18n-st'
Junio C Hamano [Sat, 2 Apr 2011 00:55:55 +0000 (17:55 -0700)]
Merge branch 'ab/i18n-st'

* ab/i18n-st: (69 commits)
  i18n: git-shortlog basic messages
  i18n: git-revert split up "could not revert/apply" message
  i18n: git-revert literal "me" messages
  i18n: git-revert "Your local changes" message
  i18n: git-revert basic messages
  i18n: git-notes GIT_NOTES_REWRITE_MODE error message
  i18n: git-notes basic commands
  i18n: git-gc "Auto packing the repository" message
  i18n: git-gc basic messages
  i18n: git-describe basic messages
  i18n: git-clean clean.requireForce messages
  i18n: git-clean basic messages
  i18n: git-bundle basic messages
  i18n: git-archive basic messages
  i18n: git-status "renamed: " message
  i18n: git-status "Initial commit" message
  i18n: git-status "Changes to be committed" message
  i18n: git-status shortstatus messages
  i18n: git-status "nothing to commit" messages
  i18n: git-status basic messages
  ...

Conflicts:
builtin/branch.c
builtin/checkout.c
builtin/clone.c
builtin/commit.c
builtin/grep.c
builtin/merge.c
builtin/push.c
builtin/revert.c
t/t3507-cherry-pick-conflict.sh
t/t7607-merge-overwrite.sh

13 years agoMerge branch 'jk/pull-into-empty'
Junio C Hamano [Sat, 2 Apr 2011 00:50:54 +0000 (17:50 -0700)]
Merge branch 'jk/pull-into-empty'

* jk/pull-into-empty:
  pull: do not clobber untracked files on initial pull
  merge: merge unborn index before setting ref

13 years agoMerge branch 'sb/sparse-more'
Junio C Hamano [Sat, 2 Apr 2011 00:50:20 +0000 (17:50 -0700)]
Merge branch 'sb/sparse-more'

* sb/sparse-more:
  Makefile: Cover more files with make check

13 years agoMerge branch 'maint'
Junio C Hamano [Sat, 2 Apr 2011 00:45:59 +0000 (17:45 -0700)]
Merge branch 'maint'

* maint:
  docs: fix filter-branch subdir example for exotic repo names

13 years agoMerge branch 'nd/index-doc' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:23:55 +0000 (16:23 -0700)]
Merge branch 'nd/index-doc' into maint

* nd/index-doc:
  doc: technical details about the index file format
  doc: technical details about the index file format

13 years agoMerge branch 'pk/stash-apply-status-relative' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:23:43 +0000 (16:23 -0700)]
Merge branch 'pk/stash-apply-status-relative' into maint

* pk/stash-apply-status-relative:
  Add test: git stash shows status relative to current dir
  git stash: show status relative to current directory

13 years agoMerge branch 'jc/maint-diff-q-filter' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:23:34 +0000 (16:23 -0700)]
Merge branch 'jc/maint-diff-q-filter' into maint

* jc/maint-diff-q-filter:
  diff --quiet: disable optimization when --diff-filter=X is used

13 years agoMerge branch 'js/maint-stash-index-copy' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:23:21 +0000 (16:23 -0700)]
Merge branch 'js/maint-stash-index-copy' into maint

* js/maint-stash-index-copy:
  stash: copy the index using --index-output instead of cp -p
  stash: fix incorrect quoting in cleanup of temporary files

13 years agoMerge branch 'mg/doc-bisect-tweak-worktree' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:23:15 +0000 (16:23 -0700)]
Merge branch 'mg/doc-bisect-tweak-worktree' into maint

* mg/doc-bisect-tweak-worktree:
  git-bisect.txt: example for bisecting with hot-fix
  git-bisect.txt: streamline run presentation

13 years agoMerge branch 'jh/maint-do-not-track-non-branches' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:20:45 +0000 (16:20 -0700)]
Merge branch 'jh/maint-do-not-track-non-branches' into maint

* jh/maint-do-not-track-non-branches:
  branch/checkout --track: Ensure that upstream branch is indeed a branch

13 years agoMerge branch 'fk/maint-cvsimport-early-failure' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:20:24 +0000 (16:20 -0700)]
Merge branch 'fk/maint-cvsimport-early-failure' into maint

* fk/maint-cvsimport-early-failure:
  git-cvsimport.perl: Bail out right away when reading from the server fails

13 years agoMerge branch 'jc/maint-apply-report-offset' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:20:19 +0000 (16:20 -0700)]
Merge branch 'jc/maint-apply-report-offset' into maint

* jc/maint-apply-report-offset:
  apply -v: show offset count when patch did not apply exactly

13 years agoMerge branch 'jc/maint-apply-no-double-patch' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:20:11 +0000 (16:20 -0700)]
Merge branch 'jc/maint-apply-no-double-patch' into maint

* jc/maint-apply-no-double-patch:
  apply: do not patch lines that were already patched

13 years agoMerge branch 'js/checkout-untracked-symlink' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:19:03 +0000 (16:19 -0700)]
Merge branch 'js/checkout-untracked-symlink' into maint

* js/checkout-untracked-symlink:
  do not overwrite untracked symlinks
  Demonstrate breakage: checkout overwrites untracked symlink with directory

13 years agoMerge "checkout ambiguous ref bugfix" into maint
Junio C Hamano [Fri, 1 Apr 2011 23:16:23 +0000 (16:16 -0700)]
Merge "checkout ambiguous ref bugfix" into maint

* commit '0cb6ad3':
  checkout: fix bug with ambiguous refs

13 years ago"log --cherry-pick" documentation regression fix
Junio C Hamano [Fri, 1 Apr 2011 18:04:46 +0000 (11:04 -0700)]
"log --cherry-pick" documentation regression fix

Earlier f98fd43 (git-log.txt,rev-list-options.txt: put option blocks in
proper order, 2011-03-08) moved the text around in the documentation for
options in the rev-list family of commands such as "log".  Consequently,
the description of the --cherry-pick option appears way above the
description of the --left-right option now.

But the description of the --cherry-pick option still refers to the
example for the --left-right option, like this:

    ... with --left-right, like the example ABOVE in the description of
    that option.

Rephrase it to clarify that we are making a forward reference.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorevisions.txt: structure with a labelled list
Michael J Gruber [Fri, 1 Apr 2011 09:27:41 +0000 (11:27 +0200)]
revisions.txt: structure with a labelled list

Currently, the reader has to parse a textual description in order to
find a specific syntax in the list.

Restructure as a labelled list with systematic labels as well as
concrete examples as a visual guide.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorevisions.txt: consistent use of quotes
Michael J Gruber [Fri, 1 Apr 2011 09:27:40 +0000 (11:27 +0200)]
revisions.txt: consistent use of quotes

Our use of quotes is inconsistent everywhere and within some files.
Before reworking the structure of revisions.txt, make the quotes
consistent:

`git command`

'some snippet or term'

The former gets typeset as code, the latter with some form of emphasis.
the man backend uses two types of emphasis.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoreflog: fix overriding of command line options
Michael J Gruber [Fri, 1 Apr 2011 09:20:33 +0000 (11:20 +0200)]
reflog: fix overriding of command line options

Currently, "git reflog" overrides some command line options such as
"--format".

Fix this by using the new 2-phase version of cmd_log_init().

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/t1411: test reflog with formats
Michael J Gruber [Fri, 1 Apr 2011 09:20:32 +0000 (11:20 +0200)]
t/t1411: test reflog with formats

"git reflog --format=short" does not work because "reflog" overrides the
format option. This is documented in code. Document this by a test
(known failure) also.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agobuiltin/log.c: separate default and setup of cmd_log_init()
Michael J Gruber [Fri, 1 Apr 2011 09:20:31 +0000 (11:20 +0200)]
builtin/log.c: separate default and setup of cmd_log_init()

cmd_log_init() sets up some default rev options and then calls
setup_revisions(), so that a caller cannot set up own defaults: Either
they get overriden by cmd_log_init() (if set before) or they override
the command line (if set after). We even complain about this in a
comment to cmd_log_reflog().

Therefore, separate the two steps so that one can still call
cmd_log_init() or, alternatively, cmd_log_init_defaults() followed by
cmd_log_init_finish() (and set defaults in between).

No functional change so far.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodocs: fix filter-branch subdir example for exotic repo names
Jeff King [Fri, 1 Apr 2011 14:46:27 +0000 (10:46 -0400)]
docs: fix filter-branch subdir example for exotic repo names

The GIT_INDEX_FILE variable we get from git has the full
path to the repo, which may contain spaces. When we use it
in our shell snippet, it needs to be quoted.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoclean: unreadable directory may still be rmdir-able if it is empty
Alex Riesen [Fri, 1 Apr 2011 08:29:16 +0000 (10:29 +0200)]
clean: unreadable directory may still be rmdir-able if it is empty

As a last ditch effort, try rmdir(2) when we cannot read the directory
to be removed.  It may be an empty directory that we can remove without
any permission, as long as we can modify its parent directory.

Noticed by Linus.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.5-rc0 v1.7.5-rc0
Junio C Hamano [Thu, 31 Mar 2011 20:58:16 +0000 (13:58 -0700)]
Git 1.7.5-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 31 Mar 2011 02:33:53 +0000 (19:33 -0700)]
Merge branch 'maint'

* maint:
  parse-remote: typofix

13 years agoparse-remote: typofix
Junio C Hamano [Thu, 31 Mar 2011 02:33:33 +0000 (19:33 -0700)]
parse-remote: typofix

An earlier patch had a trivial typo that two people did not notice.
Pointed out by Michael Schubert.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosubmodule: process conflicting submodules only once
Nicolas Morey-Chaisemartin [Wed, 30 Mar 2011 05:20:02 +0000 (07:20 +0200)]
submodule: process conflicting submodules only once

During a merge module_list returns conflicting submodules several times
(stage 1,2,3) which caused the submodules to be used multiple times in
git submodule init, sync, update and status command.

There are 5 callers of module_list; they all read (mode, sha1, stage,
path) tuple, and most of them care only about path.  As a first level
approximation, it should be Ok (in the sense that it does not make things
worse than it currently is) to filter the duplicate paths from module_list
output, but some callers should change their behaviour when the merge in
the superproject still has conflicts.

Notice the higher-stage entries, and emit only one record from
module_list, but while doing so, mark the entry with "U" (not [0-3]) in
the $stage field and null out the SHA-1 part, as the object name for the
lowest stage does not give any useful information to the caller, and this
way any caller that uses the object name would hopefully barf.  Then
update the codepaths for each subcommands this way:

 - "update" should not touch the submodule repository, because we do not
   know what commit should be checked out yet.

 - "status" reports the conflicting submodules as 'U000...000' and does
   not recurse into them (we might later want to make it recurse).

 - The command called by "foreach" may want to do whatever it wants to do
   by noticing the merged status in the superproject itself, so feed the
   path to it from module_list as before, but only once per submodule.

 - "init" and "sync" are unlikely things to do while the superproject is
   still not merged, but as long as a submodule is there in $path, there
   is no point skipping it. It might however want to take the merged
   status of .gitmodules into account, but that is outside of the scope of
   this topic.

Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Thanks-to: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Wed, 30 Mar 2011 21:10:41 +0000 (14:10 -0700)]
Merge branch 'maint'

* maint:
  contrib/thunderbird-patch-inline: do not require bash to run the script
  t8001: check the exit status of the command being tested
  strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead
  Typos: t/README
  Documentation/config.txt: make truth value of numbers more explicit
  git-pack-objects.txt: fix grammatical errors
  parse-remote: replace unnecessary sed invocation

13 years agoremote: deprecate --mirror
Jeff King [Wed, 30 Mar 2011 19:53:39 +0000 (15:53 -0400)]
remote: deprecate --mirror

The configuration created by plain --mirror is dangerous and
useless, and we now have --mirror=fetch and --mirror=push to
replace it. Let's warn the user.

One alternative to this is to try to guess which type the
user wants. In a non-bare repository, a fetch mirror doesn't
make much sense, since it would overwrite local commits. But
in a bare repository, you might use either type, or even
both (e.g., if you are acting as an intermediate drop-point
across two disconnected networks).

So rather than try for complex heuristics, let's keep it
simple. The user knows what they're trying to do, so let
them tell us.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoremote: separate the concept of push and fetch mirrors
Jeff King [Wed, 30 Mar 2011 19:53:19 +0000 (15:53 -0400)]
remote: separate the concept of push and fetch mirrors

git-remote currently has one option, "--mirror", which sets
up mirror configuration which can be used for either
fetching or pushing. It looks like this:

  [remote "mirror"]
    url = wherever
    fetch = +refs/*:refs/*
    mirror = true

However, a remote like this can be dangerous and confusing.
Specifically:

  1. If you issue the wrong command, it can be devastating.
     You are not likely to "push" when you meant to "fetch",
     but "git remote update" will try to fetch it, even if
     you intended the remote only for pushing. In either
     case, the results can be quite destructive. An
     unintended push will overwrite or delete remote refs,
     and an unintended fetch can overwrite local branches.

  2. The tracking setup code can produce confusing results.
     The fetch refspec above means that "git checkout -b new
     master" will consider refs/heads/master to come from
     the remote "mirror", even if you only ever intend to
     push to the mirror. It will set up the "new" branch to
     track mirror's refs/heads/master.

  3. The push code tries to opportunistically update
     tracking branches. If you "git push mirror foo:bar",
     it will see that we are updating mirror's
     refs/heads/bar, which corresponds to our local
     refs/heads/bar, and will update our local branch.

To solve this, we split the concept into "push mirrors" and
"fetch mirrors". Push mirrors set only remote.*.mirror,
solving (2) and (3), and making an accidental fetch write
only into FETCH_HEAD. Fetch mirrors set only the fetch
refspec, meaning an accidental push will not force-overwrite
or delete refs on the remote end.

The new syntax is "--mirror=<fetch|push>". For
compatibility, we keep "--mirror" as-is, setting up both
types simultaneously.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoremote: disallow some nonsensical option combinations
Jeff King [Wed, 30 Mar 2011 19:52:52 +0000 (15:52 -0400)]
remote: disallow some nonsensical option combinations

It doesn't make sense to use "-m" on a mirror, since "-m"
sets up the HEAD symref in the remotes namespace, but with
mirror, we are by definition not using a remotes namespace.

Similarly, it does not make much sense to specify refspecs
with --mirror. For a mirror you plan to push to, those
refspecs will be ignored. For a mirror you are fetching
from, there is no point in mirroring, since the refspec
specifies everything you want to grab.

There is one case where "--mirror -t <X>" would be useful.
Because <X> is used as-is in the refspec, and because we
append it to to refs/, you could mirror a subset of the
hierarchy by doing:

  git remote add --mirror -t 'tags/*'

But using anything besides a single branch as an argument to
"-t" is not documented and only happens to work, so closing
it off is not a serious regression.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogrep: allow -E and -n to be turned on by default via configuration
Joe Ratterman [Wed, 30 Mar 2011 19:31:05 +0000 (14:31 -0500)]
grep: allow -E and -n to be turned on by default via configuration

Add two configration variables grep.extendedRegexp and grep.lineNumbers to
allow the user to skip typing -E and -n on the command line, respectively.

Scripts that are meant to be used by random users and/or in random
repositories now have use -G and/or --no-line-number options as
appropriately to override the settings in the repository or user's
~/.gitconfig settings. Just because the script didn't say "git grep -n" no
longer guarantees that the output from the command will not have line
numbers.

Signed-off-by: Joe Ratterman <jratt0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocontrib/thunderbird-patch-inline: do not require bash to run the script
Maxin john [Wed, 30 Mar 2011 08:52:23 +0000 (09:52 +0100)]
contrib/thunderbird-patch-inline: do not require bash to run the script

The script does not have to be run under bash, but any POSIX compliant
shell would do, as it does not use any bash-isms.

It may be written under a different style than what is recommended in
Documentation/CodingGuidelines, but that is a different matter.

While at it, fix obvious typos in the comment.

Signed-off-by: Maxin B. John <maxin@maxinbjohn.info>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot8001: check the exit status of the command being tested
Junio C Hamano [Wed, 30 Mar 2011 19:22:05 +0000 (12:22 -0700)]
t8001: check the exit status of the command being tested

Avoid running the command being tested as an upstream of a pipe;
doing so will lose its exit status.

While at it, modernise the style of the script.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostrbuf.h: remove a tad stale docs-in-comment and reference api-doc instead
Michael Witten [Tue, 15 Feb 2011 23:12:04 +0000 (23:12 +0000)]
strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead

Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoTypos: t/README
Michael Witten [Tue, 22 Feb 2011 17:15:00 +0000 (17:15 +0000)]
Typos: t/README

Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/config.txt: make truth value of numbers more explicit
Carlos Martín Nieto [Wed, 30 Mar 2011 10:22:32 +0000 (12:22 +0200)]
Documentation/config.txt: make truth value of numbers more explicit

Change the order to 1/0 to have the same true/false order as the rest
of the possibilities for a boolean variable in order not not confuse
users.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-pack-objects.txt: fix grammatical errors
Stephen Boyd [Wed, 30 Mar 2011 09:00:06 +0000 (02:00 -0700)]
git-pack-objects.txt: fix grammatical errors

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>