]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
10 years agoclone: open a shortcut for connectivity check
Nguyễn Thái Ngọc Duy [Sun, 26 May 2013 01:16:17 +0000 (08:16 +0700)] 
clone: open a shortcut for connectivity check

In order to make sure the cloned repository is good, we run "rev-list
--objects --not --all $new_refs" on the repository. This is expensive
on large repositories. This patch attempts to mitigate the impact in
this special case.

In the "good" clone case, we only have one pack. If all of the
following are met, we can be sure that all objects reachable from the
new refs exist, which is the intention of running "rev-list ...":

 - all refs point to an object in the pack
 - there are no dangling pointers in any object in the pack
 - no objects in the pack point to objects outside the pack

The second and third checks can be done with the help of index-pack as
a slight variation of --strict check (which introduces a new condition
for the shortcut: pack transfer must be used and the number of objects
large enough to call index-pack). The first is checked in
check_everything_connected after we get an "ok" from index-pack.

"index-pack + new checks" is still faster than the current "index-pack
+ rev-list", which is the whole point of this patch. If any of the
conditions fail, we fall back to the good old but expensive "rev-list
..". In that case it's even more expensive because we have to pay for
the new checks in index-pack. But that should only happen when the
other side is either buggy or malicious.

Cloning linux-2.6 over file://

        before         after
real    3m25.693s      2m53.050s
user    5m2.037s       4m42.396s
sys     0m13.750s      0m16.574s

A more realistic test with ssh:// over wireless

        before         after
real    11m26.629s     10m4.213s
user    5m43.196s      5m19.444s
sys     0m35.812s      0m37.630s

This shortcut is not applied to shallow clones, partly because shallow
clones should have no more objects than a usual fetch and the cost of
rev-list is acceptable, partly to avoid dealing with corner cases when
grafting is involved.

This shortcut does not apply to unpack-objects code path either
because the number of objects must be small in order to trigger that
code path.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoindex-pack: remove dead code (it should never happen)
Nguyễn Thái Ngọc Duy [Sun, 26 May 2013 01:16:16 +0000 (08:16 +0700)] 
index-pack: remove dead code (it should never happen)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agofetch-pack: prepare updated shallow file before fetching the pack
Nguyễn Thái Ngọc Duy [Sun, 26 May 2013 01:16:15 +0000 (08:16 +0700)] 
fetch-pack: prepare updated shallow file before fetching the pack

index-pack --strict looks up and follows parent commits. If shallow
information is not ready by the time index-pack is run, index-pack may
be led to non-existent objects. Make fetch-pack save shallow file to
disk before invoking index-pack.

git learns new global option --shallow-file to pass on the alternate
shallow file path. Undocumented (and not even support --shallow-file=
syntax) because it's unlikely to be used again elsewhere.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoclone: let the user know when check_everything_connected is run
Nguyễn Thái Ngọc Duy [Fri, 3 May 2013 12:35:11 +0000 (19:35 +0700)] 
clone: let the user know when check_everything_connected is run

check_everything_connected could take a long time, especially in the
clone case where the whole DAG is traversed. The user deserves to know
what's going on.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSync with v1.8.2.3
Junio C Hamano [Thu, 9 May 2013 20:32:54 +0000 (13:32 -0700)] 
Sync with v1.8.2.3

* maint:
  Git 1.8.2.3
  t5004: avoid using tar for checking emptiness of archive
  t5004: ignore pax global header file
  mergetools/kdiff3: do not use --auto when diffing
  transport-helper: trivial style cleanup

11 years agoGit 1.8.2.3 v1.8.2.3
Junio C Hamano [Thu, 9 May 2013 19:37:53 +0000 (12:37 -0700)] 
Git 1.8.2.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'mv/sequencer-pick-error-diag'
Junio C Hamano [Thu, 9 May 2013 20:30:19 +0000 (13:30 -0700)] 
Merge branch 'mv/sequencer-pick-error-diag'

Fix "git cherry-pick $annotated_tag", which was mistakenly rejected.

* mv/sequencer-pick-error-diag:
  cherry-pick: picking a tag that resolves to a commit is OK

11 years agocherry-pick: picking a tag that resolves to a commit is OK
Junio C Hamano [Thu, 9 May 2013 20:27:49 +0000 (13:27 -0700)] 
cherry-pick: picking a tag that resolves to a commit is OK

Earlier, 21246dbb9e0a (cherry-pick: make sure all input objects are
commits, 2013-04-11) tried to catch an unlikely "git cherry-pick $blob"
as an error, but broke a more important use case to cherry-pick a
tag that points at a commit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'tr/copy-revisions-from-stdin' into maint
Junio C Hamano [Thu, 9 May 2013 19:42:17 +0000 (12:42 -0700)] 
Merge branch 'tr/copy-revisions-from-stdin' into maint

* tr/copy-revisions-from-stdin:
  read_revisions_from_stdin: make copies for handle_revision_arg

11 years agot5004: avoid using tar for checking emptiness of archive
René Scharfe [Thu, 9 May 2013 13:13:47 +0000 (15:13 +0200)] 
t5004: avoid using tar for checking emptiness of archive

Test 2 of t5004 checks if a supposedly empty tar archive really
contains no files.  24676f02 (t5004: fix issue with empty archive test
and bsdtar) removed our commit hash to make it work with bsdtar, but
the test still fails on NetBSD and OpenBSD, which use their own tar
that considers a tar file containing only NULs as broken.

Here's what the different archivers do when asked to create a tar
file without entries:

$ uname -v
NetBSD 6.0.1 (GENERIC)
$ gtar --version | head -1
tar (GNU tar) 1.26
$ bsdtar --version
bsdtar 2.8.4 - libarchive 2.8.4

$ : >zero.tar
$ perl -e 'print "\0" x 10240' >tenk.tar
$ sha1 zero.tar tenk.tar
SHA1 (zero.tar) = da39a3ee5e6b4b0d3255bfef95601890afd80709
SHA1 (tenk.tar) = 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c

$ : | tar cf - -T - | sha1
da39a3ee5e6b4b0d3255bfef95601890afd80709
$ : | gtar cf - -T - | sha1
34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
$ : | bsdtar cf - -T - | sha1
34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c

So NetBSD's native tar creates an empty file, while GNU tar and bsdtar
both give us 10KB of NULs -- just like git archive with an empty tree.
Now let's see how the archivers handle these two kinds of empty tar
files:

$ tar tf zero.tar; echo $?
tar: Unexpected EOF on archive file
1
$ gtar tf zero.tar; echo $?
gtar: This does not look like a tar archive
gtar: Exiting with failure status due to previous errors
2
$ bsdtar tf zero.tar; echo $?
0

$ tar tf tenk.tar; echo $?
tar: Cannot identify format. Searching...
tar: End of archive volume 1 reached
tar: Sorry, unable to determine archive format.
1
$ gtar tf tenk.tar; echo $?
0
$ bsdtar tf tenk.tar; echo $?
0

NetBSD's tar complains about both, bsdtar happily accepts any of them
and GNU tar doesn't like zero-length archive files.  So the safest
course of action is to stay with our block-of-NULs format which is
compatible with GNU tar and bsdtar, as we can't make NetBSD's native
tar happy anyway.

We can simplify our test, however, by taking tar out of the picture.
Instead of extracting the archive and checking for the non-presence of
files, check if the file has a size of 10KB and contains only NULs.
This makes t5004 pass on NetBSD and OpenBSD.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot5004: ignore pax global header file
René Scharfe [Thu, 9 May 2013 13:10:48 +0000 (15:10 +0200)] 
t5004: ignore pax global header file

Versions of tar that don't know pax headers -- like the ones in NetBSD 6
and OpenBSD 5.2 -- extract them as regular files.  Explicitly ignore the
file created for our global header when checking the list of extracted
files, as this is normal and harmless fall-back behaviour.  This fixes
test 3 of t5004 on these platforms.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomergetools/kdiff3: do not use --auto when diffing
David Aguilar [Thu, 9 May 2013 09:13:28 +0000 (02:13 -0700)] 
mergetools/kdiff3: do not use --auto when diffing

The `kdiff3 --auto` help message is, "No GUI if all conflicts are auto-
solvable."  This flag was carried over from the original mergetool
commands.  diff_cmd() is for two-way comparisons only so remove the
superfluous flag.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agotransport-helper: trivial style cleanup
Felipe Contreras [Thu, 9 May 2013 01:16:56 +0000 (20:16 -0500)] 
transport-helper: trivial style cleanup

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes for 1.8.3
Junio C Hamano [Wed, 8 May 2013 05:50:05 +0000 (22:50 -0700)] 
Update draft release notes for 1.8.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-helpers: trivial cleanup
Felipe Contreras [Tue, 7 May 2013 23:45:15 +0000 (18:45 -0500)] 
remote-helpers: trivial cleanup

The comment was copied from hg-fast-export, not used anymore.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: fix for disappeared revisions
Felipe Contreras [Tue, 7 May 2013 23:39:35 +0000 (18:39 -0500)] 
remote-bzr: fix for disappeared revisions

It's possible that the previous tip goes away, we should not assume it's
always present. Fortunately we are only using it to calculate the
progress to display to the user, so only that needs to be fixed.

Also, add a test that triggers this issue.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge git://github.com/git-l10n/git-po
Junio C Hamano [Wed, 8 May 2013 01:24:31 +0000 (18:24 -0700)] 
Merge git://github.com/git-l10n/git-po

* git://github.com/git-l10n/git-po:
  l10n: zh_CN.po: translate 44 messages (2080t0f0u)
  l10n: de.po: translate 44 new messages
  l10n: Update Vietnamese translation (2080t0f0u)
  l10n: Update Swedish translation (2080t0f0u)
  l10n: git.pot: v1.8.3 round 2 (44 new, 12 removed)

11 years agol10n: zh_CN.po: translate 44 messages (2080t0f0u)
Jiang Xin [Sat, 13 Apr 2013 02:02:43 +0000 (10:02 +0800)] 
l10n: zh_CN.po: translate 44 messages (2080t0f0u)

Translate 44 new messages came from git.pot update in c6bc7d4
(l10n: git.pot: v1.8.3 round 2 (44 new, 12 removed))

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
11 years agol10n: de.po: translate 44 new messages
Ralf Thielow [Tue, 30 Apr 2013 05:38:05 +0000 (07:38 +0200)] 
l10n: de.po: translate 44 new messages

Translate 44 new messages came from git.pot update in
c6bc7d4 (l10n: git.pot: v1.8.3 round 2 (44 new, 12 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <trast@inf.ethz.ch>
11 years agoMerge branch 'jk/merge-tree-added-identically'
Junio C Hamano [Tue, 7 May 2013 05:18:25 +0000 (22:18 -0700)] 
Merge branch 'jk/merge-tree-added-identically'

* jk/merge-tree-added-identically:
  merge-tree: handle directory/empty conflict correctly

11 years agomerge-tree: handle directory/empty conflict correctly
John Keeping [Mon, 6 May 2013 15:20:54 +0000 (16:20 +0100)] 
merge-tree: handle directory/empty conflict correctly

git-merge-tree causes a null pointer dereference when a directory
entry exists in only one or two of the three trees being compared with
no corresponding entry in the other tree(s).

When this happens, we want to handle the entry as a directory and not
attempt to mark it as a file merge.  Do this by setting the entries bit
in the directory mask when the entry is missing or when it is a
directory, only performing the file comparison when we know that a file
entry exists.

Reported-by: Andreas Jacobsen <andreas@andreasjacobsen.com>
Signed-off-by: John Keeping <john@keeping.me.uk>
Tested-by: Andreas Jacobsen <andreas@andreasjacobsen.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'fc/remote-bzr'
Junio C Hamano [Tue, 7 May 2013 05:16:26 +0000 (22:16 -0700)] 
Merge branch 'fc/remote-bzr'

* fc/remote-bzr:
  remote-bzr: avoid bad refs
  remote-bzr: convert all unicode keys to str
  remote-bzr: access branches only when needed
  remote-bzr: delay peer branch usage
  remote-bzr: iterate revisions properly
  remote-bzr: improve progress reporting
  remote-bzr: add option to specify branches
  remote-bzr: add custom method to find branches
  remote-bzr: improve author sanitazion
  remote-bzr: add support for shared repo
  remote-bzr: fix branch names
  remote-bzr: add support for bzr repos
  remote-bzr: use branch variable when appropriate
  remote-bzr: fix partially pushed merge
  remote-bzr: fixes for branch diverge
  remote-bzr: add support to push merges
  remote-bzr: always try to update the worktree
  remote-bzr: fix order of locking in CustomTree
  remote-bzr: delay blob fetching until the very end
  remote-bzr: cleanup CustomTree

11 years agoremote-bzr: avoid bad refs
Felipe Contreras [Sat, 4 May 2013 00:31:07 +0000 (19:31 -0500)] 
remote-bzr: avoid bad refs

Versions of fast-export before v1.8.2 throws a bad 'reset' commands
because of a behavior in transport-helper that is not even needed.
We should ignore them, otherwise we will treat them as branches and
fail.

This was fixed in v1.8.2, but some people use this script in older
versions of git.

Also, check if the ref was a tag, and skip it for now.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: convert all unicode keys to str
Felipe Contreras [Sat, 4 May 2013 00:31:06 +0000 (19:31 -0500)] 
remote-bzr: convert all unicode keys to str

Otherwise some versions of bazaar might barf.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'fc/push-with-export-reporting-result'
Junio C Hamano [Sun, 5 May 2013 18:12:12 +0000 (11:12 -0700)] 
Merge branch 'fc/push-with-export-reporting-result'

* fc/push-with-export-reporting-result:
  transport-helper: improve push messages

11 years agotransport-helper: improve push messages
Felipe Contreras [Fri, 3 May 2013 23:41:59 +0000 (18:41 -0500)] 
transport-helper: improve push messages

If there's already a remote-helper tracking ref, we can fetch the
SHA-1 to report proper push messages (as opposed to always reporting
[new branch]).

The remote-helper currently can specify the old SHA-1 to avoid this
problem, but there's no point in forcing all remote-helpers to be aware
of git commit ids; they should be able to be agnostic of them.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoGit 1.8.3-rc1 v1.8.3-rc1
Junio C Hamano [Fri, 3 May 2013 22:23:45 +0000 (15:23 -0700)] 
Git 1.8.3-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'tr/unpack-entry-use-after-free-fix'
Junio C Hamano [Fri, 3 May 2013 22:18:04 +0000 (15:18 -0700)] 
Merge branch 'tr/unpack-entry-use-after-free-fix'

* tr/unpack-entry-use-after-free-fix:
  unpack_entry: avoid freeing objects in base cache

11 years agoSync with maint
Junio C Hamano [Fri, 3 May 2013 22:17:38 +0000 (15:17 -0700)] 
Sync with maint

* maint:
  completion: zsh: don't override suffix on _detault
  Documentation/git-commit: Typo under --edit

11 years agoMerge branch 'tr/remote-tighten-commandline-parsing' into maint
Junio C Hamano [Fri, 3 May 2013 22:12:38 +0000 (15:12 -0700)] 
Merge branch 'tr/remote-tighten-commandline-parsing' into maint

* tr/remote-tighten-commandline-parsing:
  remote: 'show' and 'prune' can take more than one remote
  remote: check for superfluous arguments in 'git remote add'
  remote: add a test for extra arguments, according to docs

11 years agoMerge branch 'jn/glossary-revision' into maint
Junio C Hamano [Fri, 3 May 2013 22:12:16 +0000 (15:12 -0700)] 
Merge branch 'jn/glossary-revision' into maint

* jn/glossary-revision:
  glossary: a revision is just a commit

11 years agocompletion: zsh: don't override suffix on _detault
Felipe Contreras [Fri, 3 May 2013 21:35:50 +0000 (16:35 -0500)] 
completion: zsh: don't override suffix on _detault

zsh is smart enough to add the right suffix while completing, there's no
point in trying to do the same as bash.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation/git-commit: Typo under --edit
Anders Granskogen Bjørnstad [Thu, 2 May 2013 18:24:15 +0000 (20:24 +0200)] 
Documentation/git-commit: Typo under --edit

-C takes a commit object, not a file.

Signed-off-by: Anders Granskogen Bjørnstad <andersgb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.8.3
Junio C Hamano [Wed, 1 May 2013 22:32:24 +0000 (15:32 -0700)] 
Update draft release notes to 1.8.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoFix grammar in the 1.8.3 release notes.
Marc Branchaud [Mon, 29 Apr 2013 19:15:04 +0000 (15:15 -0400)] 
Fix grammar in the 1.8.3 release notes.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'hb/git-pm-tempfile'
Junio C Hamano [Wed, 1 May 2013 22:24:15 +0000 (15:24 -0700)] 
Merge branch 'hb/git-pm-tempfile'

* hb/git-pm-tempfile:
  Git.pm: call tempfile from File::Temp as a regular function

11 years agoMerge branch 'rs/pp-user-info-without-extra-allocation'
Junio C Hamano [Wed, 1 May 2013 22:24:08 +0000 (15:24 -0700)] 
Merge branch 'rs/pp-user-info-without-extra-allocation'

* rs/pp-user-info-without-extra-allocation:
  pretty: remove intermediate strbufs from pp_user_info()
  pretty: simplify output line length calculation in pp_user_info()
  pretty: simplify input line length calculation in pp_user_info()

11 years agoMerge branch 'tr/remote-tighten-commandline-parsing'
Junio C Hamano [Wed, 1 May 2013 22:24:01 +0000 (15:24 -0700)] 
Merge branch 'tr/remote-tighten-commandline-parsing'

* tr/remote-tighten-commandline-parsing:
  remote: 'show' and 'prune' can take more than one remote
  remote: check for superfluous arguments in 'git remote add'
  remote: add a test for extra arguments, according to docs

11 years agoMerge branch 'zk/prompt-rebase-step'
Junio C Hamano [Wed, 1 May 2013 22:23:56 +0000 (15:23 -0700)] 
Merge branch 'zk/prompt-rebase-step'

* zk/prompt-rebase-step:
  bash-prompt.sh: show where rebase is at when stopped

11 years agoMerge remote-tracking branch 'vi-vnwildman/master'
Jiang Xin [Wed, 1 May 2013 11:49:18 +0000 (19:49 +0800)] 
Merge remote-tracking branch 'vi-vnwildman/master'

* vi-vnwildman/master:
  l10n: Update Vietnamese translation (2080t0f0u)

11 years agol10n: Update Vietnamese translation (2080t0f0u)
Tran Ngoc Quan [Wed, 1 May 2013 07:29:03 +0000 (14:29 +0700)] 
l10n: Update Vietnamese translation (2080t0f0u)

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
11 years agoremote-bzr: access branches only when needed
Felipe Contreras [Wed, 1 May 2013 01:10:10 +0000 (20:10 -0500)] 
remote-bzr: access branches only when needed

Bazaar doesn't seem to be tested for multiple usage of branches, so
resources seem to be leaked all over. Let's try to minimize this by
accessing the Branch objects only when needed.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: delay peer branch usage
Felipe Contreras [Wed, 1 May 2013 01:10:09 +0000 (20:10 -0500)] 
remote-bzr: delay peer branch usage

So it doesn't time out.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: iterate revisions properly
Felipe Contreras [Wed, 1 May 2013 01:10:08 +0000 (20:10 -0500)] 
remote-bzr: iterate revisions properly

This way we don't need to store the list of all the revisions, which
doesn't seem to be very memory efficient with bazaar's design, for
whatever reason.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: improve progress reporting
Felipe Contreras [Wed, 1 May 2013 01:10:07 +0000 (20:10 -0500)] 
remote-bzr: improve progress reporting

No need to manually count the revisions, and also, this would help to
iterate more properly.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: add option to specify branches
Felipe Contreras [Wed, 1 May 2013 01:10:06 +0000 (20:10 -0500)] 
remote-bzr: add option to specify branches

We might not want all the branches. And branch handling in bazaar is
rather tricky, so it's safer to simply specify them.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: add custom method to find branches
Felipe Contreras [Wed, 1 May 2013 01:10:05 +0000 (20:10 -0500)] 
remote-bzr: add custom method to find branches

The official method is incredibly inefficient and slow.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: improve author sanitazion
Felipe Contreras [Wed, 1 May 2013 01:10:04 +0000 (20:10 -0500)] 
remote-bzr: improve author sanitazion

So that we don't end up with '<None>', and also synchronize it with the
one from remote-hg.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: add support for shared repo
Felipe Contreras [Wed, 1 May 2013 01:10:03 +0000 (20:10 -0500)] 
remote-bzr: add support for shared repo

This way all the remotes share the same data, so adding multiple
remotes, or renaming them doesn't create extra overhead.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: fix branch names
Felipe Contreras [Wed, 1 May 2013 01:10:02 +0000 (20:10 -0500)] 
remote-bzr: fix branch names

When branches have '/' in their name (aka. sub-branches), bazaar seems
to choke while creating the new directory.

Also, git cannot have both 'foo' and 'foo/bar'.

So let's replace slashes with a plus sign.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: add support for bzr repos
Felipe Contreras [Wed, 1 May 2013 01:10:01 +0000 (20:10 -0500)] 
remote-bzr: add support for bzr repos

In bazaar, a repository can contain multiple branches, and previously we
were supporting only one branch at a time. Now we fetch them all.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: use branch variable when appropriate
Felipe Contreras [Wed, 1 May 2013 01:10:00 +0000 (20:10 -0500)] 
remote-bzr: use branch variable when appropriate

There should be no functional changes. Basically we want to reserve the
'repo' variable.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: fix partially pushed merge
Felipe Contreras [Wed, 1 May 2013 01:09:59 +0000 (20:09 -0500)] 
remote-bzr: fix partially pushed merge

If part of the merge was already pushed, we don't have the blob_marks
available, however, the commits are already stored in bazaar, so we can
use the revision_tree to fetch the contents.

We want to do this only when there's no other option.

There's no easy way to test this.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: fixes for branch diverge
Felipe Contreras [Wed, 1 May 2013 01:09:58 +0000 (20:09 -0500)] 
remote-bzr: fixes for branch diverge

If the branches diverge we want to reset the pointer to where the remote
actually is. Since we can access remote branches just as easily as local
ones, let's do so.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: add support to push merges
Felipe Contreras [Wed, 1 May 2013 01:09:57 +0000 (20:09 -0500)] 
remote-bzr: add support to push merges

In order to do that, we need to store the marks of every file, so that
they can be fetched when needed. Unfortunately we can't tell bazaar that
nothing changed, we need to send the data so that it can figure it out
by itself.

And since it will be requesting a bunch of information by the file_id,
it's better to have a helper dict (rev_files), so that we can fetch it
quickly.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: always try to update the worktree
Felipe Contreras [Wed, 1 May 2013 01:09:56 +0000 (20:09 -0500)] 
remote-bzr: always try to update the worktree

And fail properly when we can't.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: fix order of locking in CustomTree
Felipe Contreras [Wed, 1 May 2013 01:09:55 +0000 (20:09 -0500)] 
remote-bzr: fix order of locking in CustomTree

It doesn't seem to make any difference, but revision_tree() requires a
lock.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: delay blob fetching until the very end
Felipe Contreras [Wed, 1 May 2013 01:09:54 +0000 (20:09 -0500)] 
remote-bzr: delay blob fetching until the very end

Might be more efficient, but the real reason to use the marks will be
revealed in upcoming patches.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: cleanup CustomTree
Felipe Contreras [Wed, 1 May 2013 01:09:53 +0000 (20:09 -0500)] 
remote-bzr: cleanup CustomTree

This code was not used at all.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agounpack_entry: avoid freeing objects in base cache
Thomas Rast [Tue, 30 Apr 2013 12:53:06 +0000 (14:53 +0200)] 
unpack_entry: avoid freeing objects in base cache

In the !delta_data error path of unpack_entry(), we run free(base).
This became a window for use-after-free() in abe601b (sha1_file:
remove recursion in unpack_entry, 2013-03-27), as follows:

Before abe601b, we got the 'base' from cache_or_unpack_entry(..., 0);
keep_cache=0 tells it to also remove that entry.  So the 'base' is at
this point not cached, and freeing it in the error path is the right
thing.

After abe601b, the structure changed: we use a three-phase approach
where phase 1 finds the innermost base or a base that is already in
the cache.  In phase 3 we therefore know that all bases we unpack are
not part of the delta cache yet.  (Observe that we pop from the cache
in phase 1, so this is also true for the very first base.)  So we make
no further attempts to look up the bases in the cache, and just call
add_delta_base_cache() on every base object we have assembled.

But the !delta_data error path remained unchanged, and now calls
free() on a base that has already been entered in the cache.  This
means that there is a use-after-free if we later use the same base
again.

So remove that free(); we are still going to use that data.

Reported-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agol10n: Update Swedish translation (2080t0f0u)
Peter Krefting [Tue, 30 Apr 2013 11:30:21 +0000 (12:30 +0100)] 
l10n: Update Swedish translation (2080t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
11 years agol10n: git.pot: v1.8.3 round 2 (44 new, 12 removed)
Jiang Xin [Tue, 30 Apr 2013 00:31:19 +0000 (08:31 +0800)] 
l10n: git.pot: v1.8.3 round 2 (44 new, 12 removed)

Generate po/git.pot from v1.8.3-rc0-19-g7e6a0 for git v1.8.3
l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
11 years agogit-completion.bash: add remote.pushdefault to config list
Ramkumar Ramachandra [Mon, 29 Apr 2013 12:49:41 +0000 (18:19 +0530)] 
git-completion.bash: add remote.pushdefault to config list

224c2171 (remote.c: introduce remote.pushdefault, 2013-04-02)
introduced the remote.pushdefault configuration variable, but forgot
to teach git-completion.bash about it.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-completion.bash: add branch.*.pushremote to config list
Ramkumar Ramachandra [Mon, 29 Apr 2013 12:49:40 +0000 (18:19 +0530)] 
git-completion.bash: add branch.*.pushremote to config list

9f765ce (remote.c: introduce branch.<name>.pushremote, 2013-04-02)
introduced the configuration variable branch.*.pushremote, but forgot
to teach git-completion.bash about it.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Mon, 29 Apr 2013 16:57:38 +0000 (09:57 -0700)] 
Merge branch 'maint'

* maint:
  complete: zsh: use zsh completion for the main cmd
  complete: zsh: trivial simplification
  git-completion.bash: complete branch.*.rebase as boolean
  git-completion.bash: add diff.submodule to config list
  git-completion.bash: lexical sorting for diff.statGraphWidth

11 years agoMerge branch 'fc/zsh-completion' into maint
Junio C Hamano [Mon, 29 Apr 2013 16:52:18 +0000 (09:52 -0700)] 
Merge branch 'fc/zsh-completion' into maint

* fc/zsh-completion:
  complete: zsh: use zsh completion for the main cmd
  complete: zsh: trivial simplification

11 years agocomplete: zsh: use zsh completion for the main cmd
Felipe Contreras [Sat, 27 Apr 2013 20:34:06 +0000 (15:34 -0500)] 
complete: zsh: use zsh completion for the main cmd

So that we can have a nice zsh completion output:

% git <tab>
add       -- add file contents to the index
bisect    -- find by binary search the change that introduced a bug
branch    -- list, create, or delete branches
checkout  -- checkout a branch or paths to the working tree
clone     -- clone a repository into a new directory
commit    -- record changes to the repository
diff      -- show changes between commits, commit and working tree, etc
fetch     -- download objects and refs from another repository
grep      -- print lines matching a pattern
init      -- create an empty Git repository or reinitialize an existing one
log       -- show commit logs
merge     -- join two or more development histories together
mv        -- move or rename a file, a directory, or a symlink
pull      -- fetch from and merge with another repository or a local branch
push      -- update remote refs along with associated objects
rebase    -- forward-port local commits to the updated upstream head
reset     -- reset current HEAD to the specified state
rm        -- remove files from the working tree and from the index
show      -- show various types of objects
status    -- show the working tree status
tag       -- create, list, delete or verify a tag object signed with GPG

And other niceties, like 'git --git-dir=<tab>' showing only directories.

For the rest, the bash completion stuff is still used.

Also, add my copyright, since this more than a thin wrapper.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocomplete: zsh: trivial simplification
Felipe Contreras [Sat, 27 Apr 2013 20:34:05 +0000 (15:34 -0500)] 
complete: zsh: trivial simplification

There should be no functional changes.

The only reason I wrapped this code around a sub-function is because zsh
did the same in it's bashcompinit script in order to declare the special
variable 'words' as hidden, but only in this context.

There's no need for that any more since we access __git_main directly,
so 'words' is not modified, so there's no need for the sub-function.

In zsh mode the array indexes are different though.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-completion.bash: complete branch.*.rebase as boolean
Ramkumar Ramachandra [Mon, 29 Apr 2013 12:49:39 +0000 (18:19 +0530)] 
git-completion.bash: complete branch.*.rebase as boolean

6fac1b83 (completion: add missing config variables, 2009-06-29) added
"rebase" to the list of completions for "branch.*.*", but forgot to
specify completions for the values that this configuration variable
can take (namely "false" and "true").  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-completion.bash: add diff.submodule to config list
Ramkumar Ramachandra [Mon, 29 Apr 2013 12:49:38 +0000 (18:19 +0530)] 
git-completion.bash: add diff.submodule to config list

c47ef57 (diff: introduce diff.submodule configuration variable,
2012-11-13) introduced the diff.submodule configuration variable, but
forgot to teach git-completion.bash about it.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-completion.bash: lexical sorting for diff.statGraphWidth
Ramkumar Ramachandra [Mon, 29 Apr 2013 12:49:37 +0000 (18:19 +0530)] 
git-completion.bash: lexical sorting for diff.statGraphWidth

df44483a (diff --stat: add config option to limit graph width,
2012-03-01) added the option diff.startGraphWidth to the list of
configuration variables in git-completion.bash, but failed to notice
that the list is sorted alphabetically.  Move it to its rightful place
in the list.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoGit.pm: call tempfile from File::Temp as a regular function
H. Merijn Brand [Mon, 29 Apr 2013 08:09:57 +0000 (01:09 -0700)] 
Git.pm: call tempfile from File::Temp as a regular function

We call File::Temp's "tempfile" function as a class method, but it was
never designed to be called this way. Older versions seemed to
tolerate it, but as of File::Temp 0.23, it blows up like this:

  $ git svn fetch
  'tempfile' can't be called as a method at .../Git.pm line 1117.

Fix it by calling it as a regular function, just inside the File::Temp
namespace.

Signed-off-by: H. Merijn Brand <h.m.brand@xs4all.nl>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Sun, 28 Apr 2013 21:47:24 +0000 (14:47 -0700)] 
Merge branch 'maint'

* maint:
  documentation: trivial whitespace cleanups
  t/Makefile: remove smoke test targets

11 years agodocumentation: trivial whitespace cleanups
Felipe Contreras [Sat, 27 Apr 2013 22:00:07 +0000 (17:00 -0500)] 
documentation: trivial whitespace cleanups

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot/Makefile: remove smoke test targets
John Keeping [Fri, 26 Apr 2013 17:58:24 +0000 (18:58 +0100)] 
t/Makefile: remove smoke test targets

Commit d24fbca (Remove Git's support for smoke testing - 2011-12-23)
removed the smoke test support from the test suite but it was
re-added by commit 342e9ef (Introduce a performance testing
framework - 2012-02-17).  This appears to be the result of a
mis-rebase, since re-adding the smoke testing infrastructure does
not relate to the subject of that commit.

The current 'smoke' target is broken since the 'harness' script it
uses no longer exists, so just reapply this section of commit d24fbca
and remove all of the smoke testing section in the makefile.

Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'nd/pretty-formats'
Junio C Hamano [Sun, 28 Apr 2013 19:10:03 +0000 (12:10 -0700)] 
Merge branch 'nd/pretty-formats'

* nd/pretty-formats:
  pretty: Fix bug in truncation support for %>, %< and %><

11 years agopretty: Fix bug in truncation support for %>, %< and %><
Ramsay Jones [Sat, 27 Apr 2013 19:43:36 +0000 (20:43 +0100)] 
pretty: Fix bug in truncation support for %>, %< and %><

Some systems experience failures in t4205-*.sh (tests 18-20, 27)
which all relate to the use of truncation with the %< padding
placeholder. This capability was added in the commit a7f01c6b
("pretty: support truncating in %>, %< and %><", 19-04-2013).

The truncation support was implemented with the assistance of a
new strbuf function (strbuf_utf8_replace). This function contains
the following code:

       strbuf_attach(sb_src, strbuf_detach(&sb_dst, NULL),
                     sb_dst.len, sb_dst.alloc);

Unfortunately, this code is subject to unspecified behaviour. In
particular, the order of evaluation of the argument expressions
(along with the associated side effects) is not specified by the
C standard. Note that the second argument expression is a call to
strbuf_detach() which, as a side effect, sets the 'len' and 'alloc'
fields of the sb_dst argument to zero. Depending on the order of
evaluation of the argument expressions to the strbuf_attach call,
this can lead to assigning an empty string to 'sb_src'.

In order to remove the undesired behaviour, we replace the above
line of code with:

       strbuf_swap(sb_src, &sb_dst);
       strbuf_release(&sb_dst);

which achieves the desired effect without provoking unspecified
behaviour.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jk/check-corrupt-objects-carefully'
Junio C Hamano [Sun, 28 Apr 2013 18:57:54 +0000 (11:57 -0700)] 
Merge branch 'jk/check-corrupt-objects-carefully'

* jk/check-corrupt-objects-carefully:
  clone: Make the 'junk_mode' symbol a file static

11 years agoclone: Make the 'junk_mode' symbol a file static
Ramsay Jones [Sat, 27 Apr 2013 18:39:04 +0000 (19:39 +0100)] 
clone: Make the 'junk_mode' symbol a file static

Sparse issues an "'junk_mode' not declared. Should it be static?"
warning. In order to suppress the warning, since this symbol does
not need more than file visibility, we simply add the static
modifier to its declaration.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jk/merge-tree-added-identically'
Junio C Hamano [Sun, 28 Apr 2013 18:53:57 +0000 (11:53 -0700)] 
Merge branch 'jk/merge-tree-added-identically'

off-by-one fix.

* jk/merge-tree-added-identically:
  merge-tree: fix typo in "both changed identically"

11 years agomerge-tree: fix typo in "both changed identically"
John Keeping [Sat, 27 Apr 2013 13:40:33 +0000 (14:40 +0100)] 
merge-tree: fix typo in "both changed identically"

Commit aacecc3 (merge-tree: don't print entries that match "local" -
2013-04-07) had a typo causing the "same in both" check to be incorrect
and check if both the base and "their" versions are removed instead of
checking that both the "our" and "their" versions are removed.  Fix
this.

Reported-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Test-written-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocompletion: add missing format-patch options
Felipe Contreras [Sat, 27 Apr 2013 20:17:44 +0000 (15:17 -0500)] 
completion: add missing format-patch options

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoGit 1.8.3-rc0 v1.8.3-rc0
Junio C Hamano [Fri, 26 Apr 2013 22:45:09 +0000 (15:45 -0700)] 
Git 1.8.3-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'rr/shortlog-doc'
Junio C Hamano [Fri, 26 Apr 2013 22:28:39 +0000 (15:28 -0700)] 
Merge branch 'rr/shortlog-doc'

Update documentation for "log" and "shortlog".

* rr/shortlog-doc:
  builtin/shortlog.c: make usage string consistent with log
  builtin/log.c: make usage string consistent with doc
  git-shortlog.txt: make SYNOPSIS match log, update OPTIONS
  git-log.txt: rewrite note on why "--" may be required
  git-log.txt: generalize <since>..<until>
  git-log.txt: order OPTIONS properly; move <since>..<until>
  revisions.txt: clarify the .. and ... syntax
  git-shortlog.txt: remove (-h|--help) from OPTIONS

11 years agoMerge branch 'th/bisect-skipped-log'
Junio C Hamano [Fri, 26 Apr 2013 22:28:37 +0000 (15:28 -0700)] 
Merge branch 'th/bisect-skipped-log'

* th/bisect-skipped-log:
  bisect: Log possibly bad, skipped commits at bisection end

11 years agoMerge branch 'ph/rebase-original'
Junio C Hamano [Fri, 26 Apr 2013 22:28:34 +0000 (15:28 -0700)] 
Merge branch 'ph/rebase-original'

* ph/rebase-original:
  rebase: find orig_head unambiguously

11 years agoMerge branch 'jn/glossary-revision'
Junio C Hamano [Fri, 26 Apr 2013 22:28:23 +0000 (15:28 -0700)] 
Merge branch 'jn/glossary-revision'

The wording for "revision" in the glossary wanted to say it refers
to "commit (noun) as a concept" but it was badly phrased.

This may need further updates to hint that in contexts where it is
clear, the word may refer to an object name, not necessarily a
commit. But the patch as-is is already an improvement.

* jn/glossary-revision:
  glossary: a revision is just a commit

11 years agoMerge branch 'jc/add-ignore-removal'
Junio C Hamano [Fri, 26 Apr 2013 22:28:09 +0000 (15:28 -0700)] 
Merge branch 'jc/add-ignore-removal'

Introduce "--ignore-removal" as a synonym to "--no-all" for "git
add", and improve the 2.0 migration warning with it.

* jc/add-ignore-removal:
  git add: rephrase -A/--no-all warning
  git add: --ignore-removal is a better named --no-all

11 years agoremote-bzr: strip extra newline
Felipe Contreras [Fri, 26 Apr 2013 21:12:38 +0000 (16:12 -0500)] 
remote-bzr: strip extra newline

It's added by fast-export, the user didn't type it.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: tell bazaar to be quiet
Felipe Contreras [Fri, 26 Apr 2013 21:12:37 +0000 (16:12 -0500)] 
remote-bzr: tell bazaar to be quiet

Otherwise we get notification, progress bars, and what not.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: store converted URL
Felipe Contreras [Fri, 26 Apr 2013 21:12:36 +0000 (16:12 -0500)] 
remote-bzr: store converted URL

Bazaar might convert the URL to something more appropriate, like an
absolute path. Lets store that instead of the original URL, which won't
work from a different working directory if it's relative.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: use hashlib instead of hg sha1 util
Felipe Contreras [Fri, 26 Apr 2013 21:12:35 +0000 (16:12 -0500)] 
remote-hg: use hashlib instead of hg sha1 util

To be in sync with remote-bzr.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: add support to push URLs
Felipe Contreras [Fri, 26 Apr 2013 21:12:34 +0000 (16:12 -0500)] 
remote-bzr: add support to push URLs

Just like in remote-hg.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-bzr: fix bad state issue
Felipe Contreras [Fri, 26 Apr 2013 21:12:33 +0000 (16:12 -0500)] 
remote-bzr: fix bad state issue

Carried from remote-hg.

The problem reportedly happened after doing a push that fails, the abort
causes the state of remote-hg to go bad, this happens because
remote-hg's marks are not stored, but 'git fast-export' marks are.

Ensure that the marks are _always_ stored.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-hg: remove extra check
Felipe Contreras [Fri, 26 Apr 2013 21:12:32 +0000 (16:12 -0500)] 
remote-hg: remove extra check

Not needed since we use xrange ourselves.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoremote-helpers: trivial cleanups
Felipe Contreras [Fri, 26 Apr 2013 21:12:31 +0000 (16:12 -0500)] 
remote-helpers: trivial cleanups

No functional changes. Typos, unused variables, redundant operations,
and white-spaces.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'fc/remote-hg'
Junio C Hamano [Fri, 26 Apr 2013 22:19:03 +0000 (15:19 -0700)] 
Merge branch 'fc/remote-hg'

* fc/remote-hg:
  remote-hg: strip extra newline
  remote-hg: use marks instead of inlined files
  remote-hg: small performance improvement
  remote-hg: allow refs with spaces
  remote-hg: don't update bookmarks unnecessarily
  remote-hg: add support for schemes extension
  remote-hg: improve email sanitation
  remote-hg: add custom local tag write code
  remote-hg: write tags in the appropriate branch
  remote-hg: custom method to write tags
  remote-hg: add support for tag objects
  remote-hg: add branch_tip() helper
  remote-hg: properly mark branches up-to-date
  remote-hg: use python urlparse
  remote-hg: safer bookmark pushing
  remote-helpers: avoid has_key

11 years agoMerge branch 'fc/remote-bzr'
Junio C Hamano [Fri, 26 Apr 2013 22:18:26 +0000 (15:18 -0700)] 
Merge branch 'fc/remote-bzr'

* fc/remote-bzr:
  remote-bzr: use proper push method

11 years agoMerge branch 'jc/warn-pathless-add-finishing-touches'
Junio C Hamano [Fri, 26 Apr 2013 22:17:48 +0000 (15:17 -0700)] 
Merge branch 'jc/warn-pathless-add-finishing-touches'

* jc/warn-pathless-add-finishing-touches:
  git add: avoid "-u/-A without pathspec" warning on stat-dirty paths

11 years agogit add: avoid "-u/-A without pathspec" warning on stat-dirty paths
Junio C Hamano [Fri, 26 Apr 2013 20:44:35 +0000 (13:44 -0700)] 
git add: avoid "-u/-A without pathspec" warning on stat-dirty paths

In preparation for Git 2.0, "git add -u/-A" without pathspec checks
all the working tree (not limited to the current directory) and
issues a warning when it finds any path that we might add in Git
2.0, because that would mean the users' fingers need to be trained
to explicitly say "." if they want to keep the current behaviour.

However, the check was incomplete, because "git add" usually does
not refresh the index, considers a path that is stat-dirty but has
contents that is otherwise up-to-date in the index as "we might
add", and relies on that it is a no-op to add the same thing again
via the add_file_to_index() API (which also knows not to say "added"
in verbose mode when this happens).  We do not want to trigger the
warning for a path that is outside the current directory is merely
stat-dirty, as it won't be added in Git 2.0, either.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>