git
10 years agopull: add the --gpg-sign option.
brian m. carlson [Mon, 10 Feb 2014 01:03:38 +0000 (01:03 +0000)] 
pull: add the --gpg-sign option.

git merge already allows us to sign commits, and git rebase has recently
learned how to do so as well.  Teach git pull to parse the -S/--gpg-sign
option and pass this along to merge or rebase, as appropriate.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorebase: add the --gpg-sign option
Nicolas Vigier [Mon, 10 Feb 2014 01:03:37 +0000 (01:03 +0000)] 
rebase: add the --gpg-sign option

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorebase: parse options in stuck-long mode
Nicolas Vigier [Mon, 10 Feb 2014 01:03:36 +0000 (01:03 +0000)] 
rebase: parse options in stuck-long mode

There is no functional change. The reason for this change is to be able
to add a new option taking an optional argument.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorebase: don't try to match -M option
Nicolas Vigier [Sat, 1 Feb 2014 02:18:03 +0000 (02:18 +0000)] 
rebase: don't try to match -M option

The -M option does not exist in OPTIONS_SPEC, so there is no use to try
to find it.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorebase: remove useless arguments check
Nicolas Vigier [Sat, 1 Feb 2014 02:18:02 +0000 (02:18 +0000)] 
rebase: remove useless arguments check

Remove a check on the number of arguments for --onto and -x options.
It is not possible for $# to be <= 2 at this point :

 - if --onto or -x has an argument, git rev-parse --parseopt will
   provide something like this :
     set -- --onto 'x' --
   when parsing the "--onto" option, $# will be 3 or more if there are
   other options.

 - if --onto or -x doesn't have an argument, git rev-parse --parseopt
   will exit with an error and display usage information.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoam: add the --gpg-sign option
Nicolas Vigier [Sat, 1 Feb 2014 02:18:01 +0000 (02:18 +0000)] 
am: add the --gpg-sign option

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoam: parse options in stuck-long mode
Nicolas Vigier [Sat, 1 Feb 2014 02:18:00 +0000 (02:18 +0000)] 
am: parse options in stuck-long mode

There is no functional change. The reason for this change is to be able
to add a new option taking an optional argument.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit-sh-setup.sh: add variable to use the stuck-long mode
Nicolas Vigier [Sat, 1 Feb 2014 02:17:59 +0000 (02:17 +0000)] 
git-sh-setup.sh: add variable to use the stuck-long mode

If the variable $OPTIONS_STUCKLONG is not empty, then rev-parse
option parsing is done in --stuck-long mode.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agocherry-pick, revert: add the --gpg-sign option
Nicolas Vigier [Fri, 24 Jan 2014 00:50:58 +0000 (00:50 +0000)] 
cherry-pick, revert: add the --gpg-sign option

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.9-rc1 v1.9-rc1
Junio C Hamano [Mon, 27 Jan 2014 19:01:35 +0000 (11:01 -0800)] 
Git 1.9-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'as/tree-walk-fix-aggressive-short-cut'
Junio C Hamano [Mon, 27 Jan 2014 18:48:32 +0000 (10:48 -0800)] 
Merge branch 'as/tree-walk-fix-aggressive-short-cut'

* as/tree-walk-fix-aggressive-short-cut:
  tree_entry_interesting: match against all pathspecs

10 years agoMerge branch 'ta/doc-http-protocol-in-html'
Junio C Hamano [Mon, 27 Jan 2014 18:45:59 +0000 (10:45 -0800)] 
Merge branch 'ta/doc-http-protocol-in-html'

* ta/doc-http-protocol-in-html:
  http-protocol.txt: don't use uppercase for variable names in "The Negotiation Algorithm"
  Documentation: make it easier to maintain enumerated documents
  create HTML for http-protocol.txt

10 years agoMerge branch 'mh/doc-wo-names'
Junio C Hamano [Mon, 27 Jan 2014 18:45:56 +0000 (10:45 -0800)] 
Merge branch 'mh/doc-wo-names'

* mh/doc-wo-names:
  doc: remote author/documentation sections from more pages

10 years agoMerge branch 'jk/revision-o-is-in-libgit-a'
Junio C Hamano [Mon, 27 Jan 2014 18:45:52 +0000 (10:45 -0800)] 
Merge branch 'jk/revision-o-is-in-libgit-a'

* jk/revision-o-is-in-libgit-a:
  Makefile: remove redundant object in git-http{fetch,push}

10 years agoMerge branch 'sb/repack-in-c'
Junio C Hamano [Mon, 27 Jan 2014 18:45:49 +0000 (10:45 -0800)] 
Merge branch 'sb/repack-in-c'

"git repack --max-pack-size=8g" stopped being parsed correctly when
the command was reimplemented in C.

* sb/repack-in-c:
  repack: propagate pack-objects options as strings
  repack: make parsed string options const-correct
  repack: fix typo in max-pack-size option

10 years agoMerge branch 'jk/test-fixes'
Junio C Hamano [Mon, 27 Jan 2014 18:45:46 +0000 (10:45 -0800)] 
Merge branch 'jk/test-fixes'

* jk/test-fixes:
  t7700: do not use "touch" unnecessarily
  t7501: fix "empty commit" test with NO_PERL

10 years agoMerge branch 'nd/negative-pathspec'
Junio C Hamano [Mon, 27 Jan 2014 18:45:43 +0000 (10:45 -0800)] 
Merge branch 'nd/negative-pathspec'

* nd/negative-pathspec:
  tree-walk.c: ignore trailing slash on submodule in tree_entry_interesting()

10 years agoMerge branch 'pw/git-p4'
Junio C Hamano [Mon, 27 Jan 2014 18:45:41 +0000 (10:45 -0800)] 
Merge branch 'pw/git-p4'

Various "git p4" updates.

* pw/git-p4:
  git p4 doc: use two-line style for options with multiple spellings
  git p4 test: examine behavior with locked (+l) files
  git p4: fix an error message when "p4 where" fails
  git p4: handle files with wildcards when doing RCS scrubbing
  git p4 test: do not pollute /tmp
  git p4 test: run as user "author"
  git p4 test: is_cli_file_writeable succeeds
  git p4 test: explicitly check p4 wildcard delete
  git p4: work around p4 bug that causes empty symlinks
  git p4 test: ensure p4 symlink parsing works
  git p4 test: wildcards are supported

10 years agoMerge branch 'ss/safe-create-leading-dir-with-slash'
Junio C Hamano [Mon, 27 Jan 2014 18:45:37 +0000 (10:45 -0800)] 
Merge branch 'ss/safe-create-leading-dir-with-slash'

"git clone $origin foo\bar\baz" on Windows failed to create the
leading directories (i.e. a moral-equivalent of "mkdir -p").

* ss/safe-create-leading-dir-with-slash:
  safe_create_leading_directories(): on Windows, \ can separate path components

10 years agoMerge branch 'mh/safe-create-leading-directories'
Junio C Hamano [Mon, 27 Jan 2014 18:45:33 +0000 (10:45 -0800)] 
Merge branch 'mh/safe-create-leading-directories'

Code clean-up and protection against concurrent write access to the
ref namespace.

* mh/safe-create-leading-directories:
  rename_tmp_log(): on SCLD_VANISHED, retry
  rename_tmp_log(): limit the number of remote_empty_directories() attempts
  rename_tmp_log(): handle a possible mkdir/rmdir race
  rename_ref(): extract function rename_tmp_log()
  remove_dir_recurse(): handle disappearing files and directories
  remove_dir_recurse(): tighten condition for removing unreadable dir
  lock_ref_sha1_basic(): if locking fails with ENOENT, retry
  lock_ref_sha1_basic(): on SCLD_VANISHED, retry
  safe_create_leading_directories(): add new error value SCLD_VANISHED
  cmd_init_db(): when creating directories, handle errors conservatively
  safe_create_leading_directories(): introduce enum for return values
  safe_create_leading_directories(): always restore slash at end of loop
  safe_create_leading_directories(): split on first of multiple slashes
  safe_create_leading_directories(): rename local variable
  safe_create_leading_directories(): add explicit "slash" pointer
  safe_create_leading_directories(): reduce scope of local variable
  safe_create_leading_directories(): fix format of "if" chaining

10 years agoMerge branch 'tr/nth-previous-is-a-commit'
Junio C Hamano [Mon, 27 Jan 2014 18:45:30 +0000 (10:45 -0800)] 
Merge branch 'tr/nth-previous-is-a-commit'

* tr/nth-previous-is-a-commit:
  Documentation: @{-N} can refer to a commit

10 years agoMerge branch 'tr/gitk-doc-range-trace'
Junio C Hamano [Mon, 27 Jan 2014 18:45:23 +0000 (10:45 -0800)] 
Merge branch 'tr/gitk-doc-range-trace'

* tr/gitk-doc-range-trace:
  Documentation/gitk: document -L option

10 years agoMerge branch 'jk/mark-edges-uninteresting'
Junio C Hamano [Mon, 27 Jan 2014 18:45:08 +0000 (10:45 -0800)] 
Merge branch 'jk/mark-edges-uninteresting'

Fix performance regression in v1.8.4.x and later.

* jk/mark-edges-uninteresting:
  list-objects: only look at cmdline trees with edge_hint
  t/perf: time rev-list with UNINTERESTING commits

10 years agoMerge branch 'jk/diff-filespec-cleanup'
Junio C Hamano [Mon, 27 Jan 2014 18:45:02 +0000 (10:45 -0800)] 
Merge branch 'jk/diff-filespec-cleanup'

* jk/diff-filespec-cleanup:
  diff_filespec: use only 2 bits for is_binary flag
  diff_filespec: reorder is_binary field
  diff_filespec: drop xfrm_flags field
  diff_filespec: drop funcname_pattern_ident field
  diff_filespec: reorder dirty_submodule macro definitions

10 years agoMerge branch 'ef/mingw-write'
Junio C Hamano [Mon, 27 Jan 2014 18:44:59 +0000 (10:44 -0800)] 
Merge branch 'ef/mingw-write'

* ef/mingw-write:
  mingw: remove mingw_write
  prefer xwrite instead of write

10 years agoMerge branch 'rk/send-email-ssl-cert'
Junio C Hamano [Mon, 27 Jan 2014 18:44:34 +0000 (10:44 -0800)] 
Merge branch 'rk/send-email-ssl-cert'

The "if /etc/ssl/certs/ directory exists, explicitly telling the
library to use it as SSL_ca_path" blind-defaulting in "git
send-email" broke platforms where /etc/ssl/certs/ directory exists,
but it cannot used as SSL_ca_path (e.g. Fedora rawhide).  Fix it by
not specifying any SSL_ca_path/SSL_ca_file but still asking for peer
verification in such a case.

* rk/send-email-ssl-cert:
  send-email: /etc/ssl/certs/ directory may not be usable as ca_path

10 years agoMerge branch 'jn/ignore-doc'
Junio C Hamano [Mon, 27 Jan 2014 18:44:26 +0000 (10:44 -0800)] 
Merge branch 'jn/ignore-doc'

Explicitly list $HOME/.config/git/ignore as one of the places you
can use to keep ignore patterns that depend on your personal choice
of tools, e.g. *~ for Emacs users.

* jn/ignore-doc:
  gitignore doc: add global gitignore to synopsis

10 years agoMerge branch 'jk/interpret-branch-name-fix'
Junio C Hamano [Mon, 27 Jan 2014 18:44:20 +0000 (10:44 -0800)] 
Merge branch 'jk/interpret-branch-name-fix'

Fix a handful of bugs around interpreting $branch@{upstream}
notation and its lookalike, when $branch part has interesting
characters, e.g. "@", and ":".

* jk/interpret-branch-name-fix:
  interpret_branch_name: find all possible @-marks
  interpret_branch_name: avoid @{upstream} past colon
  interpret_branch_name: always respect "namelen" parameter
  interpret_branch_name: rename "cp" variable to "at"
  interpret_branch_name: factor out upstream handling

10 years agoMerge branch 'jk/allow-fetch-onelevel-refname'
Junio C Hamano [Mon, 27 Jan 2014 18:44:13 +0000 (10:44 -0800)] 
Merge branch 'jk/allow-fetch-onelevel-refname'

"git clone" would fail to clone from a repository that has a ref
directly under "refs/", e.g. "refs/stash", because different
validation paths do different things on such a refname.  Loosen the
client side's validation to allow such a ref.

* jk/allow-fetch-onelevel-refname:
  fetch-pack: do not filter out one-level refs

10 years agoMerge branch 'jc/revision-range-unpeel'
Junio C Hamano [Mon, 27 Jan 2014 18:44:09 +0000 (10:44 -0800)] 
Merge branch 'jc/revision-range-unpeel'

"git log --left-right A...B" lost the "leftness" of commits
reachable from A when A is a tag as a side effect of a recent
bugfix.  This is a regression in 1.8.4.x series.

* jc/revision-range-unpeel:
  revision: propagate flag bits from tags to pointees
  revision: mark contents of an uninteresting tree uninteresting

10 years agoMerge branch 'mh/retire-ref-fetch-rules'
Junio C Hamano [Mon, 27 Jan 2014 18:44:06 +0000 (10:44 -0800)] 
Merge branch 'mh/retire-ref-fetch-rules'

Code simplification.

* mh/retire-ref-fetch-rules:
  refname_match(): always use the rules in ref_rev_parse_rules

10 years agoMerge branch 'mh/attr-macro-doc'
Junio C Hamano [Mon, 27 Jan 2014 18:44:04 +0000 (10:44 -0800)] 
Merge branch 'mh/attr-macro-doc'

* mh/attr-macro-doc:
  gitattributes: document more clearly where macros are allowed

10 years agoMerge branch 'jc/maint-pull-docfix'
Junio C Hamano [Mon, 27 Jan 2014 18:44:00 +0000 (10:44 -0800)] 
Merge branch 'jc/maint-pull-docfix'

* jc/maint-pull-docfix:
  Documentation: "git pull" does not have the "-m" option
  Documentation: exclude irrelevant options from "git pull"

10 years agoMerge branch 'jk/complete-merge-base'
Junio C Hamano [Mon, 27 Jan 2014 18:43:55 +0000 (10:43 -0800)] 
Merge branch 'jk/complete-merge-base'

* jk/complete-merge-base:
  completion: handle --[no-]fork-point options to git-rebase
  completion: complete merge-base options

10 years agoMerge branch 'ab/subtree-doc'
Junio C Hamano [Mon, 27 Jan 2014 18:43:51 +0000 (10:43 -0800)] 
Merge branch 'ab/subtree-doc'

* ab/subtree-doc:
  subtree: fix argument validation in add/pull/push

10 years agohttp-protocol.txt: don't use uppercase for variable names in "The Negotiation Algorithm"
Thomas Ackermann [Sun, 26 Jan 2014 12:56:17 +0000 (13:56 +0100)] 
http-protocol.txt: don't use uppercase for variable names in "The Negotiation Algorithm"

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoDocumentation: make it easier to maintain enumerated documents
Junio C Hamano [Mon, 27 Jan 2014 17:04:32 +0000 (09:04 -0800)] 
Documentation: make it easier to maintain enumerated documents

Instead of starting an enumeration of documents with a DOC = doc1
followed by DOC += doc2, DOC += doc3, ..., empty it with "DOC =" at
the beginning and consistently add them with "DOC += ...".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agocreate HTML for http-protocol.txt
Thomas Ackermann [Sun, 26 Jan 2014 12:57:19 +0000 (13:57 +0100)] 
create HTML for http-protocol.txt

./Documentation/technical/http-protocol.txt was missing from TECH_DOCS in Makefile.
Add it and also improve HTML formatting while still retaining good readability of the ASCII text:
- Use monospace font instead of italicized or roman font for machine output and source text
- Use roman font for things which should be body text
- Use double quotes consistently for "want" and "have" commands
- Use uppercase "C" / "S" consistently for "client" / "server";
  also use "C:" / "S:" instead of "(C)" / "(S)" for consistency and
  to avoid having formatted "(C)" as copyright symbol in HTML
- Use only spaces and not a combination of tabs and spaces for whitespace

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotree_entry_interesting: match against all pathspecs
Andy Spencer [Sat, 25 Jan 2014 22:06:46 +0000 (22:06 +0000)] 
tree_entry_interesting: match against all pathspecs

The current basedir compare aborts early in order to avoid futile
recursive searches. However, a match may still be found by another
pathspec. This can cause an error while checking out files from a branch
when using multiple pathspecs:

$ git checkout master -- 'a/*.txt' 'b/*.txt'
error: pathspec 'a/*.txt' did not match any file(s) known to git.

Signed-off-by: Andy Spencer <andy753421@gmail.com>
Acked-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMakefile: remove redundant object in git-http{fetch,push}
John Keeping [Sat, 25 Jan 2014 13:11:44 +0000 (13:11 +0000)] 
Makefile: remove redundant object in git-http{fetch,push}

revision.o is included in libgit.a which is in $(GITLIBS), so we don't
need to include is separately.  This fixes compilation with
"-fwhole-program" which otherwise fails with messages like this:

  libgit.a(revision.o): In function `mark_tree_uninteresting':
  /home/john/src/git/revision.c:108: multiple definition of `mark_tree_uninteresting'
  /tmp/ccKQRkZV.ltrans2.ltrans.o:/home/john/src/git/revision.c:108: first defined here

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodoc: remote author/documentation sections from more pages
Michael Haggerty [Sun, 26 Jan 2014 23:43:49 +0000 (00:43 +0100)] 
doc: remote author/documentation sections from more pages

We decided at 48bb914e (doc: drop author/documentation sections from
most pages, 2011-03-11) to remove "author" and "documentation"
sections from our documentation.  Remove a few stragglers.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot7700: do not use "touch" unnecessarily
Jeff King [Thu, 23 Jan 2014 19:55:18 +0000 (14:55 -0500)] 
t7700: do not use "touch" unnecessarily

Some versions of touch (such as /usr/ucb/touch on Solaris)
do not know about the "-r" option. This would make sense as
a feature of test-chmtime, but fortunately this fix is even
easier.

The test does not care about the timestamp of the .keep file it
creates at all, only that it exists. For such a use case, with or
without portability issues around "-r", "touch" should not be used
in the first place.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot7501: fix "empty commit" test with NO_PERL
Jeff King [Thu, 23 Jan 2014 19:54:57 +0000 (14:54 -0500)] 
t7501: fix "empty commit" test with NO_PERL

t7501.9 tries to check that "git commit" will fail when the
index is unchanged. It relies on previous tests not to have
modified the index. When it was originally written, this was
always the case. However, commit c65dc35 (t7501: test the
right kind of breakage, 2012-03-30) changed earlier tests (4
and 5) to leave a modification in the index.

We never noticed, however, because t7501.7, between the two,
clears the index state as a side effect. However, that test
depends on the PERL prerequisite, and so it does not always
run. Therefore if NO_PERL is set, we do not run the
intervening test, the index is left unclean, and t7501.9
fails.

We could fix this by moving t7501.9 up in the script.
However, this patch instead leaves it in place and adds a
"git reset" before the commit. This makes the test more
explicit about its preconditions, and will future-proof it
against any other changes in the test state.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotree-walk.c: ignore trailing slash on submodule in tree_entry_interesting()
Nguyễn Thái Ngọc Duy [Thu, 23 Jan 2014 13:22:05 +0000 (20:22 +0700)] 
tree-walk.c: ignore trailing slash on submodule in tree_entry_interesting()

We do ignore trailing slash on a directory, so pathspec "abc/" matches
directory "abc". A submodule is also a directory. Apply the same logic
to it. This makes "git log submodule-path" and "git log submodule-path/"
produce the same output.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorepack: propagate pack-objects options as strings
Jeff King [Thu, 23 Jan 2014 01:30:13 +0000 (20:30 -0500)] 
repack: propagate pack-objects options as strings

In the original shell version of git-repack, any options
destined for pack-objects were left as strings, and passed
as a whole. Since the C rewrite in commit a1bbc6c (repack:
rewrite the shell script in C, 2013-09-15), we now parse
these values to integers internally, then reformat the
integers when passing the option to pack-objects.

This has the advantage that we catch format errors earlier
(i.e., when repack is invoked, rather than when pack-objects
is invoked).

It has three disadvantages, though:

  1. Our internal data types may not be the right size. In
     the case of "--window-memory" and "--max-pack-size",
     these are "unsigned long" in pack-objects, but we can
     only represent a regular "int".

  2. Our parsing routines might not be the same as those of
     pack-objects. For the two options above, pack-objects
     understands "100m" to mean "100 megabytes", but repack
     does not.

  3. We have to keep a sentinel value to know whether it is
     worth passing the option along. In the case of
     "--window-memory", we currently do not pass it if the
     value is "0". But that is a meaningful value to
     pack-objects, where it overrides any configured value.

We can fix all of these by simply passing the strings from
the user along to pack-objects verbatim. This does not
actually fix anything for "--depth" or "--window", but these
are converted, too, for consistency.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorepack: make parsed string options const-correct
Jeff King [Thu, 23 Jan 2014 01:28:30 +0000 (20:28 -0500)] 
repack: make parsed string options const-correct

When we use OPT_STRING to parse an option, we get back a
pointer into the argv array, which should be "const char *".
The compiler doesn't notice because it gets passed through a
"void *" in the option struct.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorepack: fix typo in max-pack-size option
Jeff King [Thu, 23 Jan 2014 01:27:52 +0000 (20:27 -0500)] 
repack: fix typo in max-pack-size option

When we see "--max-pack-size", we accidentally propagated
this to pack-objects as "--max_pack_size", which does not
work at all.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMakefile: Fix compilation of Windows resource file
Johannes Sixt [Thu, 23 Jan 2014 07:28:58 +0000 (08:28 +0100)] 
Makefile: Fix compilation of Windows resource file

If the git version number consists of less than three period
separated numbers, then the Windows resource file compilation
issues a syntax error:

  $ touch git.rc
  $ make V=1 git.res
  GIT_VERSION = 1.9.rc0
  windres -O coff \
            -DMAJOR=1 -DMINOR=9 -DPATCH=rc0 \
            -DGIT_VERSION="\\\"1.9.rc0\\\"" git.rc -o git.res
  C:\msysgit\msysgit\mingw\bin\windres.exe: git.rc:2: syntax error
  make: *** [git.res] Error 1
  $

Note that -DPATCH=rc0.

The values passed via -DMAJOR=, -DMINOR=, and -DPATCH= are used in
FILEVERSION and PRODUCTVERSION statements, which expect up to four numeric
values. These version numbers are intended for machine consumption. They
are typically inspected by installers to decide whether a file to be
installed is newer than one that exists on the system, but are not used
for much else.

We can be pretty certain that there are no tools that look at these
version numbers, not even the installer of Git for Windows does.
Therefore, to fix the syntax error, fill in only the first two numbers,
which we are guaranteed to find in Git version numbers.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Thu, 23 Jan 2014 16:51:14 +0000 (08:51 -0800)] 
Merge git://git.bogomips.org/git-svn

* 'master' of git://git.bogomips.org/git-svn:
  git-svn: memoize _rev_list and rebuild

10 years agoMerge git://ozlabs.org/~paulus/gitk
Junio C Hamano [Thu, 23 Jan 2014 16:50:50 +0000 (08:50 -0800)] 
Merge git://ozlabs.org/~paulus/gitk

* 'master' of git://ozlabs.org/~paulus/gitk:
  gitk: Indent word-wrapped lines in commit display header
  gitk: Comply with XDG base directory specification
  gitk: Replace "next" and "prev" buttons with down and up arrows
  gitk: chmod +x po2msg.sh
  gitk: Update copyright dates
  gitk: Add Bulgarian translation (304t)
  gitk: Fix mistype

10 years agogitk: Indent word-wrapped lines in commit display header
Paul Mackerras [Thu, 23 Jan 2014 11:06:22 +0000 (22:06 +1100)] 
gitk: Indent word-wrapped lines in commit display header

In the cases where the lines starting with Precedes:, Follows: and
Branches: in the commit display are long enough to be word-wrapped,
this adds a 1cm margin on the left of the wrapped lines, to make
the display more readable.  Suggested by Stephen Rothwell.

Signed-off-by: Paul Mackerras <paulus@samba.org>
10 years agogit-svn: memoize _rev_list and rebuild
lin zuojian [Thu, 23 Jan 2014 02:15:19 +0000 (10:15 +0800)] 
git-svn: memoize _rev_list and rebuild

According to profile data, _rev_list and rebuild consume a large
portion of time.  Memoize the results of _rev_list and memoize
rebuild internals to avoid subprocess invocation.

When importing 15152 revisions on a LAN, time improved from 10
hours to 3-4 hours.

Signed-off-by: lin zuojian <manjian2006@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
10 years agoAdd cross-references between docs for for-each-ref and show-ref
Michael Haggerty [Wed, 22 Jan 2014 11:23:20 +0000 (12:23 +0100)] 
Add cross-references between docs for for-each-ref and show-ref

Add cross-references between the manpages for git-for-each-ref(1) and
git-show-ref(1).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosafe_create_leading_directories(): on Windows, \ can separate path components
Michael Haggerty [Sat, 18 Jan 2014 23:40:44 +0000 (00:40 +0100)] 
safe_create_leading_directories(): on Windows, \ can separate path components

When cloning to a directory "C:\foo\bar" from Windows' cmd.exe where
"foo" does not exist yet, Git would throw an error like

    fatal: could not create work tree dir 'c:\foo\bar'.: No such file or directory

Fix this by not hard-coding a platform specific directory separator
into safe_create_leading_directories().

This patch, including its entire commit message, is derived from a
patch by Sebastian Schuberth.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit p4 doc: use two-line style for options with multiple spellings
Pete Wyckoff [Tue, 21 Jan 2014 23:16:48 +0000 (18:16 -0500)] 
git p4 doc: use two-line style for options with multiple spellings

Thomas Rast noticed the docs have a mix of styles when
it comes to options with multiple spellings.  Standardize
the couple in git-p4.txt that are odd.

Instead of:
  -n, --dry-run::

Do this:
  -n::
  --dry-run::

See
http://thread.gmane.org/gmane.comp.version-control.git/219936/focus=219945

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit p4 test: examine behavior with locked (+l) files
Pete Wyckoff [Tue, 21 Jan 2014 23:16:47 +0000 (18:16 -0500)] 
git p4 test: examine behavior with locked (+l) files

The p4 server can enforce file locking, so that only one user
can edit a file at a time.  Git p4 is unable to submit changes
to locked files.  Currently it exits poorly.  Ideally it would
notice the locked condition and clean up nicely.

Add a bunch of tests that describe the problem, hoping that
fixes appear in the future.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit p4: fix an error message when "p4 where" fails
Pete Wyckoff [Tue, 21 Jan 2014 23:16:46 +0000 (18:16 -0500)] 
git p4: fix an error message when "p4 where" fails

When "p4 where" fails, for whatever reason, the error message tries to
show an undefined variable.  This minor bug applies only when using a
client spec, and was introduced recently in 9d57c4a (git p4: implement
view spec wildcards with "p4 where", 2013-08-30).

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit p4: handle files with wildcards when doing RCS scrubbing
Pete Wyckoff [Tue, 21 Jan 2014 23:16:45 +0000 (18:16 -0500)] 
git p4: handle files with wildcards when doing RCS scrubbing

Commit 9d7d446 (git p4: submit files with wildcards, 2012-04-29)
fixed problems with handling files that had p4 wildcard
characters, like "@" and "*".  But it missed one case, that of
RCS keyword scrubbing, which uses "p4 fstat" to extract type
information.  Fix it by calling wildcard_encode() on the raw
filename.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit p4 test: do not pollute /tmp
Pete Wyckoff [Tue, 21 Jan 2014 23:16:44 +0000 (18:16 -0500)] 
git p4 test: do not pollute /tmp

Generating the submit template for p4 uses tempfile.mkstemp(),
which by default puts files in /tmp.  For a test that fails,
possibly on purpose, this is not cleaned up.  Run with TMPDIR
pointing into the trash directory so the temp files go away
with the test results.

To do this required some other minor changes.  First, the editor
is launched using system(editor + " " + template_file), using
shell expansion to build the command string.  This doesn't work
if editor has a space in it.  And is generally unwise as it's
easy to fool the shell into doing extra work.  Exec the args
directly, without shell expansion.

Second, without shell expansion, the trick of "P4EDITOR=:" used
in the tests doesn't work.  Use a real command, true, as the
non-interactive editor for testing.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit p4 test: run as user "author"
Pete Wyckoff [Tue, 21 Jan 2014 23:16:43 +0000 (18:16 -0500)] 
git p4 test: run as user "author"

The tests use author@example.com as the canonical submitter,
but he does not have an entry in the p4 users database.
This causes the generated change description to complain
that the git and p4 users disagree.  The complaint message
is still valid, but isn't useful in tests.  It was introduced
in 848de9c (git-p4: warn if git authorship won't be retained,
2011-05-13).

Fix t9813 to use @example.com instead of @localhost due to
change in p4_add_user().  Move the function into the git p4
test library so author can be added at initialization time.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit p4 test: is_cli_file_writeable succeeds
Pete Wyckoff [Tue, 21 Jan 2014 23:16:42 +0000 (18:16 -0500)] 
git p4 test: is_cli_file_writeable succeeds

Commit e9df0f9 (git p4: cygwin p4 client does not mark read-only,
2013-01-26) fixed a problem with "test -w" on cygwin, but mistakenly
marked the new test as failing.  Fix this.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit p4 test: explicitly check p4 wildcard delete
Pete Wyckoff [Tue, 21 Jan 2014 23:16:41 +0000 (18:16 -0500)] 
git p4 test: explicitly check p4 wildcard delete

There was no test where p4 deleted a file with a wildcard
character.  Make sure git p4 applies the wildcard decoding
properly when importing a delete that includes a wildcard.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit p4: work around p4 bug that causes empty symlinks
Pete Wyckoff [Tue, 21 Jan 2014 23:16:40 +0000 (18:16 -0500)] 
git p4: work around p4 bug that causes empty symlinks

Damien Gérard highlights an interesting problem.  Some p4
repositories end up with symlinks that have an empty target.  It
is not possible to create this with current p4, but they do
indeed exist.

The effect in git p4 is that "p4 print" on the symlink returns an
empty string, confusing the curret symlink-handling code.

Such broken repositories cause problems in p4 as well, even with
no git involved.  In p4, syncing to a change that includes a
bogus symlink causes errors:

    //depot/empty-symlink - updating /home/me/p4/empty-symlink
    rename: /home/me/p4/empty-symlink: No such file or directory

and leaves no symlink.

In git, replicate the p4 behavior by ignoring these bad symlinks.
If, in a later p4 revision, the symlink happens to point to
something non-null, the symlink will be replaced properly.

Add a big test for all this too.

This happens to be a regression introduced by 1292df1 (git-p4:
Fix occasional truncation of symlink contents., 2013-08-08) and
appeared first in 1.8.5.  But it shows up only in p4 repositories
of dubious character, so can wait for a proper release.

Tested-by: Damien Gérard <damien@iwi.me>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogitk: Comply with XDG base directory specification
Astril Hayato [Tue, 21 Jan 2014 19:10:16 +0000 (19:10 +0000)] 
gitk: Comply with XDG base directory specification

Write the gitk config data to $XDG_CONFIG_HOME/git/gitk ($HOME/.config/git/gitk
by default) in line with the XDG specification. This makes it consistent with
git which also follows the spec.

If $HOME/.gitk already exists use that for backward compatibility, so only new
installations are affected.

Signed-off-by: Astril Hayato <astrilhayato@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
10 years agogit p4 test: ensure p4 symlink parsing works
Pete Wyckoff [Tue, 21 Jan 2014 23:16:39 +0000 (18:16 -0500)] 
git p4 test: ensure p4 symlink parsing works

While this happens to work, there was no test to make sure
that the basic importing of a symlink from p4 to git functioned.

Add a simple test to create a symlink in p4 and import it into git,
then verify that the symlink exists and has the correct target.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit p4 test: wildcards are supported
Pete Wyckoff [Tue, 21 Jan 2014 23:16:38 +0000 (18:16 -0500)] 
git p4 test: wildcards are supported

Since 9d57c4a (git p4: implement view spec wildcards with "p4
where", 2013-08-30), all the wildcard types should be supported.
Change must-fail tests to mark that they now pass.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agolist-objects: only look at cmdline trees with edge_hint
Jeff King [Tue, 21 Jan 2014 02:25:40 +0000 (21:25 -0500)] 
list-objects: only look at cmdline trees with edge_hint

When rev-list is given a command-line like:

  git rev-list --objects $commit --not --all

the most accurate answer is the difference between the set
of objects reachable from $commit and the set reachable from
all of the existing refs. However, we have not historically
provided that answer, because it is very expensive to
calculate. We would have to open every tree of every commit
in the entire history.

Instead, we find the accurate set difference of the
reachable commits, and then mark the trees at the boundaries
as uninteresting. This misses objects which appear in the
trees of both the interesting commits and deep within the
uninteresting history.

Commit fbd4a70 (list-objects: mark more commits as edges in
mark_edges_uninteresting, 2013-08-16) noticed that we miss
those objects during pack-objects, and added code to examine
the trees of all of the "--not" refs given on the
command-line.  Note that this is still not the complete set
difference, because we look only at the tips of the
command-line arguments, not all of their reachable commits.
But it increases the set of boundary objects we consider,
which is especially important for shallow fetches.  So we
are trading extra CPU time for a larger set of boundary
objects, which can improve the resulting pack size for a
--thin pack.

This tradeoff probably makes sense in the context of
pack-objects, where we have set revs->edge_hint to have the
traversal feed us the set of boundary objects.  For a
regular rev-list, though, it is probably not a good
tradeoff. It is true that it makes our list slightly closer
to a true set difference, but it is a rare case where this
is important. And because we do not have revs->edge_hint
set, we do nothing useful with the larger set of boundary
objects.

This patch therefore ties the extra tree examination to the
revs->edge_hint flag; it is the presence of that flag that
makes the tradeoff worthwhile.

Here is output from the p0001-rev-list showing the
improvement in performance:

Test                                             HEAD^             HEAD
-----------------------------------------------------------------------------------------
0001.1: rev-list --all                           0.69(0.65+0.02)   0.69(0.66+0.02) +0.0%
0001.2: rev-list --all --objects                 3.22(3.19+0.03)   3.23(3.20+0.03) +0.3%
0001.4: rev-list $commit --not --all             0.04(0.04+0.00)   0.04(0.04+0.00) +0.0%
0001.5: rev-list --objects $commit --not --all   0.27(0.26+0.01)   0.04(0.04+0.00) -85.2%

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot/perf: time rev-list with UNINTERESTING commits
Jeff King [Tue, 21 Jan 2014 02:25:12 +0000 (21:25 -0500)] 
t/perf: time rev-list with UNINTERESTING commits

We time a straight "rev-list --all" and its "--object"
counterpart, both going all the way to the root. However, we
do not time a partial history walk. This patch adds an
extreme case: a walk over a very small slice of history, but
with a very large set of UNINTERESTING tips. This is similar
to the connectivity check run by git on a small fetch, or
the walk done by any pre-receive hooks that want to check
incoming commits.

This test reveals a performance regression in git v1.8.4.2,
caused by fbd4a70 (list-objects: mark more commits as edges
in mark_edges_uninteresting, 2013-08-16):

Test                                             fbd4a703^         fbd4a703
------------------------------------------------------------------------------------------
0001.1: rev-list --all                           0.69(0.67+0.02)   0.69(0.68+0.01) +0.0%
0001.2: rev-list --all --objects                 3.47(3.44+0.02)   3.48(3.44+0.03) +0.3%
0001.4: rev-list $commit --not --all             0.04(0.04+0.00)   0.04(0.04+0.00) +0.0%
0001.5: rev-list --objects $commit --not --all   0.04(0.03+0.00)   0.27(0.24+0.02) +575.0%

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoDocumentation: @{-N} can refer to a commit
Thomas Rast [Sun, 19 Jan 2014 07:01:15 +0000 (08:01 +0100)] 
Documentation: @{-N} can refer to a commit

The @{-N} syntax always referred to the N-th last thing checked out,
which can be either a branch or a commit (for detached HEAD cases).
However, the documentation only mentioned branches.

Edit in a "/commit" in the appropriate places.

Reported-by: Kevin <ikke@ikke.info>
Signed-off-by: Thomas Rast <tr@thomasrast.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorename_tmp_log(): on SCLD_VANISHED, retry
Michael Haggerty [Sat, 18 Jan 2014 22:49:01 +0000 (23:49 +0100)] 
rename_tmp_log(): on SCLD_VANISHED, retry

If safe_create_leading_directories() fails because a file along the
path unexpectedly vanished, try again from the beginning.  Try at most
4 times.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorename_tmp_log(): limit the number of remote_empty_directories() attempts
Michael Haggerty [Sat, 18 Jan 2014 22:49:00 +0000 (23:49 +0100)] 
rename_tmp_log(): limit the number of remote_empty_directories() attempts

This doesn't seem to be a likely error, but we've got the counter
anyway, so we might as well use it for an added bit of safety.

Please note that the first call to rename() is optimistic, and it is
normal for it to fail if there is a directory in the way.  So bump the
total number of allowed attempts to 4, to be sure that we can still
have at least 3 retries in the case of a race.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorename_tmp_log(): handle a possible mkdir/rmdir race
Michael Haggerty [Sat, 18 Jan 2014 22:48:59 +0000 (23:48 +0100)] 
rename_tmp_log(): handle a possible mkdir/rmdir race

If a directory vanishes while renaming the temporary reflog file,
retry (up to 3 times).  This could happen if another process deletes
the directory created by safe_create_leading_directories() just before
we rename the file into the directory.

As far as I can tell, this race could not occur internal to git.  The
only time that a directory under $GIT_DIR/logs is deleted is if room
has to be made for a log file for a reference with the same name;
for example, in the following sequence:

    git branch foo/bar    # Creates file .git/logs/refs/heads/foo/bar
    git branch -d foo/bar # Deletes file but leaves .git/logs/refs/heads/foo/
    git branch foo        # Deletes .git/logs/refs/heads/foo/

But the only reason the last command deletes the directory is because
it wants to create a file with the same name.  So if another process
(e.g.,

    git branch foo/baz

) wants to create that directory, one of the two is doomed to failure
anyway because of a D/F conflict.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorename_ref(): extract function rename_tmp_log()
Michael Haggerty [Sat, 18 Jan 2014 22:48:58 +0000 (23:48 +0100)] 
rename_ref(): extract function rename_tmp_log()

It's about to become a bit more complex.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoremove_dir_recurse(): handle disappearing files and directories
Michael Haggerty [Sat, 18 Jan 2014 22:48:57 +0000 (23:48 +0100)] 
remove_dir_recurse(): handle disappearing files and directories

If a file or directory that we are trying to remove disappears (e.g.,
because another process has pruned it), do not consider it an error.

However, if REMOVE_DIR_KEEP_TOPLEVEL is set, and the toplevel
directory is missing, then consider it an error (like before).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoremove_dir_recurse(): tighten condition for removing unreadable dir
Michael Haggerty [Sat, 18 Jan 2014 22:48:56 +0000 (23:48 +0100)] 
remove_dir_recurse(): tighten condition for removing unreadable dir

If opendir() fails on the top-level directory, it makes sense to try
to delete it anyway--but only if the failure was due to EACCES.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agolock_ref_sha1_basic(): if locking fails with ENOENT, retry
Michael Haggerty [Sat, 18 Jan 2014 22:48:55 +0000 (23:48 +0100)] 
lock_ref_sha1_basic(): if locking fails with ENOENT, retry

If hold_lock_file_for_update() fails with errno==ENOENT, it might be
because somebody else (for example, a pack-refs process) has just
deleted one of the lockfile's ancestor directories.  So if this
condition is detected, try again (up to 3 times).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agolock_ref_sha1_basic(): on SCLD_VANISHED, retry
Michael Haggerty [Sat, 18 Jan 2014 22:48:54 +0000 (23:48 +0100)] 
lock_ref_sha1_basic(): on SCLD_VANISHED, retry

If safe_create_leading_directories() fails because a file along the
path unexpectedly vanished, try again (up to 3 times).

This can occur if another process is deleting directories at the same
time as we are trying to make them.  For example, "git pack-refs
--all" tries to delete the loose refs and any empty directories that
are left behind.  If a pack-refs process is running, then it might
delete a directory that we need to put a new loose reference in.

If safe_create_leading_directories() thinks this might have happened,
then take its advice and try again (maximum three attempts).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoDocumentation/gitk: document -L option
Thomas Rast [Sat, 16 Nov 2013 17:37:57 +0000 (18:37 +0100)] 
Documentation/gitk: document -L option

The -L option is the same as for git-log, so the entire block is just
copied from git-log.txt.  However, until the parser is fixed we add a
caveat that gitk only understands the stuck form.

Signed-off-by: Thomas Rast <tr@thomasrast.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge tag 'gitgui-0.19.0' of http://repo.or.cz/r/git-gui
Junio C Hamano [Tue, 21 Jan 2014 21:16:17 +0000 (13:16 -0800)] 
Merge tag 'gitgui-0.19.0' of repo.or.cz/r/git-gui

git-gui 0.19.0

* tag 'gitgui-0.19.0' of http://repo.or.cz/r/git-gui:
  git-gui 0.19
  git-gui: chmod +x po2msg, windows/git-gui.sh
  git-gui: fallback right pane to packed widgets with Tk 8.4
  git-gui i18n: Added Bulgarian translation
  git-gui l10n: Add 29 more terms to glossary
  git-gui i18n: Initial glossary in Bulgarian

10 years agogitk: Replace "next" and "prev" buttons with down and up arrows
Marc Branchaud [Wed, 18 Dec 2013 16:04:13 +0000 (11:04 -0500)] 
gitk: Replace "next" and "prev" buttons with down and up arrows

Users often find that "next" and "prev" do the opposite of what they
expect.  For example, "next" moves to the next match down the list, but
that is almost always backwards in time.  Replacing the text with arrows
makes it clear where the buttons will take the user.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
10 years agogitk: chmod +x po2msg.sh
Jonathan Nieder [Mon, 25 Nov 2013 21:00:10 +0000 (13:00 -0800)] 
gitk: chmod +x po2msg.sh

The Makefile only runs it using tclsh, but because the fallback po2msg
script has the usual tcl preamble starting with #!/bin/sh it can also
be run directly.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
10 years agogitk: Update copyright dates
Paul Mackerras [Tue, 21 Jan 2014 11:02:27 +0000 (22:02 +1100)] 
gitk: Update copyright dates

Signed-off-by: Paul Mackerras <paulus@samba.org>
10 years agogitk: Add Bulgarian translation (304t)
Alexander Shopov [Wed, 15 Jan 2014 11:27:29 +0000 (13:27 +0200)] 
gitk: Add Bulgarian translation (304t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
10 years agogitk: Fix mistype
Max Kirillov [Sat, 18 Jan 2014 12:58:51 +0000 (14:58 +0200)] 
gitk: Fix mistype

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
10 years agogit-gui 0.19 gitgui-0.19.0
Pat Thoyts [Sat, 18 Jan 2014 17:29:34 +0000 (17:29 +0000)] 
git-gui 0.19

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
10 years agogit-gui: chmod +x po2msg, windows/git-gui.sh
Jonathan Nieder [Mon, 25 Nov 2013 21:01:05 +0000 (13:01 -0800)] 
git-gui: chmod +x po2msg, windows/git-gui.sh

The Makefile only runs po/po2msg.sh using tclsh, but because the
script has the usual tcl preamble starting with #!/bin/sh it can also
be run directly.

The Windows git-gui wrapper is usable in-place for the same reason.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
10 years agogit-gui: fallback right pane to packed widgets with Tk 8.4
Max Kirillov [Tue, 14 Jan 2014 23:58:09 +0000 (01:58 +0200)] 
git-gui: fallback right pane to packed widgets with Tk 8.4

Since 918dbf58, git-gui crashes if started with Tk 8.4. The reason is that
tk < 8.5 does not support -stretch option for panedwindow.

Without the option it's not possible to properly expand the right half -
the commit area is expanded, while desired behavior is to expand the diff
area. So the whole feature should be disabled with Tk
version less than 8.5.

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
10 years agogit-gui i18n: Added Bulgarian translation
Alexander Shopov [Wed, 15 Jan 2014 11:07:56 +0000 (13:07 +0200)] 
git-gui i18n: Added Bulgarian translation

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
10 years agogit-gui l10n: Add 29 more terms to glossary
Alexander Shopov [Wed, 15 Jan 2014 11:07:57 +0000 (13:07 +0200)] 
git-gui l10n: Add 29 more terms to glossary

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
10 years agogit-gui i18n: Initial glossary in Bulgarian
Alexander Shopov [Wed, 15 Jan 2014 11:07:55 +0000 (13:07 +0200)] 
git-gui i18n: Initial glossary in Bulgarian

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
10 years agoGit 1.9-rc0 v1.9-rc0
Junio C Hamano [Fri, 17 Jan 2014 20:30:14 +0000 (12:30 -0800)] 
Git 1.9-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'maint'
Junio C Hamano [Fri, 17 Jan 2014 20:21:39 +0000 (12:21 -0800)] 
Merge branch 'maint'

* maint:
  git-svn: workaround for a bug in svn serf backend

10 years agoMerge branch 'fp/submodule-checkout-mode'
Junio C Hamano [Fri, 17 Jan 2014 20:21:20 +0000 (12:21 -0800)] 
Merge branch 'fp/submodule-checkout-mode'

"submodule.*.update=checkout", when propagated from .gitmodules to
.git/config, turned into a "submodule.*.update=none", which did not
make much sense.

* fp/submodule-checkout-mode:
  git-submodule.sh: 'checkout' is a valid update mode

10 years agoMerge branch 'nd/shallow-clone'
Junio C Hamano [Fri, 17 Jan 2014 20:21:14 +0000 (12:21 -0800)] 
Merge branch 'nd/shallow-clone'

Fetching from a shallow-cloned repository used to be forbidden,
primarily because the codepaths involved were not carefully vetted
and we did not bother supporting such usage. This attempts to allow
object transfer out of a shallow-cloned repository in a controlled
way (i.e. the receiver become a shallow repository with truncated
history).

* nd/shallow-clone: (31 commits)
  t5537: fix incorrect expectation in test case 10
  shallow: remove unused code
  send-pack.c: mark a file-local function static
  git-clone.txt: remove shallow clone limitations
  prune: clean .git/shallow after pruning objects
  clone: use git protocol for cloning shallow repo locally
  send-pack: support pushing from a shallow clone via http
  receive-pack: support pushing to a shallow clone via http
  smart-http: support shallow fetch/clone
  remote-curl: pass ref SHA-1 to fetch-pack as well
  send-pack: support pushing to a shallow clone
  receive-pack: allow pushes that update .git/shallow
  connected.c: add new variant that runs with --shallow-file
  add GIT_SHALLOW_FILE to propagate --shallow-file to subprocesses
  receive/send-pack: support pushing from a shallow clone
  receive-pack: reorder some code in unpack()
  fetch: add --update-shallow to accept refs that update .git/shallow
  upload-pack: make sure deepening preserves shallow roots
  fetch: support fetching from a shallow repository
  clone: support remote shallow repository
  ...

10 years agomingw: remove mingw_write
Erik Faye-Lund [Fri, 17 Jan 2014 14:17:10 +0000 (15:17 +0100)] 
mingw: remove mingw_write

Since 0b6806b9 ("xread, xwrite: limit size of IO to 8MB"), this
wrapper is no longer needed, as read and write are already split
into small chunks.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoprefer xwrite instead of write
Erik Faye-Lund [Fri, 17 Jan 2014 14:17:09 +0000 (15:17 +0100)] 
prefer xwrite instead of write

Our xwrite wrapper already deals with a few potential hazards, and
are as such more robust. Prefer it instead of write to get the
robustness benefits everywhere.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-and-improved-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'jk/pull-rebase-using-fork-point'
Junio C Hamano [Fri, 17 Jan 2014 20:04:29 +0000 (12:04 -0800)] 
Merge branch 'jk/pull-rebase-using-fork-point'

Finishing touches so that an expected error message will not leak to
the UI.

* jk/pull-rebase-using-fork-point:
  pull: suppress error when no remoteref is found

10 years agopull: suppress error when no remoteref is found
John Keeping [Fri, 17 Jan 2014 20:00:20 +0000 (20:00 +0000)] 
pull: suppress error when no remoteref is found

Commit 48059e4 (pull: use merge-base --fork-point when appropriate,
2013-12-08) incorrectly assumes that get_remote_merge_branch will either
yield a non-empty string or return an error, but there are circumstances
where it will yield an empty string.

The previous code then invoked git-rev-list with no arguments, which
results in an error suppressed by redirecting stderr to /dev/null.  Now
we invoke git-merge-base with an empty branch name, which also results
in an error.  Suppress this in the same way.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agogit-svn: workaround for a bug in svn serf backend
Roman Kagan [Fri, 27 Dec 2013 08:05:15 +0000 (12:05 +0400)] 
git-svn: workaround for a bug in svn serf backend

Subversion serf backend in versions 1.8.5 and below has a bug(*) that the
function creating the descriptor of a file change -- add_file() --
doesn't make a copy of its third argument when storing it on the
returned descriptor.  As a result, by the time this field is used (in
transactions of file copying or renaming) it may well be released, and
the memory reused.

One of its possible manifestations is the svn assertion triggering on an
invalid path, with a message

svn_fspath__skip_ancestor: Assertion
`svn_fspath__is_canonical(child_fspath)' failed.

This patch works around this bug, by storing the value to be passed as
the third argument to add_file() in a local variable with the same scope
as the file change descriptor, making sure their lifetime is the same.

* [ew: fixed in Subversion r1553376 as noted by Jonathan Nieder]

Cc: Benjamin Pabst <benjamin.pabst85@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Roman Kagan <rkagan@mail.ru>
10 years agodiff_filespec: use only 2 bits for is_binary flag
Jeff King [Fri, 17 Jan 2014 01:25:40 +0000 (20:25 -0500)] 
diff_filespec: use only 2 bits for is_binary flag

The is_binary flag needs only three values: -1, 0, and 1.
However, we use a whole 32-bit int for it on most systems
(both 32- and 64- bit).

Instead, we can mark it to use only 2 bits. On 32-bit
systems, this lets it end up as part of the bitfield above
(saving 4 bytes). On 64-bit systems, we don't see any change
(because the savings end up as padding), but it does leave
room for another "free" 32-bit value to be added later.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>