gitweb.git
send-email: remove warning about unset chainreplytoFelipe Contreras Sat, 25 May 2013 03:44:52 +0000 (22:44 -0500)

send-email: remove warning about unset chainreplyto

Three years and a half is probably more than enough time to give users
the opportunity to configure Git to do what they want. If they haven't
changed the configuration by now, this warning message is not going to
do anything for them anyway.

This effectively reverts commit 528fb08 (prepare send-email for smoother
change of --chain-reply-to default).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

find_first_merges(): remove unnecessary codeMichael Haggerty Sat, 25 May 2013 09:08:13 +0000 (11:08 +0200)

find_first_merges(): remove unnecessary code

No names are ever set for the object_array_entries in merges, so there
is no need to pretend to copy them to the result array.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

find_first_merges(): initialize merges variable using... Michael Haggerty Sat, 25 May 2013 09:08:12 +0000 (11:08 +0200)

find_first_merges(): initialize merges variable using initializer

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck: don't put a void*-shaped peg in a char*-shaped... Michael Haggerty Sat, 25 May 2013 09:08:11 +0000 (11:08 +0200)

fsck: don't put a void*-shaped peg in a char*-shaped hole

The source of this nonsense was

04d3975937 fsck: reduce stack footprint

, which wedged a pointer to parent into the object_array_entry's name
field. The parent pointer was passed to traverse_one_object(), even
though that function *didn't use it*.

The useless code has been deleted over time. Commit

a1cdc25172 fsck: drop unused parameter from traverse_one_object()

removed the parent pointer from traverse_one_object()'s
signature. Commit

c0aa335c95 Remove unused variables

removed the code that read the parent pointer back out of the name
field.

This commit takes the last step: don't write the parent pointer into
the name field in the first place.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

object_array_remove_duplicates(): rewrite to reduce... Michael Haggerty Sat, 25 May 2013 09:08:10 +0000 (11:08 +0200)

object_array_remove_duplicates(): rewrite to reduce copying

The old version copied one entry to its destination position, then
deleted any matching entries from the tail of the array. This
required the tail of the array to be copied multiple times. It didn't
affect the complexity of the algorithm because the whole tail has to
be searched through anyway. But all the copying was unnecessary.

Instead, check for the existence of an entry with the same name in the
*head* of the list before copying an entry to its final position.
This way each entry has to be copied at most one time.

Extract a helper function contains_name() to do a bit of the work.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revision: use object_array_filter() in implementation... Michael Haggerty Sat, 25 May 2013 09:08:09 +0000 (11:08 +0200)

revision: use object_array_filter() in implementation of gc_boundary()

Use object_array_filter(), which will soon be made smarter about
cleaning up discarded entries properly. Also add a function comment.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

object_array: add function object_array_filter()Michael Haggerty Sat, 25 May 2013 09:08:08 +0000 (11:08 +0200)

object_array: add function object_array_filter()

Add a function that allows unwanted entries in an object_array to be
removed. This encapsulation is a step towards giving object_array
ownership of its entries' name memory.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revision: split some overly-long linesMichael Haggerty Sat, 25 May 2013 09:08:07 +0000 (11:08 +0200)

revision: split some overly-long lines

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cmd_diff(): make it obvious which cases are exclusive... Michael Haggerty Sat, 25 May 2013 09:08:06 +0000 (11:08 +0200)

cmd_diff(): make it obvious which cases are exclusive of each other

At first glance the OBJ_COMMIT, OBJ_TREE, and OBJ_BLOB cases look like
they might be mutually exclusive. But the OBJ_COMMIT case doesn't end
the loop iteration with "continue" like the other two cases, but
rather falls through. So use if...else if...else construct to make it
more obvious that only the last two cases are mutually exclusive.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cmd_diff(): rename local variable "list" -> "entry"Michael Haggerty Sat, 25 May 2013 09:08:05 +0000 (11:08 +0200)

cmd_diff(): rename local variable "list" -> "entry"

It's not a list, it's an array entry.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cmd_diff(): use an object_array for holding treesMichael Haggerty Sat, 25 May 2013 09:08:04 +0000 (11:08 +0200)

cmd_diff(): use an object_array for holding trees

Change cmd_diff() to use a (struct object_array) for holding the trees
that it accumulates, rather than rolling its own equivalent.

Incidentally, this change removes a hard-coded limit of 100 trees in
combined diff, not that it matters in practice.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin_diff_tree(): make it obvious that function... Michael Haggerty Sat, 25 May 2013 09:08:03 +0000 (11:08 +0200)

builtin_diff_tree(): make it obvious that function wants two entries

Instead of accepting an array and using exactly two elements from the
array, take two single (struct object_array_entry *) arguments.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add_rev_cmdline(): make a copy of the name argumentMichael Haggerty Sat, 25 May 2013 09:08:02 +0000 (11:08 +0200)

add_rev_cmdline(): make a copy of the name argument

Instead of assuming that the memory pointed to by the name argument
will live forever, make a local copy of it before storing it in the
ref_cmdline_info.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: make own copies of refnamesMichael Haggerty Sat, 25 May 2013 09:08:01 +0000 (11:08 +0200)

fetch: make own copies of refnames

Do not retain references to refnames passed to the each_ref_fn
callback add_existing(), because their lifetime is not guaranteed.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

describe: make own copy of refnameMichael Haggerty Sat, 25 May 2013 09:08:00 +0000 (11:08 +0200)

describe: make own copy of refname

Do not retain a reference to the refname passed to the each_ref_fn
callback get_name(), because there is no guarantee of the lifetimes of
these names. Instead, make a local copy when needed.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

prune-packed: avoid implying "1" is DRY_RUN in prune_pa... Nguyễn Thái Ngọc Duy Mon, 27 May 2013 11:18:47 +0000 (18:18 +0700)

prune-packed: avoid implying "1" is DRY_RUN in prune_packed_objects()

Commit b60daf0 (Make git-prune-packed a bit more chatty. - 2007-01-12)
changes the meaning of prune_packed_objects()'s argument, from "dry
run or not dry run" to a bitmap.

It however forgot to update prune_packed_objects() caller in
builtin/prune.c to use new DRY_RUN macro. It's fine (for a long time!)
but there is a risk that someday someone may change the value of
DRY_RUN to something else and builtin/prune.c suddenly breaks. Avoid
that possibility.

While at there, change "opts == VERBOSE" to "opts & VERBOSE" as there
is no obvious reason why we only be chatty when DRY_RUN is not set.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test: rebase: fix --interactive testFelipe Contreras Tue, 28 May 2013 12:54:31 +0000 (07:54 -0500)

test: rebase: fix --interactive test

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test: trivial cleanupsFelipe Contreras Tue, 28 May 2013 12:54:29 +0000 (07:54 -0500)

test: trivial cleanups

No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote: trivial style cleanupFelipe Contreras Tue, 28 May 2013 12:54:27 +0000 (07:54 -0500)

remote: trivial style cleanup

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: don't try to update unfetched tracking refsJohn Keeping Mon, 27 May 2013 16:33:09 +0000 (17:33 +0100)

fetch: don't try to update unfetched tracking refs

Since commit f269048 (fetch: opportunistically update tracking refs,
2013-05-11) we update tracking refs opportunistically when fetching
remote branches. However, if there is a configured non-pattern refspec
that does not match any of the refspecs given on the command line then a
fatal error occurs.

Fix this by setting the "missing_ok" flag when calling get_fetch_map.

Test-added-by: Jeff King <peff@peff.net>
Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

clone: open a shortcut for connectivity checkNguyễ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>

index-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>

fetch-pack: prepare updated shallow file before fetchin... 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>

remote-hg: add support for --forceFelipe Contreras Sat, 25 May 2013 02:30:04 +0000 (21:30 -0500)

remote-hg: add support for --force

And get rid of the remote-hg.force-push option hack.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add support for --dry-runFelipe Contreras Sat, 25 May 2013 02:30:03 +0000 (21:30 -0500)

remote-hg: add support for --dry-run

This needs a specific patch from Git not applied yet.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: check if a fetch is neededFelipe Contreras Sat, 25 May 2013 02:30:02 +0000 (21:30 -0500)

remote-hg: check if a fetch is needed

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: trivial cleanupFelipe Contreras Sat, 25 May 2013 02:30:01 +0000 (21:30 -0500)

remote-hg: trivial cleanup

It's better to catch the exception later on.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-helpers: improve marks usageFelipe Contreras Sat, 25 May 2013 02:30:00 +0000 (21:30 -0500)

remote-helpers: improve marks usage

Always convert to strings (they are unicode because they come from JSON).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add check_push() helperFelipe Contreras Sat, 25 May 2013 02:29:59 +0000 (21:29 -0500)

remote-hg: add check_push() helper

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add setup_big_push() helperFelipe Contreras Sat, 25 May 2013 02:29:58 +0000 (21:29 -0500)

remote-hg: add setup_big_push() helper

So we don't duplicate these commands.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: remove files before modificationsFelipe Contreras Sat, 25 May 2013 02:29:57 +0000 (21:29 -0500)

remote-hg: remove files before modifications

Otherwise replacing a file with a directory doesn't work.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: improve lightweight tag authorFelipe Contreras Sat, 25 May 2013 02:29:56 +0000 (21:29 -0500)

remote-hg: improve lightweight tag author

Use git's committer.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: use remote 'default' not local oneFelipe Contreras Sat, 25 May 2013 02:29:55 +0000 (21:29 -0500)

remote-hg: use remote 'default' not local one

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: improve branch listingFelipe Contreras Sat, 25 May 2013 02:29:54 +0000 (21:29 -0500)

remote-hg: improve branch listing

We want to show the remote heads, not the internal ones, which might
have garbage.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: simplify branch_tip()Felipe Contreras Sat, 25 May 2013 02:29:53 +0000 (21:29 -0500)

remote-hg: simplify branch_tip()

It simply picks the last head that is not closed, but we have a stored
list of open heads.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: check diverged bookmarksFelipe Contreras Sat, 25 May 2013 02:29:52 +0000 (21:29 -0500)

remote-hg: check diverged bookmarks

So that we can report a proper error.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: pass around revision refsFelipe Contreras Sat, 25 May 2013 02:29:51 +0000 (21:29 -0500)

remote-hg: pass around revision refs

So that when a diverge is detected, we know which ref to report an error
for.

Also, since we are not throwing an exception, return a proper error
code.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: implement custom checkheads()Felipe Contreras Sat, 25 May 2013 02:29:50 +0000 (21:29 -0500)

remote-hg: implement custom checkheads()

The version from Mercurial is extremely inefficient and convoluted, this
version achieves basically the same, at least for our purposes.

No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: implement custom push()Felipe Contreras Sat, 25 May 2013 02:29:49 +0000 (21:29 -0500)

remote-hg: implement custom push()

The one from mercurial does a ton of things we are not interested in,
and we need some special modifications which are impossible otherwise.

Most of the code is borrowed from Mercurial, and cleaned up, but should
be functionally the same for our purposes, except that multiple heads
are not detected.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: only update necessary revisionsFelipe Contreras Sat, 25 May 2013 02:29:48 +0000 (21:29 -0500)

remote-hg: only update necessary revisions

We don't care about the rest, and in fact, we shouldn't try to push
everything, as there might be garbage from previous failed pushes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: force remote bookmark push selectivelyFelipe Contreras Sat, 25 May 2013 02:29:47 +0000 (21:29 -0500)

remote-hg: force remote bookmark push selectively

If we update the 'old' node, we might be updating the remote bookmark
even when our 'new' node is not related at all to what the remote has,
effectively forcing an update.

Let's do that only when forced push is configured.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: reorganize bookmark handlingFelipe Contreras Sat, 25 May 2013 02:29:46 +0000 (21:29 -0500)

remote-hg: reorganize bookmark handling

We don't need to update both internal and remote bookmarks, so let's do
one or the other, and move the shared code earlier, so it's simpler.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add test for failed double pushFelipe Contreras Sat, 25 May 2013 02:29:45 +0000 (21:29 -0500)

remote-hg: add test for failed double push

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add test for big pushFelipe Contreras Sat, 25 May 2013 02:29:44 +0000 (21:29 -0500)

remote-hg: add test for big push

With lots branches and bookmarks, non-ff, updated and new.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add test for new bookmark specialFelipe Contreras Sat, 25 May 2013 02:29:43 +0000 (21:29 -0500)

remote-hg: add test for new bookmark special

From the point of view of Mercurial, this creates a new branch head,
and requires a forced push.

Ideally, however, we would want it to work just like in git; new
branches can be pushed without problems.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add test for bookmark divergeFelipe Contreras Sat, 25 May 2013 02:29:42 +0000 (21:29 -0500)

remote-hg: add test for bookmark diverge

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add test for diverged pushFelipe Contreras Sat, 25 May 2013 02:29:41 +0000 (21:29 -0500)

remote-hg: add test for diverged push

Neither mercurial nor git allows pushing to a remote when it's a
non-fast-forward push. We should be able to detect these errors and
report them properly, as opposed to throwing an exception
stack-trace.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add test to push new bookmarkFelipe Contreras Sat, 25 May 2013 02:29:40 +0000 (21:29 -0500)

remote-hg: add test to push new bookmark

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add remote testsFelipe Contreras Sat, 25 May 2013 02:29:39 +0000 (21:29 -0500)

remote-hg: add remote tests

The logic when working with a local repository is totally different from
the one where we work with a remote repository; we need to pull and push
from it.

All this logic is currently not tested at all, so let's introduce a
variable to force the remote behavior.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: update bookmarks when using a remoteFelipe Contreras Sat, 25 May 2013 02:29:38 +0000 (21:29 -0500)

remote-hg: update bookmarks when using a remote

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add check_bookmark() test helperFelipe Contreras Sat, 25 May 2013 02:29:37 +0000 (21:29 -0500)

remote-hg: add check_bookmark() test helper

And check in a more proper way.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-bzr: simplify test checksFelipe Contreras Sat, 25 May 2013 02:29:36 +0000 (21:29 -0500)

remote-bzr: simplify test checks

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add tests for 'master' bookmarkFelipe Contreras Sat, 25 May 2013 02:29:35 +0000 (21:29 -0500)

remote-hg: add tests for 'master' bookmark

We want to make sure everything works correctly, even if there's a
'master' bookmark in Mercurial.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: always point HEAD to masterFelipe Contreras Sat, 25 May 2013 02:29:34 +0000 (21:29 -0500)

remote-hg: always point HEAD to master

Mercurial always checks out the 'default' branch, so there's no point in
complicating our lives trying to do something fancier, which causes
different behavior depending on whether the repository is local or
remote.

So let's always use 'default' (which we translate to 'master'), unless
we are in hg-git mode, which expects us to use the 'master' bookmark
instead.

Also, update the tests that used to check for different checkout
behaviors to simply check that the refs are there, remove unnecessary
ones, and fix the ones that expect something different.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: improve progress calculationFelipe Contreras Sat, 25 May 2013 02:29:33 +0000 (21:29 -0500)

remote-hg: improve progress calculation

No need to manually keep track of the revision count.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: trivial cleanupsFelipe Contreras Sat, 25 May 2013 02:29:32 +0000 (21:29 -0500)

remote-hg: trivial cleanups

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: ensure remote rebasing worksFelipe Contreras Sat, 25 May 2013 02:29:31 +0000 (21:29 -0500)

remote-hg: ensure remote rebasing works

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: upgrade version 1 marksFelipe Contreras Sat, 25 May 2013 02:29:30 +0000 (21:29 -0500)

remote-hg: upgrade version 1 marks

As suggested by Jed Brown; there's no need to re-import all the commits.

Cc: Jed Brown <jed@59a2.org>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: switch from revisions to SHA-1 noteidsFelipe Contreras Sat, 25 May 2013 02:29:29 +0000 (21:29 -0500)

remote-hg: switch from revisions to SHA-1 noteids

Otherwise we won't know if revisions are replaced.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: add version checks to the marksFelipe Contreras Sat, 25 May 2013 02:29:28 +0000 (21:29 -0500)

remote-hg: add version checks to the marks

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: improve node traversingFelipe Contreras Sat, 25 May 2013 02:29:27 +0000 (21:29 -0500)

remote-hg: improve node traversing

We won't be able to count the unmarked commits, but we are not going to
be able to do that anyway when we switch to SHA-1 ids.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: shuffle some codeFelipe Contreras Sat, 25 May 2013 02:29:26 +0000 (21:29 -0500)

remote-hg: shuffle some code

In preparation to shift to SHA-1's.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: use a shared repository storeFelipe Contreras Sat, 25 May 2013 02:29:25 +0000 (21:29 -0500)

remote-hg: use a shared repository store

This way we don't have to have duplicated Mercurial objects.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: load all extensionsFelipe Contreras Sat, 25 May 2013 02:29:24 +0000 (21:29 -0500)

remote-hg: load all extensions

The user might have then configured differently, plus, all of them will
be loaded anyway later on.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: test: simplify previous branch checkoutFelipe Contreras Sat, 25 May 2013 02:29:23 +0000 (21:29 -0500)

remote-hg: test: simplify previous branch checkout

@{-1} does the same thing.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-helpers: test: simplify remote URLsFelipe Contreras Sat, 25 May 2013 02:29:22 +0000 (21:29 -0500)

remote-helpers: test: simplify remote URLs

No need to specify $PWD any more.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-helpers: tests: general improvementsFelipe Contreras Sat, 25 May 2013 02:29:21 +0000 (21:29 -0500)

remote-helpers: tests: general improvements

So that we don't need a temporary directory.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-helpers: test: cleanup styleFelipe Contreras Sat, 25 May 2013 02:29:20 +0000 (21:29 -0500)

remote-helpers: test: cleanup style

So it's more standardized between all the tests.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-helpers: test: cleanup white-spacesFelipe Contreras Sat, 25 May 2013 02:29:19 +0000 (21:29 -0500)

remote-helpers: test: cleanup white-spaces

We prefer tabs to spaces.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: trivial reorganizationFelipe Contreras Sat, 25 May 2013 02:29:18 +0000 (21:29 -0500)

remote-hg: trivial reorganization

We only need to get the remote dict once.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: test: be a little more quietFelipe Contreras Sat, 25 May 2013 02:29:17 +0000 (21:29 -0500)

remote-hg: test: be a little more quiet

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-bzr: add fallback check for a partial cloneFelipe Contreras Sat, 25 May 2013 02:24:26 +0000 (21:24 -0500)

remote-bzr: add fallback check for a partial clone

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-bzr: reorganize the way 'wanted' worksFelipe Contreras Sat, 25 May 2013 02:24:25 +0000 (21:24 -0500)

remote-bzr: reorganize the way 'wanted' works

If the user specified a list of branches, we ignore what the remote
repository lists, and simply use the branches directly. Since some
remotes don't report the branches correctly, this is useful.

Otherwise either fetch the repo, or the branch.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-bzr: trivial cleanupsFelipe Contreras Sat, 25 May 2013 02:24:24 +0000 (21:24 -0500)

remote-bzr: trivial cleanups

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-bzr: change global repoFelipe Contreras Sat, 25 May 2013 02:24:23 +0000 (21:24 -0500)

remote-bzr: change global repo

It's not used anyway.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-bzr: delay cloning/pullingFelipe Contreras Sat, 25 May 2013 02:24:22 +0000 (21:24 -0500)

remote-bzr: delay cloning/pulling

Until the branch is actually going to be used.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-bzr: simplify get_remote_branch()Felipe Contreras Sat, 25 May 2013 02:24:21 +0000 (21:24 -0500)

remote-bzr: simplify get_remote_branch()

No need for 'origin', it's only needed for the bzrdir 'sprout' method,
which can be greatly simplified.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-bzr: fix for files with spacesFelipe Contreras Sat, 25 May 2013 02:24:20 +0000 (21:24 -0500)

remote-bzr: fix for files with spaces

Set the maximum number of splits to make when dividing the diff stat
lines based on space characters.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-bzr: recover from failed clonesFelipe Contreras Sat, 25 May 2013 02:24:19 +0000 (21:24 -0500)

remote-bzr: recover from failed clones

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

build: do not install git-remote-testpyFelipe Contreras Sat, 25 May 2013 02:41:06 +0000 (21:41 -0500)

build: do not install git-remote-testpy

It's only meant for testing.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

build: add NO_INSTALL variableFelipe Contreras Sat, 25 May 2013 02:41:05 +0000 (21:41 -0500)

build: add NO_INSTALL variable

So that we can specify which scripts we do not want to install (they are
for testing).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

build: cleanup using $<Felipe Contreras Sat, 25 May 2013 02:41:03 +0000 (21:41 -0500)

build: cleanup using $<

No need to list the first prerequisite. No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

build: cleanup using $^Felipe Contreras Sat, 25 May 2013 02:41:02 +0000 (21:41 -0500)

build: cleanup using $^

There's no need to list again the prerequisites. No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

build: trivial simplificationFelipe Contreras Sat, 25 May 2013 02:41:01 +0000 (21:41 -0500)

build: trivial simplification

SCRIPT_PYTHON_GEN is '$(patsubst %.py,%,$(SCRIPT_PYTHON))', so replace
'$(patsubst %.py,%,$(SCRIPT_PYTHON))' with it

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.3 v1.8.3Junio C Hamano Fri, 24 May 2013 18:34:46 +0000 (11:34 -0700)

Git 1.8.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>

urls.txt: avoid auto converting to hyperlinkNguyễn Thái Ngọc Duy Fri, 24 May 2013 15:44:03 +0000 (22:44 +0700)

urls.txt: avoid auto converting to hyperlink

file:///path/to/repo.git/ is converted to a hyperlink while others are
not. Put a backslash to avoid the conversion. Tested with asciidoc
8.6.5.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Document push --no-verifyThomas Rast Thu, 23 May 2013 13:34:11 +0000 (15:34 +0200)

Document push --no-verify

ec55559 (push: Add support for pre-push hooks, 2013-01-13) forgot to
add a note to git-push(1) about the new --no-verify option.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: Fix log output for multi-parent skip rangesTorstein Hegge Wed, 22 May 2013 22:27:53 +0000 (00:27 +0200)

bisect: Fix log output for multi-parent skip ranges

The bisect log output of skipped commits introduced in f989cac "bisect:
Log possibly bad, skipped commits at bisection end" should obtain the range of
skipped commits from

git rev-list bad --not good-1 good-2

not

git rev-list bad --not good-1 --not good-2

when the skipped range contains a merge with good points in each parent.

Signed-off-by: Torstein Hegge <hegge@resisty.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_name: fix error message for @{u}Ramkumar Ramachandra Wed, 22 May 2013 10:39:54 +0000 (16:09 +0530)

sha1_name: fix error message for @{u}

Currently, when no (valid) upstream is configured for a branch, you get
an error like:

$ git show @{u}
error: No upstream configured for branch 'upstream-error'
error: No upstream configured for branch 'upstream-error'
fatal: ambiguous argument '@{u}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

The "error: " line actually appears twice, and the rest of the error
message is useless. In sha1_name.c:interpret_branch_name(), there is
really no point in processing further if @{u} couldn't be resolved, and
we might as well die() instead of returning an error(). After making
this change, you get:

$ git show @{u}
fatal: No upstream configured for branch 'upstream-error'

Also tweak a few tests in t1507 to expect this output.

This only turns error() that may be called after we know we are
dealing with an @{upstream} marker into die(), without touching
silent error returns "return -1" from the function. Any caller that
wants to handle an error condition itself will not be hurt by this
change, unless they want to see the message from error() and then
exit silently without giving its own message, which needs to be
fixed anyway.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

prompt: fix show upstream with svn and zshThomas Gummerer Wed, 22 May 2013 07:40:39 +0000 (09:40 +0200)

prompt: fix show upstream with svn and zsh

Currently the __git_ps1 git prompt gives the following error with a
repository converted by git-svn, when used with zsh:

__git_ps1_show_upstream:19: bad pattern: svn_remote[
__git_ps1_show_upstream:45: bad substitution

To reproduce the problem, the __git_ps1_show_upstream function can be
executed in a repository converted with git-svn. Both those errors are
triggered by spaces after the '['.

Zsh also doesn't support initializing an array with `local var=(...)`.
This triggers the following error:

__git_ps1_show_upstream:41: bad pattern: svn_upstream=(commit

Use
local -a
var=(...)
instead to make is compatible.

This was introduced by 6d158cba (bash completion: Support "divergence
from upstream" messages in __git_ps1), when the script was for bash
only.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Acked-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

imap-send: eliminate HMAC deprecation warnings on Mac... David Aguilar Sun, 19 May 2013 10:23:36 +0000 (06:23 -0400)

imap-send: eliminate HMAC deprecation warnings on Mac OS X

As of Mac OS X 10.7, Apple deprecated all OpenSSL functions due to
OpenSSL ABI instability. Silence the warnings by using Apple's
CommonCrypto HMAC replacement functions.

[es: reworded commit message; check APPLE_COMMON_CRYPTO instead of
abusing COMMON_DIGEST_FOR_OPENSSL]

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: tests: fix hg mergeFelipe Contreras Fri, 17 May 2013 21:10:08 +0000 (16:10 -0500)

remote-hg: tests: fix hg merge

Let's specify a merge tool, otherwise mercurial might open one and hang
our tests waiting for user input.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-helpers: tests: use python directlyFelipe Contreras Fri, 17 May 2013 21:10:07 +0000 (16:10 -0500)

remote-helpers: tests: use python directly

These remote helpers use 'env python', not PYTHON_PATH, so that's where
we should check for the extensions. Otherwise, if 'python' is not
PYTHON_PATH (e.g. /usr/bin/python: Makefile's default), there will be a
mismatch between the python libraries actually accessible to the remote
helpers.

Suggested by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport-helper: check if the dry-run is supportedFelipe Contreras Tue, 21 May 2013 01:32:04 +0000 (20:32 -0500)

transport-helper: check if the dry-run is supported

Certain remote-helpers (the ones with 'export') would try to push
regardless.

Obviously this is not what the user wants.

Also, add a check for the 'dry-run' option, so remote-helpers can
implement it.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport-helper: barf when user tries old:newFelipe Contreras Tue, 21 May 2013 01:02:45 +0000 (20:02 -0500)

transport-helper: barf when user tries old:new

Otherwise with certain remote helpers (the ones that support 'export'),
the users will be pushing to the wrong branch:

git push topic:master

Will push the topic branch, as if the user typed:

git push topic

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: fix order of configuration commentsFelipe Contreras Tue, 21 May 2013 03:47:53 +0000 (22:47 -0500)

remote-hg: fix order of configuration comments

The other configurations were added in the wrong place.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-hg: trivial configuration note cleanupFelipe Contreras Tue, 21 May 2013 03:47:52 +0000 (22:47 -0500)

remote-hg: trivial configuration note cleanup

Follow the style of the previous configurations.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

completion: regression fix for zshFelipe Contreras Tue, 21 May 2013 00:33:03 +0000 (19:33 -0500)

completion: regression fix for zsh

zsh completion wrapper doesn't reimplement __gitcompadd(). Although it
should be trivial to do that, let's use __gitcomp_nl() which achieves
exactly the same thing, specially since the suffix ($4) has to be empty.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

contrib/git-subtree: Use /bin/sh interpreter instead... Dmitry Marakasov Mon, 20 May 2013 20:24:34 +0000 (00:24 +0400)

contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bash

Use /bin/sh interpreter instead of /bin/bash for contrib/git-subtree:
it's required for systems which don't use bash by default (for example,
FreeBSD), while there seem to be no bashisms in the script (confirmed
by looking through the source and tesing subtree functionality with
FreeBSD's /bin/sh) to require specifically bash and not the generic
posix shell.

Signed-off-by: Dmitry Marakasov <amdmi3@amdmi3.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://git.bogomips.org/git-svnJunio C Hamano Mon, 20 May 2013 23:06:48 +0000 (16:06 -0700)

Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
git-svn: introduce --parents parameter for commands branch and tag
git-svn: clarify explanation of --destination argument
git-svn: multiple fetch/branches/tags keys are supported