git.git
10 years agot/t5505-remote.sh: use the $( ... ) construct for command substitution
Elia Pinto [Wed, 23 Dec 2015 13:45:53 +0000 (14:45 +0100)]
t/t5505-remote.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t5500-fetch-pack.sh: use the $( ... ) construct for command substitution
Elia Pinto [Wed, 23 Dec 2015 13:45:52 +0000 (14:45 +0100)]
t/t5500-fetch-pack.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t5305-include-tag.sh: use the $( ... ) construct for command substitution
Elia Pinto [Wed, 23 Dec 2015 13:45:51 +0000 (14:45 +0100)]
t/t5305-include-tag.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t5304-prune.sh: use the $( ... ) construct for command substitution
Elia Pinto [Wed, 23 Dec 2015 13:45:50 +0000 (14:45 +0100)]
t/t5304-prune.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t5303-pack-corruption-resilience.sh: use the $( ... ) construct for command substit...
Elia Pinto [Wed, 23 Dec 2015 13:45:49 +0000 (14:45 +0100)]
t/t5303-pack-corruption-resilience.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t5100: no need to use 'echo' command substitutions for globbing
Johannes Sixt [Tue, 22 Dec 2015 18:35:16 +0000 (19:35 +0100)]
t/t5100: no need to use 'echo' command substitutions for globbing

Instead of making the shell expand 00* and invoke 'echo' with it,
and then capturing its output as command substitution, just use
the result of expanding 00* directly.

Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t5302-pack-index.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:27:53 +0000 (16:27 +0100)]
t/t5302-pack-index.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t5301-sliding-window.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:27:52 +0000 (16:27 +0100)]
t/t5301-sliding-window.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t5300-pack-object.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:27:51 +0000 (16:27 +0100)]
t/t5300-pack-object.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t5100-mailinfo.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:27:50 +0000 (16:27 +0100)]
t/t5100-mailinfo.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t3700-add.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:27:49 +0000 (16:27 +0100)]
t/t3700-add.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t3600-rm.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:27:48 +0000 (16:27 +0100)]
t/t3600-rm.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t3511-cherry-pick-x.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:27:47 +0000 (16:27 +0100)]
t/t3511-cherry-pick-x.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t3403-rebase-skip.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:27:46 +0000 (16:27 +0100)]
t/t3403-rebase-skip.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t3210-pack-refs.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:27:45 +0000 (16:27 +0100)]
t/t3210-pack-refs.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t3101-ls-tree-dirname.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:27:44 +0000 (16:27 +0100)]
t/t3101-ls-tree-dirname.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agodir.c: clean the entire struct in clear_exclude_list()
Nguyễn Thái Ngọc Duy [Sun, 27 Dec 2015 01:54:34 +0000 (08:54 +0700)]
dir.c: clean the entire struct in clear_exclude_list()

Make sure "el" can be reuseable again. The problem was el->alloc is
not cleared and may cause segfaults next time because add_exclude()
thinks el->excludes (being NULL) has enough space. Just clear the
entire struct to be safe.

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agogrep: make it clear i-t-a entries are ignored
Nguyễn Thái Ngọc Duy [Sun, 27 Dec 2015 01:51:32 +0000 (08:51 +0700)]
grep: make it clear i-t-a entries are ignored

The expression "!S_ISREG(ce)" covers i-t-a entries as well because
ce->ce_mode would be zero then. I could make a comment saying that, but
it's probably better just to comment with code, in case i-t-a entry
content changes in future.

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agol10n: ru.po: update Russian translation
Dimitriy Ryazantcev [Fri, 25 Dec 2015 12:02:48 +0000 (14:02 +0200)]
l10n: ru.po: update Russian translation

Signed-off-by: Dimitriy Ryazantcev <redacted>
10 years agoMerge branch 'master' of git://github.com/alshopov/git-po
Jiang Xin [Mon, 28 Dec 2015 15:13:15 +0000 (23:13 +0800)]
Merge branch 'master' of git://github.com/alshopov/git-po

* 'master' of git://github.com/alshopov/git-po:
  l10n: Updated Bulgarian translation of git (2477t,0f,0u)

10 years agol10n: Updated Bulgarian translation of git (2477t,0f,0u)
Alexander Shopov [Mon, 28 Dec 2015 09:33:41 +0000 (11:33 +0200)]
l10n: Updated Bulgarian translation of git (2477t,0f,0u)

Signed-off-by: Alexander Shopov <redacted>
10 years agol10n: ca.po: update translation
Alex Henrie [Mon, 28 Dec 2015 04:42:59 +0000 (21:42 -0700)]
l10n: ca.po: update translation

Signed-off-by: Alex Henrie <redacted>
10 years agot/t3100-ls-tree-restrict.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:05:55 +0000 (16:05 +0100)]
t/t3100-ls-tree-restrict.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t3030-merge-recursive.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:05:54 +0000 (16:05 +0100)]
t/t3030-merge-recursive.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t2102-update-index-symlinks.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:05:53 +0000 (16:05 +0100)]
t/t2102-update-index-symlinks.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t2025-worktree-add.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:05:52 +0000 (16:05 +0100)]
t/t2025-worktree-add.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t1700-split-index.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:05:51 +0000 (16:05 +0100)]
t/t1700-split-index.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:05:50 +0000 (16:05 +0100)]
t/t1512-rev-parse-disambiguation.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t1511-rev-parse-caret.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:05:49 +0000 (16:05 +0100)]
t/t1511-rev-parse-caret.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t1410-reflog.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:05:48 +0000 (16:05 +0100)]
t/t1410-reflog.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t1401-symbolic-ref.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:05:47 +0000 (16:05 +0100)]
t/t1401-symbolic-ref.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/t1100-commit-tree-options.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 15:05:46 +0000 (16:05 +0100)]
t/t1100-commit-tree-options.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agounimplemented.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 14:10:32 +0000 (15:10 +0100)]
unimplemented.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agotest-sha1.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 14:10:31 +0000 (15:10 +0100)]
test-sha1.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot/lib-httpd.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 14:10:30 +0000 (15:10 +0100)]
t/lib-httpd.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agogit-gui/po/glossary/txt-to-pot.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 14:10:29 +0000 (15:10 +0100)]
git-gui/po/glossary/txt-to-pot.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agocontrib/thunderbird-patch-inline/appp.sh: use the $( ... ) construct for command...
Elia Pinto [Tue, 22 Dec 2015 14:10:28 +0000 (15:10 +0100)]
contrib/thunderbird-patch-inline/appp.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agocontrib/examples/git-revert.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 14:10:27 +0000 (15:10 +0100)]
contrib/examples/git-revert.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agocontrib/examples/git-repack.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 14:10:26 +0000 (15:10 +0100)]
contrib/examples/git-repack.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agocontrib/examples/git-merge.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 14:10:25 +0000 (15:10 +0100)]
contrib/examples/git-merge.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agocontrib/examples/git-fetch.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 14:10:24 +0000 (15:10 +0100)]
contrib/examples/git-fetch.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agocontrib/examples/git-commit.sh: use the $( ... ) construct for command substitution
Elia Pinto [Tue, 22 Dec 2015 14:10:23 +0000 (15:10 +0100)]
contrib/examples/git-commit.sh: use the $( ... ) construct for command substitution

The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg'  "${_f}"
done

and then carefully proof-read.

Signed-off-by: Elia Pinto <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agol10n: zh_CN: for git v2.7.0 l10n round 2
Jiang Xin [Tue, 22 Dec 2015 15:06:59 +0000 (23:06 +0800)]
l10n: zh_CN: for git v2.7.0 l10n round 2

Update 2 translations (2477t0f0u) for git v2.7.0-rc1.

Signed-off-by: Jiang Xin <redacted>
10 years agoMerge branch 'master' of git://github.com/nafmo/git-l10n-sv
Jiang Xin [Sat, 26 Dec 2015 13:22:30 +0000 (21:22 +0800)]
Merge branch 'master' of git://github.com/nafmo/git-l10n-sv

* 'master' of git://github.com/nafmo/git-l10n-sv:
  l10n: sv.po: Update Swedish translation (2477t0f0u)
  l10n: sv: Fix bad translation

10 years agol10n: sv.po: Update Swedish translation (2477t0f0u)
Peter Krefting [Sat, 26 Dec 2015 11:27:15 +0000 (12:27 +0100)]
l10n: sv.po: Update Swedish translation (2477t0f0u)

Signed-off-by: Peter Krefting <redacted>
10 years agol10n: sv: Fix bad translation
Peter Krefting [Sat, 7 Nov 2015 14:48:20 +0000 (15:48 +0100)]
l10n: sv: Fix bad translation

Found-by: Sebastian Rasmussen <redacted>
Signed-off-by: Peter Krefting <redacted>
10 years agol10n: fr.po v2.7.0 round 2 (2477t)
Jean-Noel Avila [Thu, 24 Dec 2015 06:38:22 +0000 (07:38 +0100)]
l10n: fr.po v2.7.0 round 2 (2477t)

Signed-off-by: Jean-Noel Avila <redacted>
10 years agoGit 2.7-rc2
Junio C Hamano [Tue, 22 Dec 2015 22:46:01 +0000 (14:46 -0800)]
Git 2.7-rc2

Signed-off-by: Junio C Hamano <redacted>
10 years agoMerge branch 'js/emu-write-epipe-on-windows'
Junio C Hamano [Tue, 22 Dec 2015 22:45:16 +0000 (14:45 -0800)]
Merge branch 'js/emu-write-epipe-on-windows'

The write(2) emulation for Windows learned to set errno to EPIPE
when necessary.

* js/emu-write-epipe-on-windows:
  mingw: emulate write(2) that fails with a EPIPE

10 years agopush: don't mark options of recurse-submodules for translation
Ralf Thielow [Tue, 22 Dec 2015 17:53:00 +0000 (18:53 +0100)]
push: don't mark options of recurse-submodules for translation

Signed-off-by: Ralf Thielow <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agogit.c: make sure we do not leak GIT_* to alias scripts
Nguyễn Thái Ngọc Duy [Sun, 20 Dec 2015 07:50:19 +0000 (14:50 +0700)]
git.c: make sure we do not leak GIT_* to alias scripts

The unfortunate commit d95138e (setup: set env $GIT_WORK_TREE when
work tree is set, like $GIT_DIR - 2015-06-26) exposes another problem,
besides git-clone that's described in the previous commit. If
GIT_WORK_TREE (or even GIT_DIR) is exported to an alias script, it may
mislead git commands in the script where the repo is. Granted, most
scripts work on the repo where the alias is summoned from. But nowhere
do we forbid the script to visit another repository.

The revert of d95138e in the previous commit is sufficient as a
fix. However, to protect us from accidentally leaking GIT_*
environment variables again, we restore certain sensitive env before
calling the external script.

GIT_PREFIX is let through because there's another setup side effect
that we simply accepted so far: current working directory is
moved. Maybe in future we can introduce a new alias format that
guarantees no cwd move, then we can unexport GIT_PREFIX.

Reported-by: Gabriel Ganne <redacted>
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agosetup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE when ..
Nguyễn Thái Ngọc Duy [Sun, 20 Dec 2015 07:50:18 +0000 (14:50 +0700)]
setup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE when ..

Commit d95138e [1] attempted to fix a .git file problem by
setting GIT_WORK_TREE whenever GIT_DIR is set. It sounded harmless
because we handle GIT_DIR and GIT_WORK_TREE side by side for most
commands, with two exceptions: git-init and git-clone.

"git clone" is not happy with d95138e. This command ignores GIT_DIR
but respects GIT_WORK_TREE [2] [3] which means it used to run fine
from a hook, where GIT_DIR was set but GIT_WORK_TREE was not (*).
With d95138e, GIT_WORK_TREE is set all the time and git-clone
interprets that as "I give you order to put the worktree here",
usually against the user's intention.

The solution in d95138e is reverted earlier, and instead we reuse
the solution from c056261 [4].  It fixed another setup-messed-
up-by-alias by saving and restoring env and spawning a new process,
but for git-clone and git-init only.

Now we conclude that setup-messed-up-by-alias is always evil. So the
env restoration is done for _all_ commands, including external ones,
whenever aliases are involved. It fixes what d95138e tried to fix,
without upsetting git-clone-inside-hooks.

The test from d95138e remains to verify it's not broken by this. A new
test is added to make sure git-clone-inside-hooks remains happy.

(*) GIT_WORK_TREE was not set _most of the time_. In some cases
    GIT_WORK_TREE is set and git-clone will behave differently. The
    use of GIT_WORK_TREE to direct git-clone to put work tree
    elsewhere looks like a mistake because it causes surprises this
    way. But that's a separate story.

[1] d95138e (setup: set env $GIT_WORK_TREE when work tree is set, like
             $GIT_DIR - 2015-06-26)
[2] 2beebd2 (clone: create intermediate directories of destination
             repo - 2008-06-25)
[3] 20ccef4 (make git-clone GIT_WORK_TREE aware - 2007-07-06)
[4] c056261 (git potty: restore environments after alias expansion -
             2014-06-08)

Reported-by: Anthony Sottile <redacted>
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agogit.c: make it clear save_env() is for alias handling only
Nguyễn Thái Ngọc Duy [Thu, 3 Dec 2015 18:17:55 +0000 (19:17 +0100)]
git.c: make it clear save_env() is for alias handling only

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agoMerge branch 'nd/stop-setenv-work-tree' into nd/clear-gitenv-upon-use-of-alias
Junio C Hamano [Tue, 22 Dec 2015 21:39:47 +0000 (13:39 -0800)]
Merge branch 'nd/stop-setenv-work-tree' into nd/clear-gitenv-upon-use-of-alias

* nd/stop-setenv-work-tree:
  Revert "setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR"

10 years agoRevert "setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR"
Nguyễn Thái Ngọc Duy [Mon, 21 Dec 2015 10:22:52 +0000 (17:22 +0700)]
Revert "setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR"

This reverts d95138e6 (setup: set env $GIT_WORK_TREE when work tree
is set, like $GIT_DIR, 2015-06-26).

It has caused three regression reports so far.

  http://article.gmane.org/gmane.comp.version-control.git/281608
  http://article.gmane.org/gmane.comp.version-control.git/281979
  http://article.gmane.org/gmane.comp.version-control.git/282691

All of them are about spawning git subprocesses, where the new
presence of GIT_WORK_TREE either changes command behaviour (git-init
or git-clone), or how repo/worktree is detected (from aliases), with
or without $GIT_DIR.

The original bug will be re-fixed another way.

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agol10n: git.pot: v2.7.0 round 2 (2 new, 2 removed)
Jiang Xin [Tue, 22 Dec 2015 14:51:43 +0000 (22:51 +0800)]
l10n: git.pot: v2.7.0 round 2 (2 new, 2 removed)

Generate po/git.pot from v2.7.0-rc1-44-g1d88dab for git v2.7.0 l10n round 2.

Signed-off-by: Jiang Xin <redacted>
10 years agoMerge branch 'master' of git://github.com/git-l10n/git-po
Jiang Xin [Tue, 22 Dec 2015 14:50:24 +0000 (22:50 +0800)]
Merge branch 'master' of git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
  l10n: zh_CN: for git v2.7.0 l10n round 1
  l10n: ca.po: update translation
  l10n: fr v2.7.0 round 1 (2477t)
  l10n: Updated Bulgarian translation of git (2477t,0f,0u)
  l10n: sv.po: Update Swedish translation (2477t0f0u)
  l10n: vi.po: Updated translation (2477t)
  l10n: git.pot: v2.7.0 round 1 (66 new, 29 removed)
  l10n: fr.po: Fix typo
  l10n: fr.po: Fix typo

10 years agopack-revindex: store entries directly in packed_git
Jeff King [Mon, 21 Dec 2015 06:20:33 +0000 (01:20 -0500)]
pack-revindex: store entries directly in packed_git

A pack_revindex struct has two elements: the revindex
entries themselves, and a pointer to the packed_git. We need
both to do lookups, because only the latter knows things
like the number of objects in the pack.

Now that packed_git contains the pack_revindex struct it's
just as easy to pass around the packed_git itself, and we do
not need the extra back-pointer.

We can instead just store the entries directly in the pack.
All functions which took a pack_revindex now just take a
packed_git. We still lazy-load in find_pack_revindex, so
most callers are unaffected.

The exception is the bitmap code, which computes the
revindex and caches the pointer when we load the bitmaps. We
can continue to load, drop the extra cache pointer, and just
access bitmap_git.pack.revindex directly.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agopack-revindex: drop hash table
Jeff King [Mon, 21 Dec 2015 06:19:49 +0000 (01:19 -0500)]
pack-revindex: drop hash table

The main entry point to the pack-revindex code is
find_pack_revindex(). This calls revindex_for_pack(), which
lazily computes and caches the revindex for the pack.

We store the cache in a very simple hash table. It's created
by init_pack_revindex(), which inserts an entry for every
packfile we know about, and we never grow or shrink the
hash. If we ever need the revindex for a pack that isn't in
the hash, we die() with an internal error.

This can lead to a race, because we may load more packs
after having called init_pack_revindex(). For example,
imagine we have one process which needs to look at the
revindex for a variety of objects (e.g., cat-file's
"%(objectsize:disk)" format).  Simultaneously, git-gc is
running, which is doing a `git repack -ad`. We might hit a
sequence like:

  1. We need the revidx for some packed object. We call
     find_pack_revindex() and end up in init_pack_revindex()
     to create the hash table for all packs we know about.

  2. We look up another object and can't find it, because
     the repack has removed the pack it's in. We re-scan the
     pack directory and find a new pack containing the
     object. It gets added to our packed_git list.

  3. We call find_pack_revindex() for the new object, which
     hits revindex_for_pack() for our new pack. It can't
     find the packed_git in the revindex hash, and dies.

You could also replace the `repack` above with a push or
fetch to create a new pack, though these are less likely
(you would have to somehow learn about the new objects to
look them up).

Prior to 1a6d8b9 (do not discard revindex when re-preparing
packfiles, 2014-01-15), this was safe, as we threw away the
revindex whenever we re-scanned the pack directory (and thus
re-created the revindex hash on the fly). However, we don't
want to simply revert that commit, as it was solving a
different race.

So we have a few options:

  - We can fix the race in 1a6d8b9 differently, by having
    the bitmap code look in the revindex hash instead of
    caching the pointer. But this would introduce a lot of
    extra hash lookups for common bitmap operations.

  - We could teach the revindex to dynamically add new packs
    to the hash table. This would perform the same, but
    would mean adding extra code to the revindex hash (which
    currently cannot be resized at all).

  - We can get rid of the hash table entirely. There is
    exactly one revindex per pack, so we can just store it
    in the packed_git struct. Since it's initialized lazily,
    it does not add to the startup cost.

    This is the best of both worlds: less code and fewer
    hash table lookups.  The original code likely avoided
    this in the name of encapsulation. But the packed_git
    and reverse_index code are fairly intimate already, so
    it's not much of a loss.

This patch implements the final option. It's a minimal
conversion that retains the pack_revindex struct. No callers
need to change, and we can do further cleanup in a follow-on
patch.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agot1401: test reflog creation for git-symbolic-ref
Jeff King [Sun, 20 Dec 2015 07:27:23 +0000 (02:27 -0500)]
t1401: test reflog creation for git-symbolic-ref

The current code writes a reflog entry whenever we update a
symbolic ref, but we never test that this is so. Let's add a
test to make sure upcoming refactoring doesn't cause a
regression.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agosymbolic-ref: propagate error code from create_symref()
Jeff King [Sun, 20 Dec 2015 07:27:18 +0000 (02:27 -0500)]
symbolic-ref: propagate error code from create_symref()

If create_symref() fails, git-symbolic-ref will still exit
with code 0, and our caller has no idea that the command did
nothing.

This appears to have been broken since the beginning of time
(e.g., it is not a regression where create_symref() stopped
calling die() or something similar).

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agogit-p4: reduce number of server queries for fetches
Sam Hocevar [Sat, 19 Dec 2015 09:39:40 +0000 (09:39 +0000)]
git-p4: reduce number of server queries for fetches

When fetching changes from a depot using a full client spec, there
is no need to perform as many queries as there are top-level paths
in the client spec.  Instead we query all changes in chronological
order, also getting rid of the need to sort the results and remove
duplicates.

Signed-off-by: Sam Hocevar <redacted>
Signed-off-by: Luke Diamand <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agogit-p4: support multiple depot paths in p4 submit
Sam Hocevar [Sat, 19 Dec 2015 09:39:39 +0000 (09:39 +0000)]
git-p4: support multiple depot paths in p4 submit

When submitting from a repository that was cloned using a client spec,
use the full list of paths when ruling out files that are outside the
view.  This fixes a bug where only files pertaining to the first path
would be included in the p4 submit.

Signed-off-by: Sam Hocevar <redacted>
Signed-off-by: Luke Diamand <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agoUpdate release notes to 2.7
Junio C Hamano [Mon, 21 Dec 2015 19:08:20 +0000 (11:08 -0800)]
Update release notes to 2.7

Signed-off-by: Junio C Hamano <redacted>
10 years agoMerge branch 'bc/format-patch-null-from-line'
Junio C Hamano [Mon, 21 Dec 2015 18:59:07 +0000 (10:59 -0800)]
Merge branch 'bc/format-patch-null-from-line'

"format-patch" has learned a new option to zero-out the commit
object name on the mbox "From " line.

* bc/format-patch-null-from-line:
  format-patch: check that header line has expected format
  format-patch: add an option to suppress commit hash
  sha1_file.c: introduce a null_oid constant

10 years agoMerge branch 'jk/ident-loosen-getpwuid'
Junio C Hamano [Mon, 21 Dec 2015 18:59:07 +0000 (10:59 -0800)]
Merge branch 'jk/ident-loosen-getpwuid'

When getpwuid() on the system returned NULL (e.g. the user is not
in the /etc/passwd file or other uid-to-name mappings), the
codepath to find who the user is to record it in the reflog barfed
and died.  Loosen the check in this codepath, which already accepts
questionable ident string (e.g. host part of the e-mail address is
obviously bogus), and in general when we operate fmt_ident() function
in non-strict mode.

* jk/ident-loosen-getpwuid:
  ident: loosen getpwuid error in non-strict mode
  ident: keep a flag for bogus default_email
  ident: make xgetpwuid_self() a static local helper

10 years agoMerge branch 'jk/send-email-ssl-errors'
Junio C Hamano [Mon, 21 Dec 2015 18:59:06 +0000 (10:59 -0800)]
Merge branch 'jk/send-email-ssl-errors'

Improve error reporting when SMTP TLS fails.

* jk/send-email-ssl-errors:
  send-email: enable SSL level 1 debug output

10 years agoMerge branch 'sg/completion-no-column'
Junio C Hamano [Mon, 21 Dec 2015 18:59:06 +0000 (10:59 -0800)]
Merge branch 'sg/completion-no-column'

The completion script (in contrib/) used to list "git column"
(which is not an end-user facing command) as one of the choices

* sg/completion-no-column:
  completion: remove 'git column' from porcelain commands

10 years agoMerge branch 'mc/push-recurse-submodules-config'
Junio C Hamano [Mon, 21 Dec 2015 18:59:05 +0000 (10:59 -0800)]
Merge branch 'mc/push-recurse-submodules-config'

Add new config to avoid typing "--recurse-submodules" on each push.

* mc/push-recurse-submodules-config:
  push: follow the "last one wins" convention for --recurse-submodules
  push: test that --recurse-submodules on command line overrides config
  push: add recurseSubmodules config option

10 years agomingw: emulate write(2) that fails with a EPIPE
Johannes Schindelin [Thu, 17 Dec 2015 17:08:15 +0000 (18:08 +0100)]
mingw: emulate write(2) that fails with a EPIPE

On Windows, when writing to a pipe fails, errno is always
EINVAL. However, Git expects it to be EPIPE.

According to the documentation, there are two cases in which write()
triggers EINVAL: the buffer is NULL, or the length is odd but the mode
is 16-bit Unicode (the broken pipe is not mentioned as possible cause).
Git never sets the file mode to anything but binary, therefore we know
that errno should actually be EPIPE if it is EINVAL and the buffer is
not NULL.

See https://msdn.microsoft.com/en-us/library/1570wh78.aspx for more
details.

This works around t5571.11 failing with v2.6.4 on Windows.

Signed-off-by: Johannes Schindelin <redacted>
Acked-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agoMerge git://ozlabs.org/~paulus/gitk
Junio C Hamano [Mon, 21 Dec 2015 16:56:16 +0000 (08:56 -0800)]
Merge git://ozlabs.org/~paulus/gitk

* git://ozlabs.org/~paulus/gitk:
  gitk: sv.po: Update Swedish translation (311t)
  gitk: Let .bleft.mid widgets 'breathe'
  gitk: Match ttk fonts to gitk fonts
  gitk: Update revision date in Japanese PO file
  gitk: Update "Language:" header
  gitk: Improve translation message
  gitk: Remove unused line
  gitk: Update year
  gitk: Change last translator line
  gitk: Update fuzzy messages
  gitk: Update Japanese translation
  gitk: Fix translation around copyright sign
  gitk: Update Japanese translation
  gitk: Fix wrong translation
  gitk: Translate Japanese catalog
  gitk: Translate more to Japanese catalog
  gitk: Update Japanese message catalog
  gitk: Re-sync line number in Japanese message catalogue
  gitk: Color name update

10 years agol10n: zh_CN: for git v2.7.0 l10n round 1
Jiang Xin [Sun, 15 Nov 2015 23:02:11 +0000 (07:02 +0800)]
l10n: zh_CN: for git v2.7.0 l10n round 1

Update 66 translations (2477t0f0u) for git v2.7.0-rc0.

Reviewed-by: Ray Chen <redacted>
Signed-off-by: Jiang Xin <redacted>
10 years agoMerge branch 'master' of git://github.com/alexhenrie/git-po
Jiang Xin [Sun, 20 Dec 2015 11:32:26 +0000 (19:32 +0800)]
Merge branch 'master' of git://github.com/alexhenrie/git-po

* 'master' of git://github.com/alexhenrie/git-po:
  l10n: ca.po: update translation

10 years agoMerge branch 'fr_v2.7.0' of git://github.com/jnavila/git
Jiang Xin [Sun, 20 Dec 2015 11:31:47 +0000 (19:31 +0800)]
Merge branch 'fr_v2.7.0' of git://github.com/jnavila/git

* 'fr_v2.7.0' of git://github.com/jnavila/git:
  l10n: fr v2.7.0 round 1 (2477t)

10 years agoMerge branch 'master' of git://github.com/alshopov/git-po
Jiang Xin [Sun, 20 Dec 2015 11:30:52 +0000 (19:30 +0800)]
Merge branch 'master' of git://github.com/alshopov/git-po

* 'master' of git://github.com/alshopov/git-po:
  l10n: Updated Bulgarian translation of git (2477t,0f,0u)

10 years agol10n: ca.po: update translation
Alex Henrie [Sat, 19 Dec 2015 06:38:23 +0000 (23:38 -0700)]
l10n: ca.po: update translation

Signed-off-by: Alex Henrie <redacted>
10 years agoMerge branch 'ja.po' of https://github.com/qykth-git/gitk
Paul Mackerras [Sat, 19 Dec 2015 02:33:16 +0000 (13:33 +1100)]
Merge branch 'ja.po' of https://github.com/qykth-git/gitk

10 years agoMerge branch 'color-fix' of https://github.com/qykth-git/gitk
Paul Mackerras [Sat, 19 Dec 2015 02:29:35 +0000 (13:29 +1100)]
Merge branch 'color-fix' of https://github.com/qykth-git/gitk

10 years agol10n: fr v2.7.0 round 1 (2477t)
Jean-Noel Avila [Fri, 18 Dec 2015 21:00:37 +0000 (22:00 +0100)]
l10n: fr v2.7.0 round 1 (2477t)

Signed-off-by: Jean-Noel Avila <redacted>
10 years agol10n: Updated Bulgarian translation of git (2477t,0f,0u)
Alexander Shopov [Sun, 13 Dec 2015 16:55:45 +0000 (18:55 +0200)]
l10n: Updated Bulgarian translation of git (2477t,0f,0u)

Signed-off-by: Alexander Shopov <redacted>
10 years agol10n: sv.po: Update Swedish translation (2477t0f0u)
Peter Krefting [Fri, 18 Dec 2015 08:09:41 +0000 (09:09 +0100)]
l10n: sv.po: Update Swedish translation (2477t0f0u)

Signed-off-by: Peter Krefting <redacted>
10 years agorevision.c: propagate tag names from pending array
Jeff King [Thu, 17 Dec 2015 06:47:07 +0000 (01:47 -0500)]
revision.c: propagate tag names from pending array

When we unwrap a tag to find its commit for a traversal, we
do not propagate the "name" field of the tag in the pending
array (i.e., the ref name the user gave us in the first
place) to the commit (instead, we use an empty string). This
means that "git log --source" will never show the tag-name
for commits we reach through it.

This was broken in 2073949 (traverse_commit_list: support
pending blobs/trees with paths, 2014-10-15). That commit
tried to be careful and avoid propagating the path
information for a tag (which would be nonsensical) to trees
and blobs. But it should not have cut off the "name" field,
which should carry forward to children.

Note that this does mean that the "name" field will carry
forward to blobs and trees, too. Whereas prior to 2073949,
we always gave them an empty string. This is the right thing
to do, but in practice no callers probably use it (since now
we have an explicit separate "path" field, which was the
point of 2073949).

We add tests here not only for the broken case, but also a
basic sanity test of "log --source" in general, which did
not have any coverage in the test suite.

Reported-by: Raymundo <redacted>
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agoMerge branch 'fr/rebase-i-continue-preserve-options'
Junio C Hamano [Wed, 16 Dec 2015 22:42:52 +0000 (14:42 -0800)]
Merge branch 'fr/rebase-i-continue-preserve-options'

"git rebase -i" started with merge strategy options did not
propagate them upon "git rebase --continue".

* fr/rebase-i-continue-preserve-options:
  rebase -i: remember merge options beyond continue actions

10 years agoMerge branch 'maint'
Junio C Hamano [Wed, 16 Dec 2015 22:40:30 +0000 (14:40 -0800)]
Merge branch 'maint'

* maint:
  credential-store: don't pass strerror to die_errno()

10 years agopush: add '-d' as shorthand for '--delete'
Patrick Steinhardt [Mon, 14 Dec 2015 15:23:04 +0000 (16:23 +0100)]
push: add '-d' as shorthand for '--delete'

"git push" takes "--delete" but does not take a short form "-d",
unlike "git branch" which does take both.  Bring consistency
between them.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agosubmodules: allow parallel fetching, add tests and documentation
Stefan Beller [Wed, 16 Dec 2015 00:04:12 +0000 (16:04 -0800)]
submodules: allow parallel fetching, add tests and documentation

This enables the work of the previous patches.

Signed-off-by: Stefan Beller <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agofetch_populated_submodules: use new parallel job processing
Stefan Beller [Wed, 16 Dec 2015 00:04:11 +0000 (16:04 -0800)]
fetch_populated_submodules: use new parallel job processing

In a later patch we enable parallel processing of submodules, this
only adds the possibility for it. So this change should not change
any user facing behavior.

Signed-off-by: Stefan Beller <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agorun-command: add an asynchronous parallel child processor
Stefan Beller [Wed, 16 Dec 2015 00:04:10 +0000 (16:04 -0800)]
run-command: add an asynchronous parallel child processor

This allows to run external commands in parallel with ordered output
on stderr.

If we run external commands in parallel we cannot pipe the output directly
to the our stdout/err as it would mix up. So each process's output will
flow through a pipe, which we buffer. One subprocess can be directly
piped to out stdout/err for a low latency feedback to the user.

Example:
Let's assume we have 5 submodules A,B,C,D,E and each fetch takes a
different amount of time as the different submodules vary in size, then
the output of fetches in sequential order might look like this:

 time -->
 output: |---A---| |-B-| |-------C-------| |-D-| |-E-|

When we schedule these submodules into maximal two parallel processes,
a schedule and sample output over time may look like this:

process 1: |---A---| |-D-| |-E-|

process 2: |-B-| |-------C-------|

output:    |---A---|B|---C-------|DE

So A will be perceived as it would run normally in the single child
version. As B has finished by the time A is done, we can dump its whole
progress buffer on stderr, such that it looks like it finished in no
time. Once that is done, C is determined to be the visible child and
its progress will be reported in real time.

So this way of output is really good for human consumption, as it only
changes the timing, not the actual output.

For machine consumption the output needs to be prepared in the tasks,
by either having a prefix per line or per block to indicate whose tasks
output is displayed, because the output order may not follow the
original sequential ordering:

 |----A----| |--B--| |-C-|

will be scheduled to be all parallel:

process 1: |----A----|
process 2: |--B--|
process 3: |-C-|
output:    |----A----|CB

This happens because C finished before B did, so it will be queued for
output before B.

To detect when a child has finished executing, we check interleaved
with other actions (such as checking the liveliness of children or
starting new processes) whether the stderr pipe still exists. Once a
child closed its stderr stream, we assume it is terminating very soon,
and use `finish_command()` from the single external process execution
interface to collect the exit status.

By maintaining the strong assumption of stderr being open until the
very end of a child process, we can avoid other hassle such as an
implementation using `waitpid(-1)`, which is not implemented in Windows.

Signed-off-by: Stefan Beller <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agosigchain: add command to pop all common signals
Stefan Beller [Wed, 16 Dec 2015 00:04:09 +0000 (16:04 -0800)]
sigchain: add command to pop all common signals

The new method removes all common signal handlers that were installed
by sigchain_push.

CC: Jeff King <redacted>
Signed-off-by: Stefan Beller <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agostrbuf: add strbuf_read_once to read without blocking
Stefan Beller [Wed, 16 Dec 2015 00:04:08 +0000 (16:04 -0800)]
strbuf: add strbuf_read_once to read without blocking

The new call will read from a file descriptor into a strbuf once. The
underlying call xread is just run once. xread only reattempts
reading in case of EINTR, which makes it suitable to use for a
nonblocking read.

Signed-off-by: Stefan Beller <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agoxread: poll on non blocking fds
Stefan Beller [Wed, 16 Dec 2015 00:04:07 +0000 (16:04 -0800)]
xread: poll on non blocking fds

The man page of read(2) says:

  EAGAIN The file descriptor fd refers to a file other than a socket
 and has been marked nonblocking (O_NONBLOCK), and the read
 would block.

  EAGAIN or EWOULDBLOCK
 The file descriptor fd refers to a socket and has been marked
 nonblocking (O_NONBLOCK), and the read would block.  POSIX.1-2001
 allows either error to be returned for this case, and does not
 require these constants to have the same value, so a portable
 application should check for both possibilities.

If we get an EAGAIN or EWOULDBLOCK the fd must have set O_NONBLOCK.
As the intent of xread is to read as much as possible either until the
fd is EOF or an actual error occurs, we can ease the feeder of the fd
by not spinning the whole time, but rather wait for it politely by not
busy waiting.

We should not care if the call to poll failed, as we're in an infinite
loop and can only get out with the correct read().

Signed-off-by: Stefan Beller <redacted>
Acked-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agosubmodule.c: write "Fetching submodule <foo>" to stderr
Jonathan Nieder [Wed, 16 Dec 2015 00:04:06 +0000 (16:04 -0800)]
submodule.c: write "Fetching submodule <foo>" to stderr

The "Pushing submodule <foo>" progress output correctly goes to
stderr, but "Fetching submodule <foo>" is going to stdout by
mistake.  Fix it to write to stderr.

Noticed while trying to implement a parallel submodule fetch.  When
this particular output line went to a different file descriptor, it
was buffered separately, resulting in wrongly interleaved output if
we copied it to the terminal naively.

Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Stefan Beller <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agogrep: add --threads=<num> option and grep.threads configuration
Victor Leschuk [Tue, 15 Dec 2015 15:31:39 +0000 (18:31 +0300)]
grep: add --threads=<num> option and grep.threads configuration

"git grep" can now be configured (or told from the command line) how
many threads to use when searching in the working tree files.

Signed-off-by: Victor Leschuk <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agoMakefile: add missing phony target
Elia Pinto [Tue, 15 Dec 2015 15:21:00 +0000 (15:21 +0000)]
Makefile: add missing phony target

Add some missing phony target to Makefile.

Signed-off-by: Elia Pinto <redacted>
Helped-by: Matthieu Moy <redacted>
Reviewed-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agoMerge branch 'sg/lock-file-commit-error' into maint
Junio C Hamano [Wed, 16 Dec 2015 18:27:22 +0000 (10:27 -0800)]
Merge branch 'sg/lock-file-commit-error' into maint

* sg/lock-file-commit-error:
  credential-store: don't pass strerror to die_errno()

10 years agocredential-store: don't pass strerror to die_errno()
SZEDER Gábor [Wed, 16 Dec 2015 11:22:55 +0000 (12:22 +0100)]
credential-store: don't pass strerror to die_errno()

Signed-off-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agoblame: add support for --[no-]progress option
Edmundo Carmona Antoranz [Sun, 13 Dec 2015 00:51:03 +0000 (18:51 -0600)]
blame: add support for --[no-]progress option

Teach the command to show progress output when it takes long time to
produce the first line of output; this option cannot be used with
"--incremental" or "--porcelain" options.

git-annotate inherits the option as well.

Helped-by: Eric Sunshine <redacted>
Signed-off-by: Edmundo Carmona Antoranz <redacted>
Reviewed-by: Eric Sunshine <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agogrep: slight refactoring to the code that disables threading
Victor Leschuk [Tue, 15 Dec 2015 15:31:39 +0000 (18:31 +0300)]
grep: slight refactoring to the code that disables threading

When show-in-pager option is used, threading is unconditionally
disabled, but this happened much earlier than the code that
determines the use of threading based on the operand (i.e. we do not
thread search in the object database).  Consolidate the code to
disable threading to just one place.

Signed-off-by: Victor Leschuk <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agogrep: allow threading even on a single-core machine
Victor Leschuk [Tue, 15 Dec 2015 15:31:39 +0000 (18:31 +0300)]
grep: allow threading even on a single-core machine

Earlier we disabled threading when online_cpus() said "1", but on a
filesystem with long latency (or in a cold cache situation), using
multiple threads to drive I/O in parallel would improve performance
even on a single-core machines.

Signed-off-by: Victor Leschuk <redacted>
Signed-off-by: Junio C Hamano <redacted>
10 years agoformat-patch: check that header line has expected format
brian m. carlson [Tue, 15 Dec 2015 01:52:05 +0000 (01:52 +0000)]
format-patch: check that header line has expected format

The format of the "From " header line is very specific to allow
utilities to detect Git-style patches.  Add a test that the patches
created are in the expected format.

Signed-off-by: brian m. carlson <redacted>
Signed-off-by: Junio C Hamano <redacted>
git clone https://git.99rst.org/PROJECT