]> Kevux Git Server - rit/log
rit
12 years agoUpdate draft release notes to 1.8.5 for the fifth batch of topics
Junio C Hamano [Fri, 20 Sep 2013 19:42:02 +0000 (12:42 -0700)]
Update draft release notes to 1.8.5 for the fifth batch of topics

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jk/upload-pack-keepalive'
Junio C Hamano [Fri, 20 Sep 2013 19:39:05 +0000 (12:39 -0700)]
Merge branch 'jk/upload-pack-keepalive'

When running "fetch -q", a long silence while the sender side
computes the set of objects to send can be mistaken by proxies as
dropped connection.  The server side has been taught to send a small
empty messages to keep the connection alive.

* jk/upload-pack-keepalive:
  upload-pack: bump keepalive default to 5 seconds
  upload-pack: send keepalive packets during pack computation

12 years agoMerge branch 'fc/at-head'
Junio C Hamano [Fri, 20 Sep 2013 19:38:10 +0000 (12:38 -0700)]
Merge branch 'fc/at-head'

Instead of typing four capital letters "HEAD", you can say "@" now,
e.g. "git log @".

* fc/at-head:
  Add new @ shortcut for HEAD
  sha1-name: pass len argument to interpret_branch_name()

12 years agoMerge branch 'dw/check-ignore-sans-index'
Junio C Hamano [Fri, 20 Sep 2013 19:37:32 +0000 (12:37 -0700)]
Merge branch 'dw/check-ignore-sans-index'

"git check-ignore" follows the same rule as "git add" and "git
status" in that the ignore/exclude mechanism does not take effect
on paths that are already tracked.  With "--no-index" option, it
can be used to diagnose which paths that should have been ignored
have been mistakenly added to the index.

* dw/check-ignore-sans-index:
  check-ignore: Add option to ignore index contents

12 years agoMerge branch 'mm/commit-template-squelch-advice-messages'
Junio C Hamano [Fri, 20 Sep 2013 19:36:31 +0000 (12:36 -0700)]
Merge branch 'mm/commit-template-squelch-advice-messages'

From the commit log template, remove irrelevant "advice" messages
that are shared with "git status" output.

* mm/commit-template-squelch-advice-messages:
  commit: disable status hints when writing to COMMIT_EDITMSG
  wt-status: turn advice_status_hints into a field of wt_status
  commit: factor status configuration is a helper function

12 years agoMerge branch 'bk/refs-multi-update'
Junio C Hamano [Fri, 20 Sep 2013 19:36:12 +0000 (12:36 -0700)]
Merge branch 'bk/refs-multi-update'

Give "update-refs" a "--stdin" option to read multiple update
requests and perform them in an all-or-none fashion.

* bk/refs-multi-update:
  update-ref: add test cases covering --stdin signature
  update-ref: support multiple simultaneous updates
  refs: add update_refs for multiple simultaneous updates
  refs: add function to repack without multiple refs
  refs: factor delete_ref loose ref step into a helper
  refs: factor update_ref steps into helpers
  refs: report ref type from lock_any_ref_for_update
  reset: rename update_refs to reset_refs

12 years agoMerge branch 'nr/git-cd-to-a-directory'
Junio C Hamano [Fri, 20 Sep 2013 19:35:42 +0000 (12:35 -0700)]
Merge branch 'nr/git-cd-to-a-directory'

Just like "make -C <directory>", make "git -C <directory> ..." to
go there before doing anything else.

* nr/git-cd-to-a-directory:
  t0056: "git -C" test updates
  git: run in a directory given with -C option

12 years agoMerge branch 'mm/rebase-continue-freebsd-WB'
Junio C Hamano [Fri, 20 Sep 2013 19:34:36 +0000 (12:34 -0700)]
Merge branch 'mm/rebase-continue-freebsd-WB'

Work around a bug in FreeBSD shell that caused a regression to "git
rebase" in v1.8.4.  May need to be later applied to 'maint'.

* mm/rebase-continue-freebsd-WB:
  rebase: fix run_specific_rebase's use of "return" on FreeBSD

12 years agoMerge branch 'jh/checkout-auto-tracking'
Junio C Hamano [Fri, 20 Sep 2013 19:31:57 +0000 (12:31 -0700)]
Merge branch 'jh/checkout-auto-tracking'

Fix a minor regression in v1.8.3.2 and later that made it
impossible to base your local work on anything but a local branch
of the upstream repository you are tracking from.

* jh/checkout-auto-tracking:
  t3200: fix failure on case-insensitive filesystems
  branch.c: Relax unnecessary requirement on upstream's remote ref name
  t3200: Add test demonstrating minor regression in 41c21f2
  Refer to branch.<name>.remote/merge when documenting --track
  t3200: Minor fix when preparing for tracking failure
  t2024: Fix &&-chaining and a couple of typos

12 years agoMerge branch 'bc/http-backend-allow-405'
Junio C Hamano [Fri, 20 Sep 2013 19:30:54 +0000 (12:30 -0700)]
Merge branch 'bc/http-backend-allow-405'

When the webserver responds with "405 Method Not Allowed", it
should tell the client what methods are allowed with the "Allow"
header.

* bc/http-backend-allow-405:
  http-backend: provide Allow header for 405

12 years agoMerge branch 'np/lookup-object-hashing'
Junio C Hamano [Fri, 20 Sep 2013 19:30:49 +0000 (12:30 -0700)]
Merge branch 'np/lookup-object-hashing'

Micro optimize hash function used in the object hash table.

* np/lookup-object-hashing:
  lookup_object: remove hashtable_index() and optimize hash_obj()

12 years agoMerge branch 'hu/cherry-pick-previous-branch'
Junio C Hamano [Fri, 20 Sep 2013 19:29:57 +0000 (12:29 -0700)]
Merge branch 'hu/cherry-pick-previous-branch'

Just like "git checkout -" knows to check out and "git merge -"
knows to merge the branch you were previously on, "git cherry-pick"
now understands "git cherry-pick -" to pick from the previous
branch.

* hu/cherry-pick-previous-branch:
  cherry-pick: allow "-" as abbreviation of '@{-1}'

12 years agoMerge branch 'mm/status-without-comment-char'
Junio C Hamano [Fri, 20 Sep 2013 19:29:01 +0000 (12:29 -0700)]
Merge branch 'mm/status-without-comment-char'

"git status" now omits the prefix to make its output a comment in a
commit log editor, which is not necessary for human consumption.

We may want to tighten the output to omit unnecessary trailing blank
lines, but that does not have to be in the scope of this series.

* mm/status-without-comment-char:
  t7508: avoid non-portable sed expression
  status: add missing blank line after list of "other" files
  tests: don't set status.displayCommentPrefix file-wide
  status: disable display of '#' comment prefix by default
  submodule summary: ignore --for-status option
  wt-status: use argv_array API
  builtin/stripspace.c: fix broken indentation

12 years agoMerge branch 'rh/peeling-tag-to-tag'
Junio C Hamano [Fri, 20 Sep 2013 19:27:18 +0000 (12:27 -0700)]
Merge branch 'rh/peeling-tag-to-tag'

Make "foo^{tag}" to peel a tag to itself, i.e. no-op., and fail if
"foo" is not a tag.  "git rev-parse --verify v1.0^{tag}" would be a
more convenient way to say "test $(git cat-file -t v1.0) = tag".

* rh/peeling-tag-to-tag:
  peel_onion: do not assume length of x_type globals
  peel_onion(): add support for <rev>^{tag}

12 years agoMerge branch 'jx/branch-vv-always-compare-with-upstream'
Junio C Hamano [Fri, 20 Sep 2013 19:26:57 +0000 (12:26 -0700)]
Merge branch 'jx/branch-vv-always-compare-with-upstream'

"git branch -v -v" (and "git status") did not distinguish among a
branch that does not build on any other branch, a branch that is in
sync with the branch it builds on, and a branch that is configured
to build on some other branch that no longer exists.

* jx/branch-vv-always-compare-with-upstream:
  status: always show tracking branch even no change
  branch: report invalid tracking branch as gone

12 years agoMerge branch 'nd/fetch-into-shallow'
Junio C Hamano [Fri, 20 Sep 2013 19:25:32 +0000 (12:25 -0700)]
Merge branch 'nd/fetch-into-shallow'

When there is no sufficient overlap between old and new history
during a fetch into a shallow repository, we unnecessarily sent
objects the sending side knows the receiving end has.

* nd/fetch-into-shallow:
  Add testcase for needless objects during a shallow fetch
  list-objects: mark more commits as edges in mark_edges_uninteresting
  list-objects: reduce one argument in mark_edges_uninteresting
  upload-pack: delegate rev walking in shallow fetch to pack-objects
  shallow: add setup_temporary_shallow()
  shallow: only add shallow graft points to new shallow file
  move setup_alternate_shallow and write_shallow_commits to shallow.c

12 years agot5541: mark passing c-a-s test as success
Jeff King [Fri, 20 Sep 2013 10:25:00 +0000 (06:25 -0400)]
t5541: mark passing c-a-s test as success

Commit 05c1eb1 (push: teach --force-with-lease to smart-http
transport) fixed the compare-and-swap test in t5541. It
tried to mark the test as passing by teaching the test
helper function to expect an extra "success or failure"
parameter, but forgot to actually use the parameter in the
helper.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoformat-patch: print in-body "From" only when needed
Jeff King [Fri, 20 Sep 2013 10:16:28 +0000 (06:16 -0400)]
format-patch: print in-body "From" only when needed

Commit a908047 taught format-patch the "--from" option,
which places the author ident into an in-body from header,
and uses the committer ident in the rfc822 from header.  The
documentation claims that it will omit the in-body header
when it is the same as the rfc822 header, but the code never
implemented that behavior.

This patch completes the feature by comparing the two idents
and doing nothing when they are the same (this is the same
as simply omitting the in-body header, as the two are by
definition indistinguishable in this case). This makes it
reasonable to turn on "--from" all the time (if it matches
your particular workflow), rather than only using it when
exporting other people's patches.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocompletion: improve untracked directory filtering for filename completion
SZEDER Gábor [Wed, 18 Sep 2013 17:06:08 +0000 (19:06 +0200)]
completion: improve untracked directory filtering for filename completion

Similar to Bash's default filename completion, our git-aware filename
completion stops at directory boundaries, i.e. it doesn't offer the
full 'path/to/file' at first, but only 'path/'.  To achieve that the
completion script runs 'git ls-files' with specific command line
options to get the list of relevant paths under the current directory,
and then processes each path to strip all but the base directory or
filename (see __git_index_files()).

To offer only modified and untracked files for 'git add' the
completion script runs 'git ls-files --exclude-standard --others
--modified'.  This command lists all non-ignored files in untracked
directories, which leads to a noticeable delay caused by the
processing mentioned above if there are a lot of such files
(__git_index_files() specifies '--exclude-standard' internally):

  $ mkdir untracked-dir
  $ for i in {1..10000} ; do >untracked-dir/$i ; done
  $ time __git_index_files "--others --modified"
  untracked-dir

  real 0m0.537s
  user 0m0.452s
  sys 0m0.160s

Eliminate this delay by additionally passing the '--directory
--no-empty-directory' options to 'git ls-files' to show only the
directory name of non-empty untracked directories instead their whole
content:

  $ time __git_index_files "--others --modified --directory --no-empty-directory"
  untracked-dir

  real 0m0.029s
  user 0m0.020s
  sys 0m0.004s

Filename completion for 'git clean' suffers from the same delay, as it
offers untracked files, too.  The fix could be the same, but since it
actually makes sense to 'git clean' empty directories, in this case we
only pass the '--directory' option to 'git ls-files'.

Reported-by: Isaac Levy <ilevy@google.com>
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jk/config-int-range-check'
Junio C Hamano [Thu, 19 Sep 2013 18:04:25 +0000 (11:04 -0700)]
Merge branch 'jk/config-int-range-check'

* jk/config-int-range-check:
  compat/mingw.h: define PRId64

12 years agocompat/mingw.h: define PRId64
Johannes Sixt [Thu, 19 Sep 2013 07:17:07 +0000 (09:17 +0200)]
compat/mingw.h: define PRId64

Provide PRId64 alongside PRIuMAX.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot0056: "git -C" test updates
Nazri Ramliy [Thu, 19 Sep 2013 13:18:54 +0000 (21:18 +0800)]
t0056: "git -C" test updates

Instead of repeating the text to record as the commit log message
and string we expect to see in "log" output, use the same variable
to avoid them going out of sync.

Use different names for test files in different directories to
improve our chance to catch future breakages that makes "-C <dir>"
go to a place that is different from what was specified.

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoshortlog: ignore commits with missing authors
Jeff King [Wed, 18 Sep 2013 21:14:00 +0000 (17:14 -0400)]
shortlog: ignore commits with missing authors

Most of git's traversals are robust against minor breakages
in commit data. For example, "git log" will still output an
entry for a commit that has a broken encoding or missing
author, and will not abort the whole operation.

Shortlog, on the other hand, will die as soon as it sees a
commit without an author, meaning that a repository with
a broken commit cannot get any shortlog output at all.

Let's downgrade this fatal error to a warning, and continue
the operation.

We simply ignore the commit and do not count it in the total
(since we do not have any author under which to file it).
Alternatively, we could output some kind of "<empty>" record
to collect these bogus commits. It is probably not worth it,
though; we have already warned to stderr, so the user is
aware that such bogosities exist, and any placeholder we
came up with would either be syntactically invalid, or would
potentially conflict with real data.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoclone: always set transport options
Jeff King [Wed, 18 Sep 2013 20:35:13 +0000 (16:35 -0400)]
clone: always set transport options

A clone will always create a transport struct, whether we
are cloning locally or using an actual protocol. In the
local case, we only use the transport to get the list of
refs, and then transfer the objects out-of-band.

However, there are many options that we do not bother
setting up in the local case. For the most part, these are
noops, because they only affect the object-fetching stage
(e.g., the --depth option).  However, some options do have a
visible impact. For example, giving the path to upload-pack
via "-u" does not currently work for a local clone, even
though we need upload-pack to get the ref list.

We can just drop the conditional entirely and set these
options for both local and non-local clones. Rather than
keep track of which options impact the object versus the ref
fetching stage, we can simply let the noops be noops (and
the cost of setting the options in the first place is not
high).

The one exception is that we also check that the transport
provides both a "get_refs_list" and a "fetch" method. We
will now be checking the former for both cases (which is
good, since a transport that cannot fetch refs would not
work for a local clone), and we tweak the conditional to
check for a "fetch" only when we are non-local.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoclone: treat "checking connectivity" like other progress
Jeff King [Wed, 18 Sep 2013 20:06:50 +0000 (16:06 -0400)]
clone: treat "checking connectivity" like other progress

When stderr does not point to a tty, we typically suppress
"we are now in this phase" progress reporting (e.g., we ask
the server not to send us "counting objects" and the like).

The new "checking connectivity" message is in the same vein,
and should be suppressed. Since clone relies on the
transport code to make the decision, we can simply sneak a
peek at the "progress" field of the transport struct. That
properly takes into account both the verbosity and progress
options we were given, as well as the result of isatty().

Note that we do not set up that progress flag for a local
clone, as we do not fetch using the transport at all. That's
acceptable here, though, because we also do not perform a
connectivity check in that case.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoclone: send diagnostic messages to stderr
Jeff King [Wed, 18 Sep 2013 20:05:13 +0000 (16:05 -0400)]
clone: send diagnostic messages to stderr

Putting messages like "Cloning into.." and "done" on stdout
is un-Unix and uselessly clutters the stdout channel. Send
them to stderr.

We have to tweak two tests to accommodate this:

  1. t5601 checks for doubled output due to forking, and
     doesn't actually care where the output goes; adjust it
     to check stderr.

  2. t5702 is trying to test whether progress output was
     sent to stderr, but naively does so by checking
     whether stderr produced any output. Instead, have it
     look for "%", a token found in progress output but not
     elsewhere (and which lets us avoid hard-coding the
     progress text in the test).

This should not regress any scripts that try to parse the
current output, as the output is already internationalized
and therefore unstable.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Wed, 18 Sep 2013 19:08:38 +0000 (12:08 -0700)]
Merge branch 'maint'

* maint:
  Start preparing for 1.8.4.1

12 years agoStart preparing for 1.8.4.1
Junio C Hamano [Wed, 18 Sep 2013 19:08:09 +0000 (12:08 -0700)]
Start preparing for 1.8.4.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'bc/completion-for-bash-3.0' into maint
Junio C Hamano [Wed, 18 Sep 2013 19:00:11 +0000 (12:00 -0700)]
Merge branch 'bc/completion-for-bash-3.0' into maint

Some people still use rather old versions of bash, which cannot grok
some constructs like 'printf -v varname' the prompt and completion
code started to use recently.

* bc/completion-for-bash-3.0:
  contrib/git-prompt.sh: handle missing 'printf -v' more gracefully
  t9902-completion.sh: old Bash still does not support array+=('') notation
  git-completion.bash: use correct Bash/Zsh array length syntax

12 years agoMerge branch 'mm/no-shell-escape-in-die-message' into maint
Junio C Hamano [Wed, 18 Sep 2013 18:59:50 +0000 (11:59 -0700)]
Merge branch 'mm/no-shell-escape-in-die-message' into maint

Fixes a minor bug in "git rebase -i" (there could be others, as the
root cause is pretty generic) where the code feeds a random, data
dependeant string to 'echo' and expects it to come out literally.

* mm/no-shell-escape-in-die-message:
  die_with_status: use "printf '%s\n'", not "echo"

12 years agoMerge branch 'jl/some-submodule-config-are-not-boolean' into maint
Junio C Hamano [Wed, 18 Sep 2013 18:59:35 +0000 (11:59 -0700)]
Merge branch 'jl/some-submodule-config-are-not-boolean' into maint

* jl/some-submodule-config-are-not-boolean:
  avoid segfault on submodule.*.path set to an empty "true"

12 years agoMerge branch 'tr/log-full-diff-keep-true-parents' into maint
Junio C Hamano [Wed, 18 Sep 2013 18:59:05 +0000 (11:59 -0700)]
Merge branch 'tr/log-full-diff-keep-true-parents' into maint

Output from "git log --full-diff -- <pathspec>" looked strange,
because comparison was done with the previous ancestor that touched
the specified <pathspec>, causing the patches for paths outside the
pathspec to show more than the single commit has changed.

* tr/log-full-diff-keep-true-parents:
  log: use true parents for diff when walking reflogs
  log: use true parents for diff even when rewriting

12 years agoMerge branch 'jc/transport-do-not-use-connect-twice-in-fetch' into maint
Junio C Hamano [Wed, 18 Sep 2013 18:58:18 +0000 (11:58 -0700)]
Merge branch 'jc/transport-do-not-use-connect-twice-in-fetch' into maint

The auto-tag-following code in "git fetch" tries to reuse the same
transport twice when the serving end does not cooperate and does
not give tags that point to commits that are asked for as part of
the primary transfer.  Unfortunately, Git-aware transport helper
interface is not designed to be used more than once, hence this
does not work over smart-http transfer.

* jc/transport-do-not-use-connect-twice-in-fetch:
  builtin/fetch.c: Fix a sparse warning
  fetch: work around "transport-take-over" hack
  fetch: refactor code that fetches leftover tags
  fetch: refactor code that prepares a transport
  fetch: rename file-scope global "transport" to "gtransport"
  t5802: add test for connect helper

12 years agoMerge branch 'sp/clip-read-write-to-8mb' into maint
Junio C Hamano [Wed, 18 Sep 2013 18:57:58 +0000 (11:57 -0700)]
Merge branch 'sp/clip-read-write-to-8mb' into maint

Send a large request to read(2)/write(2) as a smaller but still
reasonably large chunks, which would improve the latency when the
operation needs to be killed and incidentally works around broken
64-bit systems that cannot take a 2GB write or read in one go.

* sp/clip-read-write-to-8mb:
  Revert "compat/clipped-write.c: large write(2) fails on Mac OS X/XNU"
  xread, xwrite: limit size of IO to 8MB

12 years agoMerge branch 'jk/mailmap-incomplete-line' into maint
Junio C Hamano [Wed, 18 Sep 2013 18:57:32 +0000 (11:57 -0700)]
Merge branch 'jk/mailmap-incomplete-line' into maint

* jk/mailmap-incomplete-line:
  mailmap: handle mailmap blobs without trailing newlines

12 years agoUpdate draft release notes to 1.8.5 for the fourth batch of topics
Junio C Hamano [Wed, 18 Sep 2013 18:55:59 +0000 (11:55 -0700)]
Update draft release notes to 1.8.5 for the fourth batch of topics

12 years agoMerge branch 'jc/url-match'
Junio C Hamano [Wed, 18 Sep 2013 18:48:30 +0000 (11:48 -0700)]
Merge branch 'jc/url-match'

While normalizing a URL, we forgot that the buffer that holds it
could be relocated when it grows, which was a brown-paper-bag bug
that can lead to a crash introduced on 'master' post 1.8.4 release.

* jc/url-match:
  urlmatch.c: recompute pointer after append_normalized_escapes

12 years agoMerge branch 'jc/cvsserver-perm-bit-fix'
Junio C Hamano [Wed, 18 Sep 2013 18:48:01 +0000 (11:48 -0700)]
Merge branch 'jc/cvsserver-perm-bit-fix'

"git cvsserver" computed the permission mode bits incorrectly for
executable files.

* jc/cvsserver-perm-bit-fix:
  cvsserver: pick up the right mode bits

12 years agoMerge branch 'bc/send-email-ssl-die-message-fix'
Junio C Hamano [Wed, 18 Sep 2013 18:47:27 +0000 (11:47 -0700)]
Merge branch 'bc/send-email-ssl-die-message-fix'

When send-email comes up with an error message to die with upon
failure to start an SSL session, it tried to read the error string
from a wrong place.

* bc/send-email-ssl-die-message-fix:
  send-email: don't call methods on undefined values

12 years agoMerge branch 'uh/git-svn-serf-fix'
Junio C Hamano [Wed, 18 Sep 2013 18:46:06 +0000 (11:46 -0700)]
Merge branch 'uh/git-svn-serf-fix'

"git-svn" used with SVN 1.8.0 when talking over https:// connection
dumped core due to a bug in the serf library that SVN uses.  Work
it around on our side, even though the SVN side is being fixed.

* uh/git-svn-serf-fix:
  git-svn: fix termination issues for remote svn connections

12 years agoMerge branch 'fc/contrib-bzr-hg-fixes'
Junio C Hamano [Wed, 18 Sep 2013 18:45:49 +0000 (11:45 -0700)]
Merge branch 'fc/contrib-bzr-hg-fixes'

* fc/contrib-bzr-hg-fixes:
  contrib/remote-helpers: quote variable references in redirection targets
  contrib/remote-helpers: style updates for test scripts
  remote-hg: use notes to keep track of Hg revisions
  remote-helpers: cleanup more global variables
  remote-helpers: trivial style fixes
  remote-hg: improve basic test
  remote-hg: add missing &&s in the test
  remote-hg: fix test
  remote-bzr: make bzr branches configurable per-repo
  remote-bzr: fix export of utf-8 authors

12 years agoMerge branch 'js/add-i-mingw'
Junio C Hamano [Wed, 18 Sep 2013 18:45:06 +0000 (11:45 -0700)]
Merge branch 'js/add-i-mingw'

The implementation of "add -i" has a crippling code to work around
ActiveState Perl limitation but it by mistake also triggered on Git
for Windows where MSYS perl is used.

* js/add-i-mingw:
  add--interactive: fix external command invocation on Windows

12 years agoMerge branch 'ks/p4-view-spec'
Junio C Hamano [Wed, 18 Sep 2013 18:44:50 +0000 (11:44 -0700)]
Merge branch 'ks/p4-view-spec'

* ks/p4-view-spec:
  git p4: implement view spec wildcards with "p4 where"
  git p4 test: sanitize P4CHARSET

12 years agoMerge branch 'jk/duplicate-objects-in-packs'
Junio C Hamano [Wed, 18 Sep 2013 18:43:47 +0000 (11:43 -0700)]
Merge branch 'jk/duplicate-objects-in-packs'

A packfile that stores the same object more than once is broken and
will be rejected by "git index-pack" that is run when receiving data
over the wire.

* jk/duplicate-objects-in-packs:
  t5308: check that index-pack --strict detects duplicate objects
  test index-pack on packs with recoverable delta cycles
  add tests for indexing packs with delta cycles
  sha1-lookup: handle duplicate keys with GIT_USE_LOOKUP
  test-sha1: add a binary output mode

12 years agoMerge branch 'nd/git-dir-pointing-at-gitfile'
Junio C Hamano [Wed, 18 Sep 2013 18:42:36 +0000 (11:42 -0700)]
Merge branch 'nd/git-dir-pointing-at-gitfile'

We made sure that we notice the user-supplied GIT_DIR is actually a
gitfile, but did not do the same when the default ".git" is a gitfile.

* nd/git-dir-pointing-at-gitfile:
  Make setup_git_env() resolve .git file when $GIT_DIR is not specified

12 years agoMerge branch 'jk/pager-bypass-cat-for-default-pager'
Junio C Hamano [Wed, 18 Sep 2013 18:42:15 +0000 (11:42 -0700)]
Merge branch 'jk/pager-bypass-cat-for-default-pager'

If a build-time fallback is set to "cat" instead of "less", we
should apply the same "no subprocess or pipe" optimization as we
apply to user-supplied GIT_PAGER=cat.

* jk/pager-bypass-cat-for-default-pager:
  pager: turn on "cat" optimization for DEFAULT_PAGER

12 years agoMerge branch 'fc/t3200-fixes'
Junio C Hamano [Wed, 18 Sep 2013 18:42:13 +0000 (11:42 -0700)]
Merge branch 'fc/t3200-fixes'

* fc/t3200-fixes:
  t: branch: fix broken && chains
  t: branch: fix typo
  t: branch: trivial style fix

12 years agoMerge branch 'fc/rev-parse-test-updates'
Junio C Hamano [Wed, 18 Sep 2013 18:42:03 +0000 (11:42 -0700)]
Merge branch 'fc/rev-parse-test-updates'

Modernize tests.

* fc/rev-parse-test-updates:
  rev-parse test: use standard test functions for setup
  rev-parse test: use test_cmp instead of "test" builtin
  rev-parse test: use test_must_fail, not "if <command>; then false; fi"
  rev-parse test: modernize quoting and whitespace

12 years agofetch-pack.c: show correct command name that fails
Nguyễn Thái Ngọc Duy [Wed, 18 Sep 2013 13:41:18 +0000 (20:41 +0700)]
fetch-pack.c: show correct command name that fails

When --shallow-file is added to the command line, it has to be
before the subcommand name, the first argument won't be the command
name any more. Stop assuming that and keep track of the command name
explicitly.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocontacts: fix to work in subdirectories
Eric Sunshine [Wed, 18 Sep 2013 02:52:05 +0000 (22:52 -0400)]
contacts: fix to work in subdirectories

Unlike other git commands which work correctly at the top-level or in a
subdirectory, git-contacts fails when invoked in a subdirectory. This is
because it invokes git-blame with pathnames relative to the top-level,
but git-blame interprets the pathnames as relative to the current
directory. Fix this.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoclone: test the new HEAD detection logic
Junio C Hamano [Fri, 6 Sep 2013 15:57:53 +0000 (17:57 +0200)]
clone: test the new HEAD detection logic

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoconnect: annotate refs with their symref information in get_remote_head()
Junio C Hamano [Wed, 18 Sep 2013 02:10:31 +0000 (19:10 -0700)]
connect: annotate refs with their symref information in get_remote_head()

By doing this, clients of upload-pack can now reliably tell what ref
a symbolic ref points at; the updated test in t5505 used to expect
failure due to the ambiguity and made sure we give diagnostics, but
we no longer need to be so pessimistic. Make sure we correctly learn
which branch HEAD points at from the other side instead.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoconnect.c: make parse_feature_value() static
Junio C Hamano [Tue, 17 Sep 2013 23:29:28 +0000 (16:29 -0700)]
connect.c: make parse_feature_value() static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoupload-pack: send non-HEAD symbolic refs
Junio C Hamano [Tue, 17 Sep 2013 23:21:33 +0000 (16:21 -0700)]
upload-pack: send non-HEAD symbolic refs

With the same mechanism as used to tell where "HEAD" points at to
the other end, we can tell the target of other symbolic refs as
well.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoupload-pack: send symbolic ref information as capability
Junio C Hamano [Tue, 17 Sep 2013 23:17:33 +0000 (16:17 -0700)]
upload-pack: send symbolic ref information as capability

One long-standing flaw in the pack transfer protocol was that there
was no way to tell the other end which branch "HEAD" points at.
With a capability "symref=HEAD:refs/heads/master", let the sender to
tell the receiver what symbolic ref points at what ref.

This capability can be repeated more than once to represent symbolic
refs other than HEAD, such as "refs/remotes/origin/HEAD").

Add an infrastructure to collect symbolic refs, format them as extra
capabilities and put it on the wire.  For now, just send information
on the "HEAD" and nothing else.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoupload-pack.c: do not pass confusing cb_data to mark_our_ref()
Junio C Hamano [Tue, 17 Sep 2013 23:03:32 +0000 (16:03 -0700)]
upload-pack.c: do not pass confusing cb_data to mark_our_ref()

The callee does not use cb_data, and the caller is an intermediate
function in a callchain that later wants to use the cb_data for its
own use.  Clarify the code by breaking the dataflow explicitly by
not passing cb_data down to mark_our_ref().

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot5505: fix "set-head --auto with ambiguous HEAD" test
Junio C Hamano [Wed, 18 Sep 2013 04:45:34 +0000 (21:45 -0700)]
t5505: fix "set-head --auto with ambiguous HEAD" test

When two or more branches point at the same commit and HEAD is
pointing at one of them, without the symref extension, there is no
way to remotely tell which one of these branches HEAD points at.
The test in question attempts to make sure that this situation is
diagnosed and results in a failure.

However, even if there _were_ a way to reliably tell which branch
the HEAD points at, "set-head --auto" would fail if there is no
remote tracking branch.  Make sure that this test does not fail
for that "wrong" reason.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorepack: improve warnings about failure of renaming and removing files
Stefan Beller [Sun, 15 Sep 2013 15:33:22 +0000 (17:33 +0200)]
repack: improve warnings about failure of renaming and removing files

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorepack: retain the return value of pack-objects
Stefan Beller [Sun, 15 Sep 2013 15:33:21 +0000 (17:33 +0200)]
repack: retain the return value of pack-objects

During the review process of the previous commit (repack: rewrite the
shell script in C), Johannes Sixt proposed to retain any exit codes from
the sub-process, which makes it probably more obvious in case of failure.

As the commit before should behave as close to the original shell
script, the proposed change is put in this extra commit.
The infrastructure however was already setup in the previous commit.
(Having a local 'ret' variable)

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorepack: rewrite the shell script in C
Stefan Beller [Sun, 15 Sep 2013 15:33:20 +0000 (17:33 +0200)]
repack: rewrite the shell script in C

The motivation of this patch is to get closer to a goal of being
able to have a core subset of git functionality built in to git.
That would mean

 * people on Windows could get a copy of at least the core parts
   of Git without having to install a Unix-style shell

 * people using git in on servers with chrooted environments
   do not need to worry about standard tools lacking for shell
   scripts.

This patch is meant to be mostly a literal translation of the
git-repack script; the intent is that later patches would start using
more library facilities, but this patch is meant to be as close to a
no-op as possible so it doesn't do that kind of thing.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes to 1.8.5 for the first half of the fourth batch
Junio C Hamano [Tue, 17 Sep 2013 18:43:58 +0000 (11:43 -0700)]
Update draft release notes to 1.8.5 for the first half of the fourth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jk/remove-remote-helpers-in-python'
Junio C Hamano [Tue, 17 Sep 2013 18:43:01 +0000 (11:43 -0700)]
Merge branch 'jk/remove-remote-helpers-in-python'

Remove now disused remote-helpers framework for helpers written in
Python.

* jk/remove-remote-helpers-in-python:
  git_remote_helpers: remove little used Python library

12 years agoMerge branch 'ss/doclinks'
Junio C Hamano [Tue, 17 Sep 2013 18:42:54 +0000 (11:42 -0700)]
Merge branch 'ss/doclinks'

When we converted many documents that were traditionally text-only
to be formatted to AsciiDoc, we did not update links that point at
them to refer to the formatted HTML files.

* ss/doclinks:
  Documentation: make AsciiDoc links always point to HTML files

12 years agoMerge branch 'rh/ishes-doc'
Junio C Hamano [Tue, 17 Sep 2013 18:42:51 +0000 (11:42 -0700)]
Merge branch 'rh/ishes-doc'

We liberally use "committish" and "commit-ish" (and "treeish" and
"tree-ish"); as these are non-words, let's unify these terms to
their dashed form.  More importantly, clarify the documentation on
object peeling using these terms.

* rh/ishes-doc:
  glossary: fix and clarify the definition of 'ref'
  revisions.txt: fix and clarify <rev>^{<type>}
  glossary: more precise definition of tree-ish (a.k.a. treeish)
  use 'commit-ish' instead of 'committish'
  use 'tree-ish' instead of 'treeish'
  glossary: define commit-ish (a.k.a. committish)
  glossary: mention 'treeish' as an alternative to 'tree-ish'

12 years agoMerge branch 'dw/diff-no-index-doc'
Junio C Hamano [Tue, 17 Sep 2013 18:42:44 +0000 (11:42 -0700)]
Merge branch 'dw/diff-no-index-doc'

When the user types "git diff" outside a working tree, thinking he
is inside one, the current error message that is a single-liner
"usage: git diff --no-index <path> <path>" may not be sufficient to
make him realize the mistake. Add "Not a git repository" to the
error message when we fell into the "--no-index" mode without an
explicit command line option to instruct us to do so.

* dw/diff-no-index-doc:
  diff --no-index: describe in a separate paragraph
  diff --no-index: clarify operation when not inside a repository

12 years agoMerge branch 'ta/user-manual'
Junio C Hamano [Tue, 17 Sep 2013 18:42:41 +0000 (11:42 -0700)]
Merge branch 'ta/user-manual'

Update the user's manual to more recent versions of Git.

* ta/user-manual:
  "git prune" is safe
  Remove irrelevant reference from "Tying it all together"
  Remove unnecessary historical note from "Object storage format"
  Improve section "Merging multiple trees"
  Improve section "Manipulating branches"
  Simplify "How to make a commit"
  Fix some typos and improve wording
  Use "git merge" instead of "git pull ."
  Use current output for "git repack"
  Use current "detached HEAD" message
  Call it "Git User Manual" and remove reference to very old Git version

12 years agoMerge branch 'fc/trivial'
Junio C Hamano [Tue, 17 Sep 2013 18:42:34 +0000 (11:42 -0700)]
Merge branch 'fc/trivial'

* fc/trivial:
  pull: use $curr_branch_short more
  add: trivial style cleanup
  reset: trivial style cleanup
  branch: trivial style fix
  reset: trivial refactoring

12 years agoMerge branch 'fc/fast-export'
Junio C Hamano [Tue, 17 Sep 2013 18:42:31 +0000 (11:42 -0700)]
Merge branch 'fc/fast-export'

Code simpification.

* fc/fast-export:
  fast-export: refactor get_tags_and_duplicates()
  fast-export: make extra_refs global

12 years agoMerge branch 'ab/gitweb-author-initials'
Junio C Hamano [Tue, 17 Sep 2013 18:42:27 +0000 (11:42 -0700)]
Merge branch 'ab/gitweb-author-initials'

* ab/gitweb-author-initials:
  gitweb: Fix the author initials in blame for non-ASCII names

12 years agoMerge branch 'jk/has-sha1-file-retry-packed'
Junio C Hamano [Tue, 17 Sep 2013 18:41:34 +0000 (11:41 -0700)]
Merge branch 'jk/has-sha1-file-retry-packed'

When an object is not found after checking the packfiles and then
loose object directory, read_sha1_file() re-checks the packfiles to
prevent racing with a concurrent repacker; teach the same logic to
has_sha1_file().

* jk/has-sha1-file-retry-packed:
  has_sha1_file: re-check pack directory before giving up

12 years agoMerge branch 'jk/write-broken-index-with-nul-sha1'
Junio C Hamano [Tue, 17 Sep 2013 18:40:27 +0000 (11:40 -0700)]
Merge branch 'jk/write-broken-index-with-nul-sha1'

Earlier we started rejecting an attempt to add 0{40} object name to
the index and to tree objects, but it sometimes is necessary to
allow so to be able to use tools like filter-branch to correct such
broken tree objects.

* jk/write-broken-index-with-nul-sha1:
  write_index: optionally allow broken null sha1s

12 years agoMerge branch 'jx/clean-interactive'
Junio C Hamano [Tue, 17 Sep 2013 18:40:23 +0000 (11:40 -0700)]
Merge branch 'jx/clean-interactive'

Finishing touches to update the document to adjust to a new option
"git clean" learned recently.

* jx/clean-interactive:
  documentation: clarify notes for clean.requireForce

12 years agoMerge branch 'tb/precompose-autodetect-fix'
Junio C Hamano [Tue, 17 Sep 2013 18:39:59 +0000 (11:39 -0700)]
Merge branch 'tb/precompose-autodetect-fix'

On MacOS X, we detected if the filesystem needs the "pre-composed
unicode strings" workaround, but did not automatically enable it.
Now we do.

* tb/precompose-autodetect-fix:
  Set core.precomposeunicode to true on e.g. HFS+

12 years agoMerge branch 'kk/tests-with-no-perl'
Junio C Hamano [Tue, 17 Sep 2013 18:39:35 +0000 (11:39 -0700)]
Merge branch 'kk/tests-with-no-perl'

Some tests were not skipped under NO_PERL build.

* kk/tests-with-no-perl:
  reset test: modernize style
  t/t7106-reset-unborn-branch.sh: Add PERL prerequisite
  add -i test: use skip_all instead of repeated PERL prerequisite
  Make test "using invalid commit with -C" more strict

12 years agoMerge branch 'ap/commit-author-mailmap'
Junio C Hamano [Tue, 17 Sep 2013 18:38:33 +0000 (11:38 -0700)]
Merge branch 'ap/commit-author-mailmap'

"git commit --author=$name", when $name is not in the canonical
"A. U. Thor <au.thor@example.xz>" format, looks for a matching name
from existing history, but did not consult mailmap to grab the
preferred author name.

* ap/commit-author-mailmap:
  commit: search author pattern against mailmap

12 years agoMerge branch 'jk/free-tree-buffer'
Junio C Hamano [Tue, 17 Sep 2013 18:37:33 +0000 (11:37 -0700)]
Merge branch 'jk/free-tree-buffer'

* jk/free-tree-buffer:
  clear parsed flag when we free tree buffers

12 years agoMerge branch 'maint'
Junio C Hamano [Tue, 17 Sep 2013 18:37:13 +0000 (11:37 -0700)]
Merge branch 'maint'

* maint:
  t7406-submodule-update: add missing &&

12 years agot3200: fix failure on case-insensitive filesystems
Eric Sunshine [Sat, 14 Sep 2013 07:36:24 +0000 (03:36 -0400)]
t3200: fix failure on case-insensitive filesystems

62d94a3a (t3200: Add test demonstrating minor regression in 41c21f2;
2013-09-08) introduced a test which creates a directory named 'a',
however, on case-insensitive filesystems, this action fails with a
"fatal: cannot mkdir a: File exists" error due to a file named 'A' left
over from earlier tests. Resolve this problem.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot7508: avoid non-portable sed expression
Eric Sunshine [Sat, 14 Sep 2013 04:47:12 +0000 (00:47 -0400)]
t7508: avoid non-portable sed expression

2556b996 (status: disable display of '#' comment prefix by default;
2013-09-06) introduced tests which fail on Mac OS X due to unportable
use of \t (for TAB) in a sed expression. POSIX [1][2] also disallows
it. Fix this.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html#tag_20_116_13_02
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_02

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodir: revert work-around for retired dangerous behavior
Eric Sunshine [Tue, 17 Sep 2013 07:06:17 +0000 (03:06 -0400)]
dir: revert work-around for retired dangerous behavior

directory_exists_in_index_icase() dangerously assumed that it could
access one character beyond the end of its directory argument, and that
that character would unconditionally be '/'.  2eac2a4c (ls-files -k: a
directory only can be killed if the index has a non-directory,
2013-08-15) added a caller which did not respect this undocumented
assumption, and 680be044 (dir.c::test_one_path(): work around
directory_exists_in_index_icase() breakage, 2013-08-23) added a
work-around which temporarily appends a '/' before invoking
directory_exists_in_index_icase().

Since the dangerous behavior of directory_exists_in_index_icase() has
been eliminated, the work-around is now redundant, so retire it (but not
the tests added by the same commit).

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoname-hash: stop storing trailing '/' on paths in index_state.dir_hash
Eric Sunshine [Tue, 17 Sep 2013 07:06:16 +0000 (03:06 -0400)]
name-hash: stop storing trailing '/' on paths in index_state.dir_hash

When 5102c617 (Add case insensitivity support for directories when using
git status, 2010-10-03) added directories to the name-hash there was
only a single hash table in which both real cache entries and leading
directory prefixes were registered. To distinguish between the two types
of entries, directories were stored with a trailing '/'.

2092678c (name-hash.c: fix endless loop with core.ignorecase=true,
2013-02-28), however, moved directories to a separate hash table
(index_state.dir_hash) but retained the (now) redundant trailing '/',
thus callers continue to bear the burden of ensuring the slash's
presence before searching the index for a directory. Eliminate this
redundancy by storing paths in the dir-hash without the trailing '/'.

An important benefit of this change is that it eliminates undocumented
and dangerous behavior of dir.c:directory_exists_in_index_icase() in
which it assumes not only that it can validly access one character
beyond the end of its incoming directory argument, but also that that
character will unconditionally be a '/'. This perilous behavior was
"tolerated" because the string passed in by its lone caller always had a
'/' in that position, however, things broke [1] when 2eac2a4c (ls-files
-k: a directory only can be killed if the index has a non-directory,
2013-08-15) added a new caller which failed to respect the undocumented
assumption.

[1]: http://thread.gmane.org/gmane.comp.version-control.git/232727

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoemploy new explicit "exists in index?" API
Eric Sunshine [Tue, 17 Sep 2013 07:06:15 +0000 (03:06 -0400)]
employ new explicit "exists in index?" API

Each caller of index_name_exists() knows whether it is looking for a
directory or a file, and can avoid the unnecessary indirection of
index_name_exists() by instead calling index_dir_exists() or
index_file_exists() directly.

Invoking the appropriate search function explicitly will allow a
subsequent patch to relieve callers of the artificial burden of having
to add a trailing '/' to the pathname given to index_dir_exists().

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoname-hash: refactor polymorphic index_name_exists()
Eric Sunshine [Tue, 17 Sep 2013 07:06:14 +0000 (03:06 -0400)]
name-hash: refactor polymorphic index_name_exists()

Depending upon the absence or presence of a trailing '/' on the incoming
pathname, index_name_exists() checks either if a file is present in the
index or if a directory is represented within the index. Each caller
explicitly chooses the mode of operation by adding or removing a
trailing '/' before invoking index_name_exists().

Since these two modes of operations are disjoint and have no code in
common (one searches index_state.name_hash; the other dir_hash), they
can be represented more naturally as distinct functions: one to search
for a file, and one for a directory.

Splitting index searching into two functions relieves callers of the
artificial burden of having to add or remove a slash to select the mode
of operation; instead they just call the desired function. A subsequent
patch will take advantage of this benefit in order to eliminate the
requirement that the incoming pathname for a directory search must have
a trailing slash.

(In order to avoid disturbing in-flight topics, index_name_exists() is
retained as a thin wrapper dispatching either to index_dir_exists() or
index_file_exists().)

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot7406-submodule-update: add missing &&
Tay Ray Chuan [Sun, 15 Sep 2013 17:38:21 +0000 (01:38 +0800)]
t7406-submodule-update: add missing &&

322bb6e (2011 Aug 11) introduced a new subshell at the end of a test
case but omitted a '&&' to join the two; fix this.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoconfig doc: update dot-repository notes
Philip Oakley [Fri, 13 Sep 2013 21:23:16 +0000 (22:23 +0100)]
config doc: update dot-repository notes

branch.<name>.remote can be set to '.' (period) as the repository
path (URL) as part of the remote name dwimmery. Tell the reader.

Such relative paths are not 'special'. Correct the branch.<name>.merge
note.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodoc: command line interface (cli) dot-repository dwimmery
Philip Oakley [Fri, 13 Sep 2013 21:23:17 +0000 (22:23 +0100)]
doc: command line interface (cli) dot-repository dwimmery

The Git cli will accept dot '.' (period) as the relative path
to the current repository. Explain this action.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoreset: handle submodule with trailing slash
John Keeping [Thu, 12 Sep 2013 19:25:01 +0000 (20:25 +0100)]
reset: handle submodule with trailing slash

When using tab-completion, a directory path will often end with a
trailing slash which currently confuses "git reset" when dealing with
submodules.  Now that we have parse_pathspec we can easily handle this
by simply adding the PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP flag.

To do this, we need to move the read_cache() call before the
parse_pathspec() call.  All of the existing paths through cmd_reset()
that do not die early already call read_cache() at some point, so there
is no performance impact to doing this in the common case.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorm: re-use parse_pathspec's trailing-slash removal
John Keeping [Thu, 12 Sep 2013 19:25:00 +0000 (20:25 +0100)]
rm: re-use parse_pathspec's trailing-slash removal

Instead of re-implementing the "remove trailing slashes" loop in
builtin/rm.c just pass PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP to
parse_pathspec.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agopack-objects: no crc check when the cached version is used
Nguyễn Thái Ngọc Duy [Fri, 13 Sep 2013 11:03:00 +0000 (18:03 +0700)]
pack-objects: no crc check when the cached version is used

Current code makes pack-objects always do check_pack_crc() in
unpack_entry() even if right after that we find out there's a cached
version and pack access is not needed. Swap two code blocks, search
for cached version first, then check crc.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocheck-ignore: Add option to ignore index contents
Dave Williams [Thu, 5 Sep 2013 16:08:01 +0000 (17:08 +0100)]
check-ignore: Add option to ignore index contents

check-ignore currently shows how .gitignore rules would treat untracked
paths. Tracked paths do not generate useful output.  This prevents
debugging of why a path became tracked unexpectedly unless that path is
first removed from the index with `git rm --cached <path>`.

The option --no-index tells the command to bypass the check for the
path being in the index and hence allows tracked paths to be checked
too.

Whilst this behaviour deviates from the characteristics of `git add` and
`git status` its use case is unlikely to cause any user confusion.

Test scripts are augmented to check this option against the standard
ignores to ensure correct behaviour.

Signed-off-by: Dave Williams <dave@opensourcesolutions.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agourlmatch.c: recompute pointer after append_normalized_escapes
Thomas Rast [Thu, 12 Sep 2013 14:15:40 +0000 (07:15 -0700)]
urlmatch.c: recompute pointer after append_normalized_escapes

When append_normalized_escapes is called, its internal strbuf_add* calls can
cause the strbuf's buf to be reallocated changing the value of the buf pointer.

Do not use the strbuf buf pointer from before any append_normalized_escapes
calls afterwards.  Instead recompute the needed pointer.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSync with maint for l10n updates
Junio C Hamano [Thu, 12 Sep 2013 21:53:47 +0000 (14:53 -0700)]
Sync with maint for l10n updates

* maint:
  l10n: de.po: use "das Tag" instead of "der Tag"

12 years agoUpdate draft release notes to 1.8.5 for the third batch of topics
Junio C Hamano [Thu, 12 Sep 2013 21:42:47 +0000 (14:42 -0700)]
Update draft release notes to 1.8.5 for the third batch of topics

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/pager-configuration-doc'
Junio C Hamano [Thu, 12 Sep 2013 21:41:53 +0000 (14:41 -0700)]
Merge branch 'jc/pager-configuration-doc'

It was unclear in the documentation how various configurations and
environment variables determine which pager is eventually used.

* jc/pager-configuration-doc:
  config: rewrite core.pager documentation

12 years agoMerge branch 'mm/remote-helpers-doc'
Junio C Hamano [Thu, 12 Sep 2013 21:41:50 +0000 (14:41 -0700)]
Merge branch 'mm/remote-helpers-doc'

* mm/remote-helpers-doc:
  Documentation/remote-helpers: document common use-case for private ref

12 years agoMerge branch 'mn/doc-pack-heu-remove-dead-pastebin'
Junio C Hamano [Thu, 12 Sep 2013 21:41:47 +0000 (14:41 -0700)]
Merge branch 'mn/doc-pack-heu-remove-dead-pastebin'

* mn/doc-pack-heu-remove-dead-pastebin:
  remove dead pastebin link from pack-heuristics document

12 years agoMerge branch 'mm/fast-import-feature-doc'
Junio C Hamano [Thu, 12 Sep 2013 21:41:45 +0000 (14:41 -0700)]
Merge branch 'mm/fast-import-feature-doc'

* mm/fast-import-feature-doc:
  Documentation/fast-import: clarify summary for `feature` command

12 years agoMerge branch 'mm/mediawiki-dumb-push-fix'
Junio C Hamano [Thu, 12 Sep 2013 21:41:41 +0000 (14:41 -0700)]
Merge branch 'mm/mediawiki-dumb-push-fix'

* mm/mediawiki-dumb-push-fix:
  git-remote-mediawiki: no need to update private ref in non-dumb push
  git-remote-mediawiki: use no-private-update capability on dumb push
  transport-helper: add no-private-update capability
  git-remote-mediawiki: add test and check Makefile targets

12 years agoMerge branch 'jc/commit-is-spelled-with-two-ems'
Junio C Hamano [Thu, 12 Sep 2013 21:41:38 +0000 (14:41 -0700)]
Merge branch 'jc/commit-is-spelled-with-two-ems'

* jc/commit-is-spelled-with-two-ems:
  typofix: cherry is spelled with two ars
  typofix: commit is spelled with two ems

12 years agoMerge branch 'jk/config-int-range-check'
Junio C Hamano [Thu, 12 Sep 2013 21:41:00 +0000 (14:41 -0700)]
Merge branch 'jk/config-int-range-check'

"git config" did not provide a way to set or access numbers larger
than a native "int" on the platform; it now provides 64-bit signed
integers on all platforms.

* jk/config-int-range-check:
  git-config: always treat --int as 64-bit internally
  config: make numeric parsing errors more clear
  config: set errno in numeric git_parse_* functions
  config: properly range-check integer values
  config: factor out integer parsing from range checks