]> Pileus Git - ~andy/git/log
~andy/git
11 years agoMerge branch 'mm/merge-in-dirty-worktree-doc'
Junio C Hamano [Wed, 26 Jun 2013 22:07:43 +0000 (15:07 -0700)]
Merge branch 'mm/merge-in-dirty-worktree-doc'

* mm/merge-in-dirty-worktree-doc:
  Documentation/git-merge.txt: weaken warning about uncommited changes

11 years agoMerge branch 'kb/diff-blob-blob-doc'
Junio C Hamano [Wed, 26 Jun 2013 22:07:41 +0000 (15:07 -0700)]
Merge branch 'kb/diff-blob-blob-doc'

* kb/diff-blob-blob-doc:
  Documentation: Move "git diff <blob> <blob>"

11 years agoMerge branch 'mm/push-force-is-dangerous'
Junio C Hamano [Wed, 26 Jun 2013 22:07:38 +0000 (15:07 -0700)]
Merge branch 'mm/push-force-is-dangerous'

* mm/push-force-is-dangerous:
  Documentation/git-push.txt: explain better cases where --force is dangerous

11 years agoMerge branch 'fg/submodule-non-ascii-path'
Junio C Hamano [Wed, 26 Jun 2013 22:07:35 +0000 (15:07 -0700)]
Merge branch 'fg/submodule-non-ascii-path'

Many "git submodule" operations do not work on a submodule at a
path whose name is not in ASCII.

* fg/submodule-non-ascii-path:
  t7400: test of UTF-8 submodule names pass under Mac OS
  handle multibyte characters in name

11 years agoUpdate draft release notes to 1.8.4
Junio C Hamano [Mon, 24 Jun 2013 20:53:03 +0000 (13:53 -0700)]
Update draft release notes to 1.8.4

For now, comment out the description on two "git status" UI
configuration, until the reverted topic can be resurrected.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'rr/am-quit-empty-then-abort-fix'
Junio C Hamano [Mon, 24 Jun 2013 20:49:00 +0000 (13:49 -0700)]
Merge branch 'rr/am-quit-empty-then-abort-fix'

Recent "rebase --autostash" update made it impossible to recover
with "git am --abort" from a repository where "git am" without mbox
was run by mistake and then was killed with "^C".

* rr/am-quit-empty-then-abort-fix:
  t/am: use test_path_is_missing() where appropriate
  am: handle stray $dotest directory

11 years agoMerge branch 'rt/cherry-pick-continue-advice-in-status'
Junio C Hamano [Mon, 24 Jun 2013 20:48:57 +0000 (13:48 -0700)]
Merge branch 'rt/cherry-pick-continue-advice-in-status'

* rt/cherry-pick-continue-advice-in-status:
  wt-status: give better advice when cherry-pick is in progress

11 years agoMerge branch 'nk/config-local-doc'
Junio C Hamano [Mon, 24 Jun 2013 20:48:55 +0000 (13:48 -0700)]
Merge branch 'nk/config-local-doc'

* nk/config-local-doc:
  config: Add description of --local option

11 years agoMerge branch 'jk/mergetool-lib-refactor'
Junio C Hamano [Mon, 24 Jun 2013 20:48:53 +0000 (13:48 -0700)]
Merge branch 'jk/mergetool-lib-refactor'

Code cleanup.

* jk/mergetool-lib-refactor:
  mergetool--lib: refactor {diff,merge}_cmd logic

11 years agoMerge branch 'jk/doc-build-move-infordir-def'
Junio C Hamano [Mon, 24 Jun 2013 20:48:51 +0000 (13:48 -0700)]
Merge branch 'jk/doc-build-move-infordir-def'

Makefile cleanup.

* jk/doc-build-move-infordir-def:
  Documentation/Makefile: move infodir to be with other '*dir's
  Documentation/Makefile: fix spaces around assignments

11 years agoMerge branch 'fg/submodule-fixup'
Junio C Hamano [Mon, 24 Jun 2013 20:48:50 +0000 (13:48 -0700)]
Merge branch 'fg/submodule-fixup'

Code cleanup.

* fg/submodule-fixup:
  git-submodule.sh: remove duplicate call to set_rev_name

11 years agoMerge branch 'dk/version-gen-gitdir'
Junio C Hamano [Mon, 24 Jun 2013 20:48:48 +0000 (13:48 -0700)]
Merge branch 'dk/version-gen-gitdir'

Allow packaging a tarball in a working tree with $GIT_DIR set elsewhere.

* dk/version-gen-gitdir:
  GIT-VERSION-GEN: support non-standard $GIT_DIR path

11 years agoMerge branch 'dk/maint-t5150-dirname'
Junio C Hamano [Mon, 24 Jun 2013 20:48:46 +0000 (13:48 -0700)]
Merge branch 'dk/maint-t5150-dirname'

Fix a test script.

* dk/maint-t5150-dirname:
  tests: allow sha1's as part of the path

11 years agoMerge branch 'rs/unpack-trees-tree-walk-conflict-field'
Junio C Hamano [Mon, 24 Jun 2013 20:48:44 +0000 (13:48 -0700)]
Merge branch 'rs/unpack-trees-tree-walk-conflict-field'

Code clean-up.

* rs/unpack-trees-tree-walk-conflict-field:
  unpack-trees: don't shift conflicts left and right

11 years agoMerge branch 'rr/rebase-sha1-by-string-query'
Junio C Hamano [Mon, 24 Jun 2013 20:48:40 +0000 (13:48 -0700)]
Merge branch 'rr/rebase-sha1-by-string-query'

Allow various commit objects to be given to "git rebase" by ':/look
for this string' syntax, e.g. "git rebase --onto ':/there'".

* rr/rebase-sha1-by-string-query:
  rebase: use peel_committish() where appropriate
  sh-setup: add new peel_committish() helper
  t/rebase: add failing tests for a peculiar revision

11 years agoMerge branch 'mm/rm-coalesce-errors'
Junio C Hamano [Mon, 24 Jun 2013 20:48:35 +0000 (13:48 -0700)]
Merge branch 'mm/rm-coalesce-errors'

Give a single message followed by list of paths from "git rm" to
report multiple paths that cannot be removed.

* mm/rm-coalesce-errors:
  rm: introduce advice.rmHints to shorten messages
  rm: better error message on failure for multiple files

11 years agoMerge branch 'jh/libify-note-handling'
Junio C Hamano [Mon, 24 Jun 2013 20:48:30 +0000 (13:48 -0700)]
Merge branch 'jh/libify-note-handling'

Make it possible to call into copy-notes API from the sequencer code.

* jh/libify-note-handling:
  Move create_notes_commit() from notes-merge.c into notes-utils.c
  Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c
  finish_copy_notes_for_rewrite(): Let caller provide commit message

11 years agoMerge branch 'fc/sequencer-plug-leak'
Junio C Hamano [Mon, 24 Jun 2013 20:48:28 +0000 (13:48 -0700)]
Merge branch 'fc/sequencer-plug-leak'

Plug a small leak in an error codepath.

* fc/sequencer-plug-leak:
  sequencer: avoid leaking message buffer when refusing to create an empty commit
  sequencer: remove useless indentation

11 years agoRevert "Merge branch 'jg/status-config'"
Junio C Hamano [Mon, 24 Jun 2013 15:18:07 +0000 (08:18 -0700)]
Revert "Merge branch 'jg/status-config'"

This reverts commit 1a22bd31f0a5130ce6c934951a5526ceb774c2be, reversing
changes made to 3e7a5b489e45ae8a3a0b222893d58b172d883136.

It makes it impossible to "git commit" when status.short is set, and
also "git status --porcelain" output is affected by status.branch.

11 years agoUpdate draft release notes to 1.8.4
Junio C Hamano [Sun, 23 Jun 2013 21:55:45 +0000 (14:55 -0700)]
Update draft release notes to 1.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'mz/rebase-tests'
Junio C Hamano [Sun, 23 Jun 2013 21:53:26 +0000 (14:53 -0700)]
Merge branch 'mz/rebase-tests'

* mz/rebase-tests:
  rebase topology tests: fix commit names on case-insensitive file systems
  tests: move test for rebase messages from t3400 to t3406
  t3406: modernize style
  add tests for rebasing merged history
  add tests for rebasing root
  add tests for rebasing of empty commits
  add tests for rebasing with patch-equivalence present
  add simple tests of consistency across rebase types

11 years agoMerge branch 'jk/unpack-entry-fallback-to-another'
Junio C Hamano [Sun, 23 Jun 2013 21:53:20 +0000 (14:53 -0700)]
Merge branch 'jk/unpack-entry-fallback-to-another'

* jk/unpack-entry-fallback-to-another:
  unpack_entry: do not die when we fail to apply a delta
  t5303: drop "count=1" from corruption dd

11 years agoMerge branch 'jk/apache-test-for-2.4'
Junio C Hamano [Sun, 23 Jun 2013 21:53:17 +0000 (14:53 -0700)]
Merge branch 'jk/apache-test-for-2.4'

* jk/apache-test-for-2.4:
  lib-httpd/apache.conf: check version only after mod_version loads
  t/lib-httpd/apache.conf: configure an MPM module for apache 2.4
  t/lib-httpd/apache.conf: load compat access module in apache 2.4
  t/lib-httpd/apache.conf: load extra auth modules in apache 2.4
  t/lib-httpd/apache.conf: do not use LockFile in apache >= 2.4

11 years agoMerge branch 'cm/remote-mediawiki-perlcritique'
Junio C Hamano [Sun, 23 Jun 2013 21:53:13 +0000 (14:53 -0700)]
Merge branch 'cm/remote-mediawiki-perlcritique'

* cm/remote-mediawiki-perlcritique: (31 commits)
  git-remote-mediawiki: make error message more precise
  git-remote-mediawiki: add a perlcritic rule in Makefile
  git-remote-mediawiki: add a .perlcriticrc file
  git-remote-mediawiki: clearly rewrite double dereference
  git-remote-mediawiki: fix a typo ("mediwiki" instead of "mediawiki")
  git-remote-mediawiki: put non-trivial numeric values in constants.
  git-remote-mediawiki: don't use quotes for empty strings
  git-remote-mediawiki: replace "unless" statements with negated "if" statements
  git-remote-mediawiki: brace file handles for print for more clarity
  git-remote-mediawiki: modify strings for a better coding-style
  git-remote-mediawiki: put long code into a subroutine
  git-remote-mediawiki: remove import of unused open2
  git-remote-mediawiki: check return value of open
  git-remote-mediawiki: assign a variable as undef and make proper indentation
  git-remote-mediawiki: rename a variable ($last) which has the name of a keyword
  git-remote-mediawiki: remove unused variable $entry
  git-remote-mediawiki: turn double-negated expressions into simple expressions
  git-remote-mediawiki: change the name of a variable
  git-remote-mediawiki: add newline in the end of die() error messages
  git-remote-mediawiki: change style in a regexp
  ...

11 years agoMerge branch 'bp/remote-mw-tests'
Junio C Hamano [Sun, 23 Jun 2013 21:53:11 +0000 (14:53 -0700)]
Merge branch 'bp/remote-mw-tests'

* bp/remote-mw-tests:
  git-remote-mediawiki: remove hardcoded version number in the test suite

11 years agoMerge branch 'rr/rebase-autostash'
Junio C Hamano [Sun, 23 Jun 2013 21:53:07 +0000 (14:53 -0700)]
Merge branch 'rr/rebase-autostash'

* rr/rebase-autostash:
  rebase: finish_rebase() in noop rebase
  rebase: finish_rebase() in fast-forward rebase
  rebase: guard against missing files in read_basic_state()

11 years agoMerge branch 'rr/prompt-rebase-breakage-fix'
Junio C Hamano [Sun, 23 Jun 2013 21:53:05 +0000 (14:53 -0700)]
Merge branch 'rr/prompt-rebase-breakage-fix'

* rr/prompt-rebase-breakage-fix:
  prompt: squelch error output from cat

11 years agoMerge branch 'jg/status-config'
Junio C Hamano [Sun, 23 Jun 2013 21:51:58 +0000 (14:51 -0700)]
Merge branch 'jg/status-config'

"git status" learned status.branch and status.short configuration
variables to use --branch and --short options by default (override
with --no-branch and --no-short options from the command line).

* jg/status-config:
  status: introduce status.branch to enable --branch by default
  status: introduce status.short to enable --short by default

11 years agolib-httpd/apache.conf: check version only after mod_version loads
Jeff King [Fri, 21 Jun 2013 18:12:51 +0000 (14:12 -0400)]
lib-httpd/apache.conf: check version only after mod_version loads

Commit 0442743 introduced an <IfVersion> directive near the
top of the apache config file. However, at that point we
have not yet checked for and loaded the mod_version module.
This means that the directive will behave oddly if
mod_version is dynamically loaded, failing to match when it
should.

We can fix this by moving the whole block below the
LoadModule directive for mod_version.

Reported-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSync with maint
Junio C Hamano [Fri, 21 Jun 2013 18:26:41 +0000 (11:26 -0700)]
Sync with maint

* maint:
  completion: complete diff --word-diff

11 years agotransport-helper: be quiet on read errors from helpers
Jeff King [Fri, 21 Jun 2013 07:05:39 +0000 (03:05 -0400)]
transport-helper: be quiet on read errors from helpers

Prior to commit 81d340d4, we did not print any error message
if a remote transport helper died unexpectedly. If a helper
did not print any error message (e.g., because it crashed),
the user could be left confused. That commit tried to
rectify the situation by printing a note that the helper
exited unexpectedly.

However, this makes a much more common case worse: when a
helper does die with a useful message, we print the extra
"Reading from 'git-remote-foo failed" message. This can also
end up confusing users, as they may not even know what
remote helpers are (e.g., the fact that http support comes
through git-remote-https is purely an implementation detail
that most users do not know or care about).

Since we do not have a good way of knowing whether the
helper printed a useful error, and since the common failure
mode is for it to do so, let's default to remaining quiet.
Debuggers can dig further by setting GIT_TRANSPORT_HELPER_DEBUG.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocompletion: complete diff --word-diff
Ramkumar Ramachandra [Tue, 18 Jun 2013 19:24:05 +0000 (00:54 +0530)]
completion: complete diff --word-diff

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.8.4
Junio C Hamano [Thu, 20 Jun 2013 23:13:41 +0000 (16:13 -0700)]
Update draft release notes to 1.8.4

11 years agoMerge branch 'cm/remote-mediawiki'
Junio C Hamano [Thu, 20 Jun 2013 23:02:42 +0000 (16:02 -0700)]
Merge branch 'cm/remote-mediawiki'

* cm/remote-mediawiki:
  git-remote-mediawiki: display message when launched directly

11 years agoMerge branch 'rs/match-trees-refactor'
Junio C Hamano [Thu, 20 Jun 2013 23:02:40 +0000 (16:02 -0700)]
Merge branch 'rs/match-trees-refactor'

Code cleanup.

* rs/match-trees-refactor:
  match-trees: factor out fill_tree_desc_strict

11 years agoMerge branch 'rs/logical-vs-binary-or'
Junio C Hamano [Thu, 20 Jun 2013 23:02:38 +0000 (16:02 -0700)]
Merge branch 'rs/logical-vs-binary-or'

Code cleanup.

* rs/logical-vs-binary-or:
  use logical OR (||) instead of binary OR (|) in logical context

11 years agoMerge branch 'mm/color-auto-default'
Junio C Hamano [Thu, 20 Jun 2013 23:02:33 +0000 (16:02 -0700)]
Merge branch 'mm/color-auto-default'

Flip the default for color.ui to 'auto', which is what many
tutorials recommend new users to do.

* mm/color-auto-default:
  make color.ui default to 'auto'
  config: refactor management of color.ui's default value

11 years agoMerge branch 'rs/discard-index-discard-array'
Junio C Hamano [Thu, 20 Jun 2013 23:02:30 +0000 (16:02 -0700)]
Merge branch 'rs/discard-index-discard-array'

* rs/discard-index-discard-array:
  read-cache: free cache in discard_index
  read-cache: add simple performance test

11 years agoMerge branch 'nd/traces'
Junio C Hamano [Thu, 20 Jun 2013 23:02:28 +0000 (16:02 -0700)]
Merge branch 'nd/traces'

* nd/traces:
  git.txt: document GIT_TRACE_PACKET
  core: use env variable instead of config var to turn on logging pack access

11 years agoMerge branch 'fc/show-non-empty-errors-in-test'
Junio C Hamano [Thu, 20 Jun 2013 23:02:24 +0000 (16:02 -0700)]
Merge branch 'fc/show-non-empty-errors-in-test'

* fc/show-non-empty-errors-in-test:
  test: test_must_be_empty helper

11 years agoMerge branch 'fc/makefile'
Junio C Hamano [Thu, 20 Jun 2013 23:02:21 +0000 (16:02 -0700)]
Merge branch 'fc/makefile'

Makefile simplification.

* fc/makefile:
  Makefile: use $^ to avoid listing prerequisites on the command line
  build: do not install git-remote-testgit
  build: generate and clean test scripts

11 years agoMerge branch 'js/test-ln-s-add'
Junio C Hamano [Thu, 20 Jun 2013 23:02:18 +0000 (16:02 -0700)]
Merge branch 'js/test-ln-s-add'

Many tests that check the behaviour of symbolic links stored in the
index or the tree objects do not have to be skipped on a filesystem
that lack symbolic link support.

* js/test-ln-s-add:
  t4011: remove SYMLINKS prerequisite
  t6035: use test_ln_s_add to remove SYMLINKS prerequisite
  t3509, t4023, t4114: use test_ln_s_add to remove SYMLINKS prerequisite
  t3100: use test_ln_s_add to remove SYMLINKS prerequisite
  t3030: use test_ln_s_add to remove SYMLINKS prerequisite
  t0000: use test_ln_s_add to remove SYMLINKS prerequisite
  tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases)
  tests: introduce test_ln_s_add
  t3010: modernize style
  test-chmtime: Fix exit code on Windows

11 years agoMerge branch 'nd/make-wildmatch-default'
Junio C Hamano [Thu, 20 Jun 2013 23:02:14 +0000 (16:02 -0700)]
Merge branch 'nd/make-wildmatch-default'

* nd/make-wildmatch-default:
  Makefile: promote wildmatch to be the default fnmatch implementation

11 years agot7400: test of UTF-8 submodule names pass under Mac OS
Torsten Bögershausen [Thu, 20 Jun 2013 14:58:48 +0000 (16:58 +0200)]
t7400: test of UTF-8 submodule names pass under Mac OS

submodules with names using UTF-8 need core.precomposeunicode true
under Mac OS X, set it in the test case.

Improve the portability:

  - Not all shells on all OS may understand literal UTF-8 strings.
  - Use a help variable filled by printf, as we do it in e.g. t0050.

"strange names" can be called UTF-8, rephrase the heading.

While at it, unbreak &&-chain in the test, and use test_config.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation: Move "git diff <blob> <blob>"
Kevin Bracey [Tue, 18 Jun 2013 14:58:50 +0000 (17:58 +0300)]
Documentation: Move "git diff <blob> <blob>"

The section describing "git diff <blob> <blob>" had been placed in a
position that disrupted the statement "This is synonymous to the
previous form".

Reorder to place this form after all the <commit>-using forms, and the
note applying to them. Also mention this form in the initial description
paragraph.

Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation/git-merge.txt: weaken warning about uncommited changes
Matthieu Moy [Tue, 18 Jun 2013 08:42:55 +0000 (10:42 +0200)]
Documentation/git-merge.txt: weaken warning about uncommited changes

Commit 35d2fffd introduced 'git merge --abort' as a synonym to 'git reset
--merge', and added some failing tests in t7611-merge-abort.sh (search
'###' in this file) showing that 'git merge --abort' could not always
recover the pre-merge state.

Still, in many cases, 'git merge --abort' just works, and it is usually
considered that the ability to start a merge with uncommited changes is
an important property of Git.

Weaken the warning by discouraging only merge with /non-trivial/
uncommited changes.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agorebase topology tests: fix commit names on case-insensitive file systems
Johannes Sixt [Tue, 18 Jun 2013 07:28:07 +0000 (09:28 +0200)]
rebase topology tests: fix commit names on case-insensitive file systems

The recently introduced tests used uppercase letters to denote
cherry-picks of commits having the corresponding lowercase letter names.
The helper functions also set up tags with the names of the commits.

But this constellation fails on case-insensitive file systems because
there cannot be distinct tags with names that differ only in case.

Use a less subtle convention for the names of cherry-picked commits.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation/git-push.txt: explain better cases where --force is dangerous
Matthieu Moy [Mon, 17 Jun 2013 17:52:41 +0000 (19:52 +0200)]
Documentation/git-push.txt: explain better cases where --force is dangerous

The behavior of "git push --force" is rather clear when it updates only
one remote ref, but running it when pushing several branches can really
be dangerous. Warn the users a bit more and give them the alternative to
push only one branch.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoconfig: Add description of --local option
Namhyung Kim [Mon, 17 Jun 2013 13:31:31 +0000 (22:31 +0900)]
config: Add description of --local option

It was missed in the option list while mentioned from the general
description.  Add it for completeness.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-submodule.sh: remove duplicate call to set_rev_name
Fredrik Gustafsson [Mon, 17 Jun 2013 09:55:36 +0000 (11:55 +0200)]
git-submodule.sh: remove duplicate call to set_rev_name

set_rev_name is a possiblly expensive operation. If a submodule has
changes in it, set_rev_name was called twice.

Move call to set_rev_name so it's only called once, no matter which
codepath is taken.

Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowt-status: give better advice when cherry-pick is in progress
Ralf Thielow [Mon, 17 Jun 2013 04:28:26 +0000 (06:28 +0200)]
wt-status: give better advice when cherry-pick is in progress

When cherry-pick is in progress, 'git status' gives the advice to
run "git commit" to finish the cherry-pick.

However, this won't continue the sequencer, when picking a range of
commits.

Advise users to run "git cherry-pick --continue/--abort"; they work
when picking a single commit as well.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomergetool--lib: refactor {diff,merge}_cmd logic
John Keeping [Sun, 16 Jun 2013 17:51:22 +0000 (18:51 +0100)]
mergetool--lib: refactor {diff,merge}_cmd logic

Instead of needing a wrapper to call the diff/merge command, simply
provide the diff_cmd and merge_cmd functions for user-specified tools in
the same way as we do for built-in tools.

Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation/Makefile: move infodir to be with other '*dir's
John Keeping [Sun, 16 Jun 2013 17:13:01 +0000 (18:13 +0100)]
Documentation/Makefile: move infodir to be with other '*dir's

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocumentation/Makefile: fix spaces around assignments
John Keeping [Sun, 16 Jun 2013 17:13:00 +0000 (18:13 +0100)]
Documentation/Makefile: fix spaces around assignments

A simple style fix; no functional change.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoGIT-VERSION-GEN: support non-standard $GIT_DIR path
Dennis Kaarsemaker [Sat, 15 Jun 2013 23:01:11 +0000 (01:01 +0200)]
GIT-VERSION-GEN: support non-standard $GIT_DIR path

make and make test both work when $GIT_DIR isn't .git, but make dist
included a bogus GIT-VERSION-FILE.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agotests: allow sha1's as part of the path
Dennis Kaarsemaker [Sat, 15 Jun 2013 21:35:02 +0000 (23:35 +0200)]
tests: allow sha1's as part of the path

When running 'make test' from a path such as
.../daily-build/master@bdff0e3a374617dce784f801b97500d9ba2e4705, the
logic in fuzz.sed as generated by t5105-request-pull.sh was backwards,
replacing object names before replacing urls, making the test fail.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agounpack-trees: don't shift conflicts left and right
René Scharfe [Sat, 15 Jun 2013 23:44:43 +0000 (01:44 +0200)]
unpack-trees: don't shift conflicts left and right

If o->merge is set, the struct traverse_info member conflicts is shifted
left in unpack_callback, then passed through traverse_trees_recursive
to unpack_nondirectories, where it is shifted right before use.  Stop
the shifting and just pass the conflict bit mask as is.  Rename the
member to df_conflicts to prove that it isn't used anywhere else.

Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot/am: use test_path_is_missing() where appropriate
Ramkumar Ramachandra [Sat, 15 Jun 2013 12:43:12 +0000 (18:13 +0530)]
t/am: use test_path_is_missing() where appropriate

Replace instances of ! test -d with test_path_is_missing.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoam: handle stray $dotest directory
Ramkumar Ramachandra [Sat, 15 Jun 2013 12:43:11 +0000 (18:13 +0530)]
am: handle stray $dotest directory

The following bug has been observed:

  $ git am  # no input file
  ^C
  $ git am --abort
  Resolve operation not in progress, we are not resuming.

This happens because the following test fails:

  test -d "$dotest" && test -f "$dotest/last" && test -f "$dotest/next"

and the codepath for an "am in-progress" is not executed.  It falls back
to the codepath that treats this as a "fresh execution".  Before
rr/rebase-autostash, this condition was

  test -d "$dotest"

It would incorrectly execute the "normal" am --abort codepath:

  git read-tree --reset -u HEAD ORIG_HEAD
  git reset ORIG_HEAD

by incorrectly assuming that an am is "in progress" (i.e. ORIG_HEAD
etc. was written during the previous execution).

Notice that

  $ git am
  ^C

executes nothing of significance, is equivalent to

  $ mkdir .git/rebase-apply

Therefore, the correct solution is to treat .git/rebase-apply as a
"stray directory" and remove it on --abort in the fresh-execution
codepath.  Also ensure that we're not called with --rebasing from
git-rebase--am.sh; in that case, it is the responsibility of the caller
to handle and stray directories.

While at it, tell the user to run "git am --abort" to get rid of the
stray $dotest directory, if she attempts anything else.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge tag 'gitgui-0.18.0' of git://repo.or.cz/git-gui
Junio C Hamano [Mon, 17 Jun 2013 03:06:55 +0000 (20:06 -0700)]
Merge tag 'gitgui-0.18.0' of git://repo.or.cz/git-gui

git-gui 0.18.0

* tag 'gitgui-0.18.0' of git://repo.or.cz/git-gui:
  git-gui 0.18
  git-gui: avoid an error message when removing the last remote
  git-gui: fix file name handling with non-empty prefix
  git-gui: bring wish process to front on Mac
  git-gui: change dialog button positions for Windows to suit platform.
  git-gui: allow "\ No newline at end of file" for linewise staging
  git-gui: fix the mergetool launcher for the Beyond Compare tool.
  Makefile: replace "echo 1>..." with "echo >..."
  French translation: copy -> copie.
  git-gui: Fix parsing of <rev> <path-which-not-present-in-worktree>

11 years agostatus: introduce status.branch to enable --branch by default
Jorge Juan Garcia Garcia [Tue, 11 Jun 2013 13:34:05 +0000 (15:34 +0200)]
status: introduce status.branch to enable --branch by default

Some people often run 'git status -b'.
The config variable status.branch allows to set it by default.

Signed-off-by: Jorge Juan Garcia Garcia <Jorge-Juan.Garcia-Garcia@ensimag.imag.fr>
Signed-off-by: Mathieu Lienard--Mayor <Mathieu.Lienard--Mayor@ensimag.imag.fr>
Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoUpdate draft release notes to 1.8.4
Junio C Hamano [Sun, 16 Jun 2013 05:12:52 +0000 (22:12 -0700)]
Update draft release notes to 1.8.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-gui 0.18
Pat Thoyts [Sat, 15 Jun 2013 22:53:34 +0000 (23:53 +0100)]
git-gui 0.18

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
11 years agogit-gui: avoid an error message when removing the last remote
Pat Thoyts [Sat, 15 Jun 2013 22:36:27 +0000 (23:36 +0100)]
git-gui: avoid an error message when removing the last remote

When the last remote is removed on a system that has tearoff menu items
the code that adjusts the fetch and prune menus may raise an error when
probing the menu entry for a non-existing -label option.
Check the entry type to avoid this fault.

Reported-by: Vedran Miletić <rivanvx@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
11 years agounpack_entry: do not die when we fail to apply a delta
Jeff King [Fri, 14 Jun 2013 21:53:34 +0000 (17:53 -0400)]
unpack_entry: do not die when we fail to apply a delta

When we try to load an object from disk and fail, our
general strategy is to see if we can get it from somewhere
else (e.g., a loose object). That lets users fix corruption
problems by copying known-good versions of objects into the
object database.

We already handle the case where we were not able to read
the delta from disk. However, when we find that the delta we
read does not apply, we simply die.  This case is harder to
trigger, as corruption in the delta data itself would
trigger a crc error from zlib.  However, a corruption that
pointed us at the wrong delta base might cause it.

We can do the same "fail and try to find the object
elsewhere" trick instead of dying. This not only gives us a
chance to recover, but also puts us on code paths that will
alert the user to the problem (with the current message,
they do not even know which sha1 caused the problem).

Note that unlike some other pack corruptions, we do not
recover automatically from this case when doing a repack.
There is nothing apparently wrong with the delta, as it
points to a valid, accessible object, and we realize the
error only when the resulting size does not match up. And in
theory, one could even have a case where the corrupted size
is the same, and the problem would only be noticed by
recomputing the sha1.

We can get around this by recomputing the deltas with
--no-reuse-delta, which our test does (and this is probably
good advice for anyone recovering from pack corruption).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot5303: drop "count=1" from corruption dd
Jeff King [Fri, 14 Jun 2013 21:51:01 +0000 (17:51 -0400)]
t5303: drop "count=1" from corruption dd

This test corrupts pack objects by using "dd" with a seek
command. It passes "count=1 bs=1" to munge just a single
byte. However, the test added in commit b3118bdc wants to
munge two bytes, and the second byte of corruption is
silently ignored.

This turned out not to impact the test, however. The idea
was to reduce the "size of this entry" part of the header so
that zlib runs out of input bytes while inflating the entry.
That header is two bytes long, and the test reduced the
value of both bytes; since we experience the problem if we
are off by even 1 byte, it is sufficient to munge only the
first one.

Even though the test would have worked with only a single
byte munged, and we could simply tweak the test to use a
single byte, it makes sense to lift this 1-byte restriction
from do_corrupt_object. It will allow future tests that do
need to change multiple bytes to do so.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: remove hardcoded version number in the test suite
Benoit Person [Fri, 14 Jun 2013 10:19:11 +0000 (12:19 +0200)]
git-remote-mediawiki: remove hardcoded version number in the test suite

Updates the code to make it more easy to switch mediawiki version when
testing. Before that, the version number was partly hardcoded, partly
in a var.

Signed-off-by: Benoit Person <benoit.person@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot/lib-httpd/apache.conf: configure an MPM module for apache 2.4
Jeff King [Sun, 9 Jun 2013 08:09:32 +0000 (04:09 -0400)]
t/lib-httpd/apache.conf: configure an MPM module for apache 2.4

Versions of Apache before 2.4 always had a "MultiProcessing
Module" (MPM) statically built in, which manages the worker
threads/processes. We do not care which one, as it is
largely a performance issue, and we put only a light load on
the server during our testing.

As of Apache 2.4, the MPM module is loadable just like any
other module, but exactly one such module must be loaded. On
a system where the MPMs are compiled dynamically (e.g.,
Debian unstable), this means that our test Apache server
will not start unless we provide the appropriate
configuration.

Unfortunately, we do not actually know which MPM modules are
available or appropriate for the system on which the tests
are running. This patch picks the "prefork" module, as it
is likely to be available on all Unix-like systems.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot/lib-httpd/apache.conf: load compat access module in apache 2.4
Jeff King [Sun, 9 Jun 2013 08:08:45 +0000 (04:08 -0400)]
t/lib-httpd/apache.conf: load compat access module in apache 2.4

In apache 2.4, the "Order" directive has gone away in favor
of a new system in mod_authz_host. However, since we want
our config file to remain compatible across multiple Apache
versions, we can use mod_access_compat to keep using the
older style.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot/lib-httpd/apache.conf: load extra auth modules in apache 2.4
Jeff King [Sun, 9 Jun 2013 08:08:22 +0000 (04:08 -0400)]
t/lib-httpd/apache.conf: load extra auth modules in apache 2.4

In apache 2.4, the "Auth*" and "Require" directives have
moved into the authn_core and authz_core modules,
respectively.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot/lib-httpd/apache.conf: do not use LockFile in apache >= 2.4
Jeff King [Sun, 9 Jun 2013 08:07:59 +0000 (04:07 -0400)]
t/lib-httpd/apache.conf: do not use LockFile in apache >= 2.4

The LockFile directive from earlier versions of apache has
been replaced by the Mutex directive. The latter seems to
give sane defaults and does not need any specific
customization, so we can get away with just adding a version
check to the use of LockFile.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agorebase: use peel_committish() where appropriate
Ramkumar Ramachandra [Fri, 14 Jun 2013 13:17:52 +0000 (18:47 +0530)]
rebase: use peel_committish() where appropriate

The revisions specified on the command-line as <onto> and <upstream>
arguments could be of the form :/quuxery; so, use peel_committish() to
resolve them.  The failing tests in t/rebase and t/rebase-interactive
now pass.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agosh-setup: add new peel_committish() helper
Ramkumar Ramachandra [Fri, 14 Jun 2013 13:17:51 +0000 (18:47 +0530)]
sh-setup: add new peel_committish() helper

The normal way to check whether a certain revision resolves to a valid
commit is:

  $ git rev-parse --verify $REV^0

Unfortunately, this does not work when $REV is of the type :/quuxery.
Write a helper to work around this limitation.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot/rebase: add failing tests for a peculiar revision
Ramkumar Ramachandra [Fri, 14 Jun 2013 13:17:50 +0000 (18:47 +0530)]
t/rebase: add failing tests for a peculiar revision

The following commands fail, even if :/quuxery and :/foomery resolve to
perfectly valid commits:

  $ git rebase [-i] --onto :/quuxery :/foomery

This is because rebase [-i] attempts to rev-parse ${REV}^0 to verify
that the given revision resolves to a commit.  Add tests to document
these failures.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: make error message more precise
Célestin Matte [Fri, 14 Jun 2013 13:50:39 +0000 (15:50 +0200)]
git-remote-mediawiki: make error message more precise

In subroutine parse_command, error messages were not correct. For the "import"
function, having too much or incorrect arguments displayed both
"invalid arguments", while it displayed "too many arguments" for the "option"
functions under the same conditions.
Separate the two error messages in both cases.

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: add a perlcritic rule in Makefile
Célestin Matte [Fri, 14 Jun 2013 13:50:38 +0000 (15:50 +0200)]
git-remote-mediawiki: add a perlcritic rule in Makefile

Option "-2" launches perlcritic with level 2. Levels go from 5 (most pertinent)
to 1. Rules of level 1 are mostly a question of style, and are therefore
ignored.

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: add a .perlcriticrc file
Célestin Matte [Fri, 14 Jun 2013 13:50:37 +0000 (15:50 +0200)]
git-remote-mediawiki: add a .perlcriticrc file

Such a file allows to configure perlcritic.
Here, it is used to remove many unwanted rules and configure one to
remove unwanted warnings.

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: clearly rewrite double dereference
Célestin Matte [Fri, 14 Jun 2013 13:50:36 +0000 (15:50 +0200)]
git-remote-mediawiki: clearly rewrite double dereference

@$var structures are re-written in the following way: @{$var}
It makes them more readable.

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: fix a typo ("mediwiki" instead of "mediawiki")
Célestin Matte [Fri, 14 Jun 2013 13:50:35 +0000 (15:50 +0200)]
git-remote-mediawiki: fix a typo ("mediwiki" instead of "mediawiki")

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: put non-trivial numeric values in constants.
Célestin Matte [Fri, 14 Jun 2013 13:50:34 +0000 (15:50 +0200)]
git-remote-mediawiki: put non-trivial numeric values in constants.

Non-trivial numeric values (e.g., different from 0, 1 and 2) are placed in
constants at the top of the code to be easily modifiable and to make more sense

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: don't use quotes for empty strings
Célestin Matte [Fri, 14 Jun 2013 13:50:33 +0000 (15:50 +0200)]
git-remote-mediawiki: don't use quotes for empty strings

Empty strings are replaced by an $EMPTY constant.

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: replace "unless" statements with negated "if" statements
Célestin Matte [Fri, 14 Jun 2013 13:50:32 +0000 (15:50 +0200)]
git-remote-mediawiki: replace "unless" statements with negated "if" statements

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: brace file handles for print for more clarity
Célestin Matte [Fri, 14 Jun 2013 13:50:31 +0000 (15:50 +0200)]
git-remote-mediawiki: brace file handles for print for more clarity

This follows the following rule:
InputOutput::RequireBracedFileHandleWithPrint (Severity: 1)
    The `print' and `printf' functions have a unique syntax that supports an
    optional file handle argument. Conway suggests wrapping this argument in
    braces to make it visually stand out from the other arguments. When you
    put braces around any of the special package-level file handles like
    `STDOUT', `STDERR', and `DATA', you must the `'*'' sigil or else it
    won't compile under `use strict 'subs''.

      print $FH   "Mary had a little lamb\n";  #not ok
      print {$FH} "Mary had a little lamb\n";  #ok

      print   STDERR   $foo, $bar, $baz;  #not ok
      print  {STDERR}  $foo, $bar, $baz;  #won't compile under 'strict'
      print {*STDERR}  $foo, $bar, $baz;  #perfect!

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: modify strings for a better coding-style
Célestin Matte [Fri, 14 Jun 2013 13:50:30 +0000 (15:50 +0200)]
git-remote-mediawiki: modify strings for a better coding-style

- strings which don't need interpolation are single-quoted for more clarity and
slight gain of performance
- interpolation is preferred over concatenation in many cases, for more clarity
- variables are always used with the ${} operator inside strings
- strings including double-quotes are written with qq() so that the quotes do
not have to be escaped

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: put long code into a subroutine
Célestin Matte [Fri, 14 Jun 2013 13:50:29 +0000 (15:50 +0200)]
git-remote-mediawiki: put long code into a subroutine

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: remove import of unused open2
Célestin Matte [Fri, 14 Jun 2013 13:50:28 +0000 (15:50 +0200)]
git-remote-mediawiki: remove import of unused open2

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: check return value of open
Célestin Matte [Fri, 14 Jun 2013 13:50:27 +0000 (15:50 +0200)]
git-remote-mediawiki: check return value of open

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: assign a variable as undef and make proper indentation
Célestin Matte [Fri, 14 Jun 2013 13:50:26 +0000 (15:50 +0200)]
git-remote-mediawiki: assign a variable as undef and make proper indentation

Explicitly assign local variable $/ as undef and make a proper
one-instruction-by-line indentation

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: rename a variable ($last) which has the name of a keyword
Célestin Matte [Fri, 14 Jun 2013 13:50:25 +0000 (15:50 +0200)]
git-remote-mediawiki: rename a variable ($last) which has the name of a keyword

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: remove unused variable $entry
Célestin Matte [Fri, 14 Jun 2013 13:50:24 +0000 (15:50 +0200)]
git-remote-mediawiki: remove unused variable $entry

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: turn double-negated expressions into simple expressions
Célestin Matte [Fri, 14 Jun 2013 13:50:23 +0000 (15:50 +0200)]
git-remote-mediawiki: turn double-negated expressions into simple expressions

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: change the name of a variable
Célestin Matte [Fri, 14 Jun 2013 13:50:22 +0000 (15:50 +0200)]
git-remote-mediawiki: change the name of a variable

Local variable $url has the same name as a global variable. Changing the name
of the local variable prevents future possible misunderstanding.

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: add newline in the end of die() error messages
Célestin Matte [Fri, 14 Jun 2013 13:50:21 +0000 (15:50 +0200)]
git-remote-mediawiki: add newline in the end of die() error messages

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: change style in a regexp
Célestin Matte [Fri, 14 Jun 2013 13:50:20 +0000 (15:50 +0200)]
git-remote-mediawiki: change style in a regexp

Change '[\n]' to '\n': brackets are useless here.

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: change style in a regexp
Célestin Matte [Fri, 14 Jun 2013 13:50:19 +0000 (15:50 +0200)]
git-remote-mediawiki: change style in a regexp

In this regexp, ' |\n' is used, whereas its equivalent '[ \n]', which is
clearer, is used elsewhere. Make the style coherent.

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: change separator of some regexps
Célestin Matte [Fri, 14 Jun 2013 13:50:18 +0000 (15:50 +0200)]
git-remote-mediawiki: change separator of some regexps

Use {}{} instead of /// when slashes are used inside the regexp so as not to
escape it.

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: change the behaviour of a split
Célestin Matte [Fri, 14 Jun 2013 13:50:17 +0000 (15:50 +0200)]
git-remote-mediawiki: change the behaviour of a split

A "split ' '" is turned into a "split / /", which changes its behaviour: the
old method matched a run of whitespaces (/\s*/), while the new one will match a
single space, which is what we want here. Indeed, in other contexts,
changing split(' ') to split(/ /) could potentially be a regression, however,
here, when parsing the output of "rev-list --parents", whose output SHA-1's are
each separated by a single space, splitting on a single space is perfectly
correct.

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: remove useless regexp modifier (m)
Célestin Matte [Fri, 14 Jun 2013 13:50:16 +0000 (15:50 +0200)]
git-remote-mediawiki: remove useless regexp modifier (m)

m// and // is used randomly. It is better to use the m modifier only when
needed, e.g., when the regexp uses another separator than //.

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: rewrite unclear line of instructions
Célestin Matte [Fri, 14 Jun 2013 13:50:15 +0000 (15:50 +0200)]
git-remote-mediawiki: rewrite unclear line of instructions

Subroutines' parameters should be assigned to variable before doing anything
else
Besides, existing instruction affected a variable inside a "if", which break
Git's coding style

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-remote-mediawiki: change syntax of map calls
Célestin Matte [Fri, 14 Jun 2013 13:50:14 +0000 (15:50 +0200)]
git-remote-mediawiki: change syntax of map calls

Put first parameter of map inside a block, for better readability.
Follow BuiltinFunctions::RequireBlockMap

Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>