Code

git.git
13 years agoMerge branch 'tr/diff-words-test' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:21 +0000 (19:03 -0800)]
Merge branch 'tr/diff-words-test' into pu

* tr/diff-words-test:
  t4034 (diff --word-diff): add a minimum Perl drier test vector
  t4034 (diff --word-diff): style suggestions
  userdiff: simplify word-diff safeguard
  t4034: bulk verify builtin word regex sanity

13 years agoMerge branch 'rr/fi-import-marks-if-exists' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:21 +0000 (19:03 -0800)]
Merge branch 'rr/fi-import-marks-if-exists' into pu

* rr/fi-import-marks-if-exists:
  fast-import: Introduce --import-marks-if-exists

13 years agoMerge branch 'ab/p4' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:21 +0000 (19:03 -0800)]
Merge branch 'ab/p4' into pu

* ab/p4:
  git-p4: correct indenting and formatting

13 years agoMerge branch 'jc/rerere-remaining' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:21 +0000 (19:03 -0800)]
Merge branch 'jc/rerere-remaining' into pu

* jc/rerere-remaining:
  rerere "remaining"

13 years agoMerge branch 'jc/rename-degrade-cc-to-c' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:21 +0000 (19:03 -0800)]
Merge branch 'jc/rename-degrade-cc-to-c' into pu

* jc/rename-degrade-cc-to-c:
  diffcore-rename: fall back to -C when -C -C busts the rename limit
  diffcore-rename: record filepair for rename src
  diffcore-rename: refactor "too many candidates" logic

13 years agoMerge branch 'mz/rebase' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:21 +0000 (19:03 -0800)]
Merge branch 'mz/rebase' into pu

* mz/rebase: (31 commits)
  rebase -i: remove unnecessary state rebase-root
  rebase -i: don't read unused variable preserve_merges
  git-rebase--am: remove unnecessary --3way option
  rebase -m: don't print exit code 2 when merge fails
  rebase -m: remember allow_rerere_autoupdate option
  rebase: remember strategy and strategy options
  rebase: remember verbose option
  rebase: extract code for writing basic state
  rebase: factor out sub command handling
  rebase: make -v a tiny bit more verbose
  rebase -i: align variable names
  rebase: show consistent conflict resolution hint
  rebase: extract am code to new source file
  rebase: extract merge code to new source file
  rebase: remove $branch as synonym for $orig_head
  rebase -i: support --stat
  rebase: factor out call to pre-rebase hook
  rebase: factor out clean work tree check
  rebase: factor out reference parsing
  rebase: reorder validation steps
  ...

Conflicts:
git-rebase--interactive.sh

13 years agoMerge branch 'jc/unpack-trees' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:20 +0000 (19:03 -0800)]
Merge branch 'jc/unpack-trees' into pu

* jc/unpack-trees:
  unpack_trees(): skip trees that are the same in all input
  unpack-trees.c: cosmetic fix

Conflicts:
unpack-trees.c

13 years agoMerge branch 'hv/mingw-fs-funnies' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:20 +0000 (19:03 -0800)]
Merge branch 'hv/mingw-fs-funnies' into pu

* hv/mingw-fs-funnies:
  mingw_rmdir: set errno=ENOTEMPTY when appropriate
  mingw: add fallback for rmdir in case directory is in use
  mingw: make failures to unlink or move raise a question
  mingw: work around irregular failures of unlink on windows
  mingw: move unlink wrapper to mingw.c

13 years agoMerge branch 'tr/maint-branch-no-track-head' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:20 +0000 (19:03 -0800)]
Merge branch 'tr/maint-branch-no-track-head' into pu

* tr/maint-branch-no-track-head:
  branch: do not attempt to track HEAD implicitly

13 years agoMerge branch 'ab/i18n' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:20 +0000 (19:03 -0800)]
Merge branch 'ab/i18n' into pu

* ab/i18n: (161 commits)
  po/de.po: complete German translation
  po/sv.po: add Swedish translation
  gettextize: git-bisect bisect_next_check "You need to" message
  gettextize: git-bisect [Y/n] messages
  gettextize: git-bisect bisect_replay + $1 messages
  gettextize: git-bisect bisect_reset + $1 messages
  gettextize: git-bisect bisect_run + $@ messages
  gettextize: git-bisect die + eval_gettext messages
  gettextize: git-bisect die + gettext messages
  gettextize: git-bisect echo + eval_gettext message
  gettextize: git-bisect echo + gettext messages
  gettextize: git-bisect gettext + echo message
  gettextize: git-bisect add git-sh-i18n
  gettextize: git-stash drop_stash say/die messages
  gettextize: git-stash "unknown option" message
  gettextize: git-stash die + eval_gettext $1 messages
  gettextize: git-stash die + eval_gettext $* messages
  gettextize: git-stash die + eval_gettext messages
  gettextize: git-stash die + gettext messages
  gettextize: git-stash say + gettext messages
  ...

Conflicts:
Documentation/CodingGuidelines
Makefile
builtin/clean.c
builtin/commit.c
builtin/describe.c
builtin/grep.c
builtin/init-db.c
builtin/merge.c
builtin/notes.c
builtin/revert.c
fast-import.c
git-bisect.sh
git-pull.sh
git-submodule.sh
t/t3501-revert-cherry-pick.sh
t/t7004-tag.sh
wt-status.c

13 years agoMerge branch 'cb/ignored-paths-are-precious' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:19 +0000 (19:03 -0800)]
Merge branch 'cb/ignored-paths-are-precious' into pu

* cb/ignored-paths-are-precious:
  checkout/merge: optionally fail operation when ignored files need to be overwritten

Conflicts:
Documentation/config.txt
builtin/checkout.c

13 years agoMerge branch 'tr/merge-unborn-clobber' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:19 +0000 (19:03 -0800)]
Merge branch 'tr/merge-unborn-clobber' into pu

* tr/merge-unborn-clobber:
  Exhibit merge bug that clobbers index&WT

Conflicts:
t/t7607-merge-overwrite.sh

13 years agoMerge branch 'nd/index-doc' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:18 +0000 (19:03 -0800)]
Merge branch 'nd/index-doc' into pu

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

13 years agoMerge branch 'jk/tag-contains' into pu
Junio C Hamano [Mon, 31 Jan 2011 03:03:18 +0000 (19:03 -0800)]
Merge branch 'jk/tag-contains' into pu

* jk/tag-contains:
  Why is "git tag --contains" so slow?
  default core.clockskew variable to one day
  limit "contains" traversals based on commit timestamp
  tag: speed up --contains calculation

13 years agoMerge branch 'jn/unpack-lstat-failure-report' into jch
Junio C Hamano [Mon, 31 Jan 2011 03:03:01 +0000 (19:03 -0800)]
Merge branch 'jn/unpack-lstat-failure-report' into jch

* jn/unpack-lstat-failure-report:
  unpack-trees: handle lstat failure for existing file
  unpack-trees: handle lstat failure for existing directory

13 years agoMerge branch 'en/object-list-with-pathspec' into jch
Junio C Hamano [Mon, 31 Jan 2011 03:03:00 +0000 (19:03 -0800)]
Merge branch 'en/object-list-with-pathspec' into jch

* en/object-list-with-pathspec:
  Add testcases showing how pathspecs are handled with rev-list --objects
  Make rev-list --objects work together with pathspecs

13 years agoMerge branch 'nd/struct-pathspec' into jch
Junio C Hamano [Mon, 31 Jan 2011 03:03:00 +0000 (19:03 -0800)]
Merge branch 'nd/struct-pathspec' into jch

* nd/struct-pathspec: (21 commits)
  t7810: overlapping pathspecs and depth limit
  grep: drop pathspec_matches() in favor of tree_entry_interesting()
  grep: use writable strbuf from caller for grep_tree()
  grep: use match_pathspec_depth() for cache/worktree grepping
  grep: convert to use struct pathspec
  Convert ce_path_match() to use match_pathspec_depth()
  Convert ce_path_match() to use struct pathspec
  struct rev_info: convert prune_data to struct pathspec
  pathspec: add match_pathspec_depth()
  tree_entry_interesting(): optimize wildcard matching when base is matched
  tree_entry_interesting(): support wildcard matching
  tree_entry_interesting(): fix depth limit with overlapping pathspecs
  tree_entry_interesting(): support depth limit
  tree_entry_interesting(): refactor into separate smaller functions
  diff-tree: convert base+baselen to writable strbuf
  glossary: define pathspec
  Move tree_entry_interesting() to tree-walk.c and export it
  tree_entry_interesting(): remove dependency on struct diff_options
  Convert struct diff_options to use struct pathspec
  diff-no-index: use diff_tree_setup_paths()
  ...

Conflicts:
tree-diff.c

13 years agoMerge branch 'uk/checkout-ambiguous-ref' into jch
Junio C Hamano [Mon, 31 Jan 2011 03:03:00 +0000 (19:03 -0800)]
Merge branch 'uk/checkout-ambiguous-ref' into jch

* uk/checkout-ambiguous-ref:
  checkout: fix bug with ambiguous refs

13 years agoMerge branch 'ef/alias-via-run-command' into jch
Junio C Hamano [Mon, 31 Jan 2011 03:03:00 +0000 (19:03 -0800)]
Merge branch 'ef/alias-via-run-command' into jch

* ef/alias-via-run-command:
  alias: use run_command api to execute aliases

13 years agoMerge branch 'cb/setup' into jch
Junio C Hamano [Mon, 31 Jan 2011 03:03:00 +0000 (19:03 -0800)]
Merge branch 'cb/setup' into jch

* cb/setup:
  setup: translate symlinks in filename when using absolute paths

13 years agoMerge branch 'ae/better-template-failure-report' into jch
Junio C Hamano [Mon, 31 Jan 2011 03:03:00 +0000 (19:03 -0800)]
Merge branch 'ae/better-template-failure-report' into jch

* ae/better-template-failure-report:
  Improve error messages when temporary file creation fails

13 years agoMerge branch 'jn/cherry-pick-strategy-option' into jch
Junio C Hamano [Mon, 31 Jan 2011 03:03:00 +0000 (19:03 -0800)]
Merge branch 'jn/cherry-pick-strategy-option' into jch

* jn/cherry-pick-strategy-option:
  cherry-pick/revert: add support for -X/--strategy-option

13 years agoGit 1.7.4 ko-master v1.7.4
Junio C Hamano [Sun, 30 Jan 2011 19:53:13 +0000 (11:53 -0800)]
Git 1.7.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDon't pass "--xhtml" to hightlight in gitweb.perl script.
Adam Tkac [Thu, 27 Jan 2011 12:51:51 +0000 (13:51 +0100)]
Don't pass "--xhtml" to hightlight in gitweb.perl script.

The "--xhtml" option is supported only in highlight < 3.0. There is no option
to enforce (X)HTML output format compatible with both highlight < 3.0 and
highlight >= 3.0. However default output format is HTML so we don't need to
explicitly specify it.

Signed-off-by: Adam Tkac <atkac@redhat.com>
Helped-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 27 Jan 2011 18:27:49 +0000 (10:27 -0800)]
Merge branch 'maint'

* maint:
  rebase -i: clarify in-editor documentation of "exec"
  tests: sanitize more git environment variables
  fast-import: treat filemodify with empty tree as delete
  rebase: give a better error message for bogus branch
  rebase: use explicit "--" with checkout

Conflicts:
t/t9300-fast-import.sh

13 years agorebase -i: clarify in-editor documentation of "exec" ko-maint
Jonathan Nieder [Fri, 21 Jan 2011 00:36:24 +0000 (18:36 -0600)]
rebase -i: clarify in-editor documentation of "exec"

The hints in the current "instruction sheet" template look like so:

 # Rebase 3f14246..a1d7e01 onto 3f14246
 #
 # Commands:
 #  p, pick = use commit
 #  r, reword = use commit, but edit the commit message
 #  e, edit = use commit, but stop for amending
 #  s, squash = use commit, but meld into previous commit
 #  f, fixup = like "squash", but discard this commit's log message
 #  x <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails
 #
 # If you remove a line here THAT COMMIT WILL BE LOST.
 # However, if you remove everything, the rebase will be aborted.
 #

This does not make it clear that the format of each line is

<insn> <commit id> <explanatory text that will be printed>

but the reader will probably infer that from the automatically
generated pick examples above it.

What about the "exec" instruction?  By analogy, I might imagine that
the format of that line is "exec <command> <explanatory text>", and
the "x <cmd>" hint does not address that question (at first I read it
as taking an argument <cmd> that is the name of a shell).  Meanwhile,
the mention of <cmd> makes the hints harder to scan as a table.

So remove the <cmd> and add some words to remind the reader that
"exec" runs a command named by the rest of the line.  To make room, it
is left to the manpage to explain that that command is run using
$SHELL and that nonzero status from that command will pause the
rebase.

Wording from Junio.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotests: sanitize more git environment variables
Jeff King [Wed, 26 Jan 2011 20:33:32 +0000 (15:33 -0500)]
tests: sanitize more git environment variables

These variables should generally not be set in one's
environment, but they do get set by rebase, which means
doing an interactive rebase like:

  pick abcd1234 foo
  exec make test

will cause false negatives in the test suite.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/fast-import-empty-tree-removal' into maint
Junio C Hamano [Thu, 27 Jan 2011 18:23:53 +0000 (10:23 -0800)]
Merge branch 'jn/fast-import-empty-tree-removal' into maint

* jn/fast-import-empty-tree-removal:
  fast-import: treat filemodify with empty tree as delete

13 years agofast-import: treat filemodify with empty tree as delete
Jonathan Nieder [Thu, 27 Jan 2011 06:07:49 +0000 (00:07 -0600)]
fast-import: treat filemodify with empty tree as delete

Normal git processes do not allow one to build a tree with an empty
subtree entry without trying hard at it.  This is in keeping with the
general UI philosophy: git tracks content, not empty directories.

v1.7.3-rc0~75^2 (2010-06-30) changed that by making it easy to include
an empty subtree in fast-import's active commit:

M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 subdir

One can trigger this by reading an empty tree (for example, the tree
corresponding to an empty root commit) and trying to move it to a
subtree.  It is better and more closely analogous to 'git read-tree
--prefix' to treat such commands as requests to remove the subtree.

Noticed-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorebase: give a better error message for bogus branch
Jeff King [Thu, 27 Jan 2011 00:27:11 +0000 (19:27 -0500)]
rebase: give a better error message for bogus branch

When you give a non-existent branch to git-rebase, it spits
out the usage. This can be confusing, since you may
understand the usage just fine, but simply have made a
mistake in the branch name.

Before:

  $ git rebase origin bogus
  Usage: git rebase ...

After:

  $ git rebase origin bogus
  fatal: no such branch: bogus
  Usage: git rebase ...

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorebase: use explicit "--" with checkout
Jeff King [Thu, 27 Jan 2011 00:26:59 +0000 (19:26 -0500)]
rebase: use explicit "--" with checkout

In the case of a ref/pathname conflict, checkout will
already do the right thing and checkout the ref. However,
for a non-existant ref, this has two advantages:

  1. If a file with that pathname exists, rebase will
     refresh the file from the index and then rebase the
     current branch instead of producing an error.

  2. If no such file exists, the error message using an
     explicit "--" is better:

       # before
       $ git rebase -i origin bogus
       error: pathspec 'bogus' did not match any file(s) known to git.
       Could not checkout bogus

       # after
       $ git rebase -i origin bogus
       fatal: invalid reference: bogus
       Could not checkout bogus

The problems seem to be trigger-able only through "git
rebase -i", as regular git-rebase checks the validity of the
branch parameter as a ref very early on. However, it doesn't
hurt to be defensive.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.4-rc3 v1.7.4-rc3
Junio C Hamano [Mon, 24 Jan 2011 19:00:00 +0000 (11:00 -0800)]
Git 1.7.4-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'as/userdiff-pascal'
Junio C Hamano [Mon, 24 Jan 2011 18:54:12 +0000 (10:54 -0800)]
Merge branch 'as/userdiff-pascal'

* as/userdiff-pascal:
  userdiff: match Pascal class methods

13 years agoMerge branch 'jn/setup-fixes'
Junio C Hamano [Mon, 24 Jan 2011 18:53:09 +0000 (10:53 -0800)]
Merge branch 'jn/setup-fixes'

* jn/setup-fixes:
  t1510: fix typo in the comment of a test
  Documentation updates for 'GIT_WORK_TREE without GIT_DIR' historical usecase
  Subject: setup: officially support --work-tree without --git-dir
  tests: compress the setup tests
  tests: cosmetic improvements to the repo-setup test
  t/README: hint about using $(pwd) rather than $PWD in tests
  Fix expected values of setup tests on Windows

13 years agot1510: fix typo in the comment of a test
Jonathan Nieder [Sat, 22 Jan 2011 20:02:48 +0000 (14:02 -0600)]
t1510: fix typo in the comment of a test

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation updates for 'GIT_WORK_TREE without GIT_DIR' historical usecase
Junio C Hamano [Sun, 23 Jan 2011 23:49:41 +0000 (15:49 -0800)]
Documentation updates for 'GIT_WORK_TREE without GIT_DIR' historical usecase

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSubject: setup: officially support --work-tree without --git-dir
Jonathan Nieder [Wed, 19 Jan 2011 12:42:30 +0000 (06:42 -0600)]
Subject: setup: officially support --work-tree without --git-dir

The original intention of --work-tree was to allow people to work in a
subdirectory of their working tree that does not have an embedded .git
directory.  Because their working tree, which their $cwd was in, did not
have an embedded .git, they needed to use $GIT_DIR to specify where it is,
and because this meant there was no way to discover where the root level
of the working tree was, so we needed to add $GIT_WORK_TREE to tell git
where it was.

However, this facility has long been (mis)used by people's scripts to
start git from a working tree _with_ an embedded .git directory, let git
find .git directory, and then pretend as if an unrelated directory were
the associated working tree of the .git directory found by the discovery
process.  It happens to work in simple cases, and is not worth causing
"regression" to these scripts.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: do not treat reset --keep as a special case
Jonathan Nieder [Fri, 21 Jan 2011 18:37:34 +0000 (12:37 -0600)]
Documentation: do not treat reset --keep as a special case

The current treatment of "git reset --keep" emphasizes how it
differs from --hard (treatment of local changes) and how it breaks
down into plumbing (git read-tree -m -u HEAD <commit> followed by git
update-ref HEAD <commit>).  This can discourage people from using
it, since it might seem to be a complex or niche option.

Better to emphasize what the --keep flag is intended for --- moving
the index and worktree from one commit to another, like "git checkout"
would --- so the reader can make a more informed decision about the
appropriate situations in which to use it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoCorrectly report corrupted objects
Björn Steinbrink [Thu, 20 Jan 2011 20:12:20 +0000 (21:12 +0100)]
Correctly report corrupted objects

The errno check added in commit 3ba7a06 "A loose object is not corrupt
if it cannot be read due to EMFILE" only checked for whether errno is
not ENOENT and thus incorrectly treated "no error" as an error
condition.

Because of that, it never reached the code path that would report that
the object is corrupted and instead caused funny errors like:

  fatal: failed to read object 333c4768ce595793fdab1ef3a036413e2a883853: Success

So we have to extend the check to cover the case in which the object
file was successfully read, but its contents are corrupted.

Reported-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotests: compress the setup tests
Jonathan Nieder [Wed, 19 Jan 2011 12:40:51 +0000 (06:40 -0600)]
tests: compress the setup tests

New test helpers:

 - setup_repo, to initialize a repository or gitfile pointing to a
   repository, with core.bare and core.worktree set as specified;

 - try_case, to run setup from a given directory and validate the
   result, with GIT_DIR and GIT_WORK_TREE set as specified;

 - try_repo, to initialize a repository and call "try_case" from the
   toplevel and a subdirectory;

 - run_wt_tests, to run a battery of tests that check for sane
   behavior when GIT_WORK_TREE is set to various positions relative to
   the .git dir and cwd.

Use these helpers to make the test shorter, less repetitive, and (one
hopes) easier to understand and modify.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotests: cosmetic improvements to the repo-setup test
Jonathan Nieder [Wed, 19 Jan 2011 12:38:22 +0000 (06:38 -0600)]
tests: cosmetic improvements to the repo-setup test

Give an overview in "sh t1510-repo-setup.sh --help" output.
Waste some vertical and horizontal space for clearer code.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Wed, 19 Jan 2011 16:33:54 +0000 (08:33 -0800)]
Merge branch 'maint'

* maint:
  exec_cmd: remove unused extern

13 years agoexec_cmd: remove unused extern
Erik Faye-Lund [Mon, 10 Jan 2011 22:00:49 +0000 (23:00 +0100)]
exec_cmd: remove unused extern

This definition was added by commit 77cb17e9, but it's left unused since
commit 511707d. Remove the left-over definition.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/gitweb-no-logo' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:47 +0000 (08:26 -0800)]
Merge branch 'jn/gitweb-no-logo' into maint

* jn/gitweb-no-logo:
  gitweb: make logo optional

13 years agoMerge branch 'jk/diff-driver-binary-doc' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:44 +0000 (08:26 -0800)]
Merge branch 'jk/diff-driver-binary-doc' into maint

* jk/diff-driver-binary-doc:
  docs: explain diff.*.binary option

13 years agoMerge branch 'tr/submodule-relative-scp-url' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:41 +0000 (08:26 -0800)]
Merge branch 'tr/submodule-relative-scp-url' into maint

* tr/submodule-relative-scp-url:
  submodule: fix relative url parsing for scp-style origin

13 years agoMerge branch 'rj/maint-difftool-cygwin-workaround' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:24 +0000 (08:26 -0800)]
Merge branch 'rj/maint-difftool-cygwin-workaround' into maint

* rj/maint-difftool-cygwin-workaround:
  difftool: Fix failure on Cygwin

13 years agoMerge branch 'rj/maint-test-fixes' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:17 +0000 (08:26 -0800)]
Merge branch 'rj/maint-test-fixes' into maint

* rj/maint-test-fixes:
  t9501-*.sh: Fix a test failure on Cygwin
  lib-git-svn.sh: Add check for mis-configured web server variables
  lib-git-svn.sh: Avoid setting web server variables unnecessarily
  t9142: Move call to start_httpd into the setup test
  t3600-rm.sh: Don't pass a non-existent prereq to test #15

13 years agoMerge branch 'jn/maint-gitweb-pathinfo-fix' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:04 +0000 (08:26 -0800)]
Merge branch 'jn/maint-gitweb-pathinfo-fix' into maint

* jn/maint-gitweb-pathinfo-fix:
  gitweb: Fix handling of whitespace in generated links

13 years agoMerge branch 'ak/describe-exact' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:25:52 +0000 (08:25 -0800)]
Merge branch 'ak/describe-exact' into maint

* ak/describe-exact:
  describe: Delay looking up commits until searching for an inexact match
  describe: Store commit_names in a hash table by commit SHA1
  describe: Do not use a flex array in struct commit_name
  describe: Use for_each_rawref

13 years agoMerge branch 'jn/maint-fast-import-object-reuse' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:25:46 +0000 (08:25 -0800)]
Merge branch 'jn/maint-fast-import-object-reuse' into maint

* jn/maint-fast-import-object-reuse:
  fast-import: insert new object entries at start of hash bucket

13 years agoMerge branch 'jn/submodule-b-current' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:25:41 +0000 (08:25 -0800)]
Merge branch 'jn/submodule-b-current' into maint

* jn/submodule-b-current:
  git submodule: Remove now obsolete tests before cloning a repo
  git submodule -b ... of current HEAD fails

13 years agoMerge branch 'jc/maint-svn-info-test-fix' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:25:38 +0000 (08:25 -0800)]
Merge branch 'jc/maint-svn-info-test-fix' into maint

* jc/maint-svn-info-test-fix:
  t9119: do not compare "Text Last Updated" line from "svn info"

13 years agoMerge branch 'nd/maint-relative' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:25:31 +0000 (08:25 -0800)]
Merge branch 'nd/maint-relative' into maint

* nd/maint-relative:
  get_cwd_relative(): do not misinterpret root path

13 years agoDocumentation/fast-import: put explanation of M 040000 <dataref> "" in context
Jonathan Nieder [Sun, 16 Jan 2011 02:22:35 +0000 (20:22 -0600)]
Documentation/fast-import: put explanation of M 040000 <dataref> "" in context

Omit needless words ("Additionally ... <path> may also" is redundant).
While at it, place the explanation of this special case after the
general rules for paths to provide the reader with some context.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosvndump.c: Fix a printf format compiler warning
Ramsay Jones [Tue, 11 Jan 2011 18:17:21 +0000 (18:17 +0000)]
svndump.c: Fix a printf format compiler warning

In particular, on systems that define uint32_t as an unsigned long,
gcc complains as follows:

        CC vcs-svn/svndump.o
    vcs-svn/svndump.c: In function `svndump_read':
    vcs-svn/svndump.c:215: warning: int format, uint32_t arg (arg 2)

In order to suppress the warning we use the C99 format specifier
macro PRIu32 from <inttypes.h>.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoremote-ext: do not segfault for blank lines
Jonathan Nieder [Sun, 16 Jan 2011 03:49:40 +0000 (21:49 -0600)]
remote-ext: do not segfault for blank lines

Instead of stripping space characters past the beginning of the
line and overflowing a buffer, stop at the beginning of the line
(mimicking the corresponding fix in remote-fd).

The argument to isspace does not need to be cast explicitly because
git isspace takes care of that already.

Noticed-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/fast-import: capitalize beginning of sentence
Jonathan Nieder [Sun, 16 Jan 2011 02:16:05 +0000 (20:16 -0600)]
Documentation/fast-import: capitalize beginning of sentence

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot4034 (diff --word-diff): add a minimum Perl drier test vector
Junio C Hamano [Tue, 18 Jan 2011 17:43:43 +0000 (09:43 -0800)]
t4034 (diff --word-diff): add a minimum Perl drier test vector

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot4034 (diff --word-diff): style suggestions
Jonathan Nieder [Tue, 11 Jan 2011 21:49:57 +0000 (15:49 -0600)]
t4034 (diff --word-diff): style suggestions

Rearrange code to be easier to browse:

 - first data
 - then functions
 - then test assertions

Mark up inline test vectors as

  cat >vector <<-\EOF
data
data
  EOF

for visual scannability.  Use words like "set up" for tests that set
up for other tests, to make it obvious which tests are safe to skip.
Use repeated function calls instead of a loop for the
language-specific tests, so the invocations can be easily tweaked
individually (for example if one starts to fail).

This means if you add a new subdirectory to t4034/, it will not be
automatically used.  I think that's worth it for the added
explicitness.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agouserdiff: simplify word-diff safeguard
Jonathan Nieder [Tue, 11 Jan 2011 21:48:50 +0000 (15:48 -0600)]
userdiff: simplify word-diff safeguard

git's diff-words support has a detail that can be a little dangerous:
any text not matched by a given language's tokenization pattern is
treated as whitespace and changes in such text would go unnoticed.
Therefore each of the built-in regexes allows a special token type
consisting of a single non-whitespace character [^[:space:]].

To make sure UTF-8 sequences remain human readable, the builtin
regexes also have a special token type for runs of bytes with the high
bit set.  In English, non-ASCII characters are usually isolated so
this is analogous to the [^[:space:]] pattern, except it matches a
single _multibyte_ character despite use of the C locale.

Unfortunately it is easy to make typos or forget entirely to include
these catch-all token types when adding support for new languages (see
v1.7.3.5~16, userdiff: fix typo in ruby and python word regexes,
2010-12-18).  Avoid this by including them automatically within the
PATTERNS and IPATTERN macros.

While at it, change the UTF-8 sequence token type to match exactly one
non-ASCII multi-byte character, rather than an arbitrary run of them.

Suggested-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot4034: bulk verify builtin word regex sanity
Thomas Rast [Sat, 18 Dec 2010 16:17:54 +0000 (17:17 +0100)]
t4034: bulk verify builtin word regex sanity

The builtin word regexes should be tested with some simple examples
against simple issues.  Do this in bulk.

Mainly due to a lack of language knowledge and inspiration, most of
the test cases (cpp, csharp, java, objc, pascal, php, python, ruby)
are directly based off a C operator precedence table to verify that
all operators are split correctly.  This means that they are probably
incomplete or inaccurate except for 'cpp' itself.

Still, they are good enough to already have uncovered a typo in the
python and ruby patterns.

'fortran' is based on my anecdotal knowledge of the DO10I parsing
rules, and thus probably useless.  The rest (bibtex, html, tex) are an
ad-hoc test of what I consider important splits in those languages.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agofast-import: Introduce --import-marks-if-exists
Ramkumar Ramachandra [Sat, 15 Jan 2011 06:31:46 +0000 (12:01 +0530)]
fast-import: Introduce --import-marks-if-exists

When a frontend uses a marks file to ensure its state persists between
runs, it may represent "clean slate" when bootstrapping with "no marks
yet". In such a case, feeding the last state with --import-marks and
saving the state after the current run with --export-marks would be a
natural thing to do.

The --import-marks option however errors out when the specified marks file
doesn't exist; this makes bootstrapping a bit difficult.  The location of
the marks file becomes backend-dependent when --relative-marks is in
effect, and the frontend cannot check for the existence of the file in
such a case.

The --import-marks-if-exists option does the same thing as --import-marks
but does not flag an error if the named file does not exist yet to help
these frontends.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoll-merge: simplify opts == NULL case
Jonathan Nieder [Sun, 16 Jan 2011 01:08:42 +0000 (19:08 -0600)]
ll-merge: simplify opts == NULL case

As long as sizeof(struct ll_merge_options) is small, there is not
much reason not to keep a copy of the default merge options in the BSS
section.  In return, we get clearer code and one less stack frame in
the opts == NULL case.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.4-rc2 v1.7.4-rc2
Junio C Hamano [Thu, 13 Jan 2011 19:42:01 +0000 (11:42 -0800)]
Git 1.7.4-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/gitweb-no-logo'
Junio C Hamano [Thu, 13 Jan 2011 19:39:18 +0000 (11:39 -0800)]
Merge branch 'jn/gitweb-no-logo'

* jn/gitweb-no-logo:
  gitweb: make logo optional

13 years agoMerge branch 'jn/perl-funcname'
Junio C Hamano [Thu, 13 Jan 2011 19:38:05 +0000 (11:38 -0800)]
Merge branch 'jn/perl-funcname'

* jn/perl-funcname:
  userdiff/perl: catch BEGIN/END/... and POD as headers
  diff: funcname and word patterns for perl

13 years agoMerge branch 'sr/gitweb-hilite-more'
Junio C Hamano [Thu, 13 Jan 2011 19:36:12 +0000 (11:36 -0800)]
Merge branch 'sr/gitweb-hilite-more'

* sr/gitweb-hilite-more:
  gitweb: remove unnecessary test when closing file descriptor
  gitweb: add extensions to highlight feature map

13 years agoMerge branch 'rj/svn-test'
Junio C Hamano [Thu, 13 Jan 2011 19:36:05 +0000 (11:36 -0800)]
Merge branch 'rj/svn-test'

* rj/svn-test:
  lib-git-svn.sh: Move web-server handling code into separate function

13 years agoMerge branch 'rj/test-fixes'
Junio C Hamano [Thu, 13 Jan 2011 19:35:28 +0000 (11:35 -0800)]
Merge branch 'rj/test-fixes'

* rj/test-fixes:
  t4135-*.sh: Skip the "backslash" tests on cygwin
  t3032-*.sh: Do not strip CR from line-endings while grepping on MinGW
  t3032-*.sh: Pass the -b (--binary) option to sed on cygwin
  t6038-*.sh: Pass the -b (--binary) option to sed on cygwin

Conflicts:
t/t3032-merge-recursive-options.sh

13 years agoMerge branch 'jk/diff-driver-binary-doc'
Junio C Hamano [Thu, 13 Jan 2011 19:34:56 +0000 (11:34 -0800)]
Merge branch 'jk/diff-driver-binary-doc'

* jk/diff-driver-binary-doc:
  docs: explain diff.*.binary option

13 years agoMerge branch 'jn/t9010-work-around-broken-svnadmin'
Junio C Hamano [Thu, 13 Jan 2011 19:34:52 +0000 (11:34 -0800)]
Merge branch 'jn/t9010-work-around-broken-svnadmin'

* jn/t9010-work-around-broken-svnadmin:
  t9010: svnadmin can fail even if available

13 years agoMerge branch 'tr/submodule-relative-scp-url'
Junio C Hamano [Thu, 13 Jan 2011 19:34:39 +0000 (11:34 -0800)]
Merge branch 'tr/submodule-relative-scp-url'

* tr/submodule-relative-scp-url:
  submodule: fix relative url parsing for scp-style origin

13 years agoRelNotes/1.7.4: minor fixes
Michael J Gruber [Thu, 13 Jan 2011 09:35:34 +0000 (10:35 +0100)]
RelNotes/1.7.4: minor fixes

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot0000: quote TAP snippets in test code
Thomas Rast [Thu, 13 Jan 2011 11:30:23 +0000 (12:30 +0100)]
t0000: quote TAP snippets in test code

t0000 contains two snippets of actual test output.  This causes
problems when passing -v to the test[*]: the test infrastructure
echoes the tests before running them, and the TAP parser then sees
this test output and concludes that two tests failed and that the TAP
output was badly formatted.

Guard against this by quoting the output in the source.

[*] either by running 'make smoke' with GIT_TEST_OPTS=-v, or with
prove ./t0000-basic.sh :: -v

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agounpack-trees: handle lstat failure for existing file
Jonathan Nieder [Thu, 13 Jan 2011 02:28:09 +0000 (20:28 -0600)]
unpack-trees: handle lstat failure for existing file

When check_leading_path notices a file in the way of a new entry to be
checked out, verify_absent uses (1) the mode to determine whether it
is a directory (2) the rest of the stat information to check if this
is actually an old entry, disguised by a change in filename (e.g.,
README -> Readme) that is significant to git but insignificant to the
underlying filesystem.  If lstat fails, these checks are performed
with an uninitialied stat structure, producing essentially random
results.

Better to just error out when lstat fails.

The easiest way to reproduce this is to remove a file after the
check_leading_path call and before the lstat in verify_absent.  An
lstat failure other than ENOENT in check_leading_path would also
trigger the same code path.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agounpack-trees: handle lstat failure for existing directory
Jonathan Nieder [Thu, 13 Jan 2011 02:26:36 +0000 (20:26 -0600)]
unpack-trees: handle lstat failure for existing directory

When check_leading_path notices no file in the way of the new entry to
be checked out, verify_absent checks whether there is a directory
there or nothing at all.  If that lstat call fails (for example due to
ENOMEM), it assumes ENOENT, meaning a directory with untracked files
would be clobbered in that case.

Check errno after calling lstat, and for conditions other than ENOENT,
just error out.

This is a theoretical race condition.  lstat has to succeed moments
before it fails for there to be trouble.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 13 Jan 2011 05:26:51 +0000 (21:26 -0800)]
Merge branch 'maint'

* maint:
  commit: suggest --amend --reset-author to fix commiter identity

13 years agocommit: suggest --amend --reset-author to fix commiter identity
Matthieu Moy [Wed, 12 Jan 2011 18:29:14 +0000 (19:29 +0100)]
commit: suggest --amend --reset-author to fix commiter identity

Since the message advises to fix the configuration first, the
advantage of using this command is that it is cut-and-paste ready,
while using --author='...' requires the user to type his name and
email again.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-p4: correct indenting and formatting
Andrew Garber [Wed, 12 Jan 2011 05:05:03 +0000 (21:05 -0800)]
git-p4: correct indenting and formatting

- replace tabs with appropriate number of spaces
- minor tweaks to code formatting

13 years agocheckout: fix bug with ambiguous refs
Junio C Hamano [Tue, 11 Jan 2011 20:00:38 +0000 (15:00 -0500)]
checkout: fix bug with ambiguous refs

The usual dwim_ref lookup prefers tags to branches. Because
checkout primarily works on branches, though, we switch that
behavior to prefer branches.

However, there was a bug in the implementation in which we
used lookup_commit_reference (which used the regular lookup
rules) to get the actual commit to checkout. Checking out an
ambiguous ref therefore ended up putting us in an extremely
broken state in which we wrote the branch ref into HEAD, but
actually checked out the tree for the tag.

This patch fixes the bug by always attempting to pull the
commit to be checked out from the branch-ified version of
the name we were given.

Patch by Junio, tests and commit message from Jeff King.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot9157-*.sh: Make the svn version check more precise
Ramsay Jones [Mon, 10 Jan 2011 23:21:26 +0000 (23:21 +0000)]
t9157-*.sh: Make the svn version check more precise

These tests require an svn version 1.5 or newer to run correctly.
In particular, all 1.4.x versions and earlier are too old, so fix
up the case label regex to cover this range exactly.

[Fix provided by Anders Kaseorg <andersk@MIT.EDU>]

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agouserdiff: match Pascal class methods
Alexey Shumkin [Tue, 11 Jan 2011 08:53:59 +0000 (11:53 +0300)]
userdiff: match Pascal class methods

Class declarations were already covered by the second pattern, but class
methods have the 'class' keyword in front too. Account for it.

Signed-off-by: Alexey Shumkin <zapped@mail.ru>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/README: hint about using $(pwd) rather than $PWD in tests
Johannes Sixt [Tue, 11 Jan 2011 07:44:30 +0000 (08:44 +0100)]
t/README: hint about using $(pwd) rather than $PWD in tests

This adds just a "do it this way" instruction without a lot of explanation,
because the details are too complex to be explained at this point.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix expected values of setup tests on Windows
Johannes Sixt [Thu, 30 Dec 2010 20:51:53 +0000 (21:51 +0100)]
Fix expected values of setup tests on Windows

On Windows, bash stores absolute path names in shell variables in POSIX
format that begins with a slash, rather than in drive-letter format; such
a value is converted to the latter format when it is passed to a non-MSYS
program such as git.

When an expected test value is constructed, it must contain the value that
will be produced by git, which will be in the drive-letter format. But
TRASH_DIRECTORY is in POSIX format. Fix this by using $(pwd), which
produces drive-letter format since 4114156a (Tests on Windows: $(pwd) must
return Windows-style paths).

The change in t1510 is a straight seach-and-replace, except for the first
hunk of the diff.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Mon, 10 Jan 2011 18:39:38 +0000 (10:39 -0800)]
Merge branch 'maint'

* maint:
  Documentation/githooks: post-rewrite-copy-notes never existed
  Documentation/git-archive: spell --worktree-attributes correctly

13 years agoMerge branch 'maint-1.7.2' into maint
Junio C Hamano [Mon, 10 Jan 2011 18:39:28 +0000 (10:39 -0800)]
Merge branch 'maint-1.7.2' into maint

* maint-1.7.2:
  Documentation/githooks: post-rewrite-copy-notes never existed
  Documentation/git-archive: spell --worktree-attributes correctly

13 years agoMerge branch 'maint-1.7.1' into maint-1.7.2
Junio C Hamano [Mon, 10 Jan 2011 18:39:18 +0000 (10:39 -0800)]
Merge branch 'maint-1.7.1' into maint-1.7.2

* maint-1.7.1:
  Documentation/githooks: post-rewrite-copy-notes never existed
  Documentation/git-archive: spell --worktree-attributes correctly

13 years agoMerge branch 'maint-1.7.0' into maint-1.7.1
Junio C Hamano [Mon, 10 Jan 2011 18:39:04 +0000 (10:39 -0800)]
Merge branch 'maint-1.7.0' into maint-1.7.1

* maint-1.7.0:
  Documentation/git-archive: spell --worktree-attributes correctly

13 years agodocs: explain diff.*.binary option
Jeff King [Sun, 9 Jan 2011 20:10:04 +0000 (15:10 -0500)]
docs: explain diff.*.binary option

This was added long ago as part of the userdiff refactoring
for textconv, as internally it made the code simpler and
cleaner. However, there was never a concrete use case for
actually using the config variable.

Now that Matthieu Moy has provided such a use case, it's
easy to explain it using his example.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot9010: svnadmin can fail even if available
Jonathan Nieder [Thu, 6 Jan 2011 18:00:51 +0000 (12:00 -0600)]
t9010: svnadmin can fail even if available

If svn is built against one version of SQLite and run against another,
libsvn_subr needlessly errors out in operations that need to make a
commit.

That is clearly not a bug in git but let us consider the ramifications for
the test suite.  git-svn uses libsvn directly and is probably broken by
that bug; it is right for git-svn tests to fail.  The vcs-svn lib, on the
other hand, does not use libsvn and the test t9010 only uses svn to check
its work.  This points to two possible improvements:

 - do not disable most vcs-svn tests if svn is missing.
 - skip validation rather than failing it when svn fails.

Bring about both by putting the svn invocations into a single test that
builds a repo to compare the test-svn-fe result against.  The test will
always pass but only will set the new SVNREPO test prereq if svn succeeds;
and validation using that repo gets an SVNREPO prerequisite so it only
runs with working svn installations.

Works-around: http://bugs.debian.org/608925
Noticed-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
13 years agosubmodule: fix relative url parsing for scp-style origin
Thomas Rast [Mon, 10 Jan 2011 10:37:26 +0000 (11:37 +0100)]
submodule: fix relative url parsing for scp-style origin

The function resolve_relative_url was not prepared to deal with an
scp-style origin 'user@host:path' in the case where 'path' is only a
single component.  Fix this by extending the logic that strips one
path component from the $remoteurl.

Also add tests for both styles of URLs.

Noticed-by: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/githooks: post-rewrite-copy-notes never existed
Thomas Rast [Mon, 10 Jan 2011 12:42:23 +0000 (13:42 +0100)]
Documentation/githooks: post-rewrite-copy-notes never existed

The documentation for the post-rewrite hook contains a paragraph from
its early development, where the automatic notes copying facilities
were not part of the series and thus this had to be a hook.  Later
versions of the series implemented notes copying as a core feature.

Thus mentioning post-rewrite-copy-notes was never correct.  As the
other hooks do not have a "there is no default hook, but..." sentence
unless they ship a sample hook in either templates or contrib, we
simply remove the whole paragraph.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/git-archive: spell --worktree-attributes correctly
Thomas Rast [Mon, 10 Jan 2011 12:57:43 +0000 (13:57 +0100)]
Documentation/git-archive: spell --worktree-attributes correctly

The --worktree-attributes option was correctly documented in ba053ea
(archive: do not read .gitattributes in working directory,
2009-04-18).  However, later in 9b4c8b0 (archive documentation:
attributes are taken from the tree by default, 2010-02-10) the
misspelling "--work-tree-attributes" was used to refer to it.  Fix
this.

Noticed-by: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Sun, 9 Jan 2011 07:48:47 +0000 (23:48 -0800)]
Merge branch 'maint'

* maint:
  Mark gitk script executable

13 years agot4135-*.sh: Skip the "backslash" tests on cygwin
Ramsay Jones [Tue, 14 Dec 2010 18:37:43 +0000 (18:37 +0000)]
t4135-*.sh: Skip the "backslash" tests on cygwin

The BSLASHPSPEC tests (11-13) fail on cygwin, since you can't
create files containing an backslash character in the name.
In order to skip these tests, we simply stop (incorrectly)
asserting the BSLASHPSPEC prerequisite in test-lib.sh.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3032-*.sh: Do not strip CR from line-endings while grepping on MinGW
Ramsay Jones [Tue, 14 Dec 2010 18:35:48 +0000 (18:35 +0000)]
t3032-*.sh: Do not strip CR from line-endings while grepping on MinGW

By default grep reads in text mode and converts CRLF into LF line
endings, which causes tests 4, 6 and 8 to fail. In a similar manner
to commit a94114ad  (Do not strip CR when grepping HTTP headers,
2010-09-12), we set (and export) the GREP_OPTIONS variable to -U so
that grep will use binary mode.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3032-*.sh: Pass the -b (--binary) option to sed on cygwin
Ramsay Jones [Tue, 14 Dec 2010 18:34:29 +0000 (18:34 +0000)]
t3032-*.sh: Pass the -b (--binary) option to sed on cygwin

The test using the conflict_hunks helper function (test 9) fails
on cygwin, since sed (by default) throws away the CR from CRLF
line endings. This behaviour is undesirable, since the validation
code expects the CRLF line-ending to be present. In order to fix
the problem we pass the -b (--binary) option to sed, using the
SED_OPTIONS variable. We use the SED_STRIPS_CR prerequisite in the
conditional initialisation of SED_OPTIONS.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot6038-*.sh: Pass the -b (--binary) option to sed on cygwin
Ramsay Jones [Tue, 14 Dec 2010 18:32:12 +0000 (18:32 +0000)]
t6038-*.sh: Pass the -b (--binary) option to sed on cygwin

The tests using the fuzz_conflict helper function (tests 5-6)
fail on cygwin in the same way they used to on MinGW, prior
to commit ca02ad3. The solution is also the same; passing the
-b (--binary) option to sed, using the SED_OPTIONS variable.
We introduce a new prerequisite SED_STRIPS_CR to use in the
conditional initialisation of SED_OPTIONS, rather than MINGW.
The new prerequisite is set in test-lib.sh for both MinGW and
Cygwin.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMark gitk script executable
Anders Kaseorg [Fri, 7 Jan 2011 01:14:41 +0000 (20:14 -0500)]
Mark gitk script executable

The executable bit on gitk-git/gitk was lost (accidentally it seems) by
commit 62ba5143ec2ab9d4083669b1b1679355e7639cd5.  Put it back, so that
gitk can be run directly from a git.git checkout.

Note that the script is already executable in gitk.git, just not in
git.git.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>