]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
11 years agowildmatch: make dowild() take arbitrary flags
Nguyễn Thái Ngọc Duy [Tue, 1 Jan 2013 02:44:06 +0000 (09:44 +0700)] 
wildmatch: make dowild() take arbitrary flags

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowildmatch: rename constants and update prototype
Nguyễn Thái Ngọc Duy [Tue, 1 Jan 2013 02:44:05 +0000 (09:44 +0700)] 
wildmatch: rename constants and update prototype

- All exported constants now have a prefix WM_
- Do not rely on FNM_* constants, use the WM_ counterparts
- Remove TRUE and FALSE to follow Git's coding style
- While at it, turn flags type from int to unsigned int
- Add an (unused yet) argument to carry extra information
  so that we don't have to change the prototype again later
  when we need to pass other stuff to wildmatch

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowildmatch: replace variable 'special' with better named ones
Nguyễn Thái Ngọc Duy [Tue, 1 Jan 2013 02:44:04 +0000 (09:44 +0700)] 
wildmatch: replace variable 'special' with better named ones

'special' is too generic and is used for two different purposes.
Replace it with 'match_slash' to indicate "**" pattern and 'negated'
for "[!...]" and "[^...]".

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocompat/fnmatch: respect NO_FNMATCH* even on glibc
Nguyễn Thái Ngọc Duy [Tue, 1 Jan 2013 02:44:03 +0000 (09:44 +0700)] 
compat/fnmatch: respect NO_FNMATCH* even on glibc

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowildmatch: fix "**" special case
Nguyễn Thái Ngọc Duy [Tue, 1 Jan 2013 02:44:02 +0000 (09:44 +0700)] 
wildmatch: fix "**" special case

"**" is adjusted to only be effective when surrounded by slashes, in
40bbee0 (wildmatch: adjust "**" behavior - 2012-10-15). Except that
the commit did it wrong:

1. when it checks for "the preceding slash unless ** is at the
   beginning", it compares to wrong pointer. It should have compared
   to the beginning of the pattern, not the text.

2. prev_p points to the character before "**", not the first "*". The
   correct comparison must be "prev_p < pattern" or
   "prev_p + 1 == pattern", not "prev_p == pattern".

3. The pattern must be surrounded by slashes unless it's at the
   beginning or the end of the pattern. We do two checks: one for the
   preceding slash and one the trailing slash. Both checks must be
   met. The use of "||" is wrong.

This patch fixes all above.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot3070: Disable some failing fnmatch tests
Ramsay Jones [Sat, 15 Dec 2012 19:19:18 +0000 (19:19 +0000)] 
t3070: Disable some failing fnmatch tests

The failing tests make use of a POSIX character class, '[:xdigit:]'
in this case, which some versions of the fnmatch() library function
do not support. In the spirit of commit f1cf7b79 ("t3070: disable
unreliable fnmatch tests", 15-10-2012), we disable the fnmatch() half
of these tests.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agotest-wildmatch: avoid Windows path mangling
Nguyễn Thái Ngọc Duy [Tue, 20 Nov 2012 07:02:39 +0000 (08:02 +0100)] 
test-wildmatch: avoid Windows path mangling

The MSYS bash mangles arguments that begin with a forward slash
when they are passed to test-wildmatch. This causes tests to fail.
Avoid mangling by prepending "XXX", which is removed by
test-wildmatch before further processing.

[J6t: reworded commit message]

Reported-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
11 years agoSupport "**" wildcard in .gitignore and .gitattributes
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:26:02 +0000 (13:26 +0700)] 
Support "**" wildcard in .gitignore and .gitattributes

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowildmatch: make /**/ match zero or more directories
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:26:01 +0000 (13:26 +0700)] 
wildmatch: make /**/ match zero or more directories

"foo/**/bar" matches "foo/x/bar", "foo/x/y/bar"... but not
"foo/bar". We make a special case, when foo/**/ is detected (and
"foo/" part is already matched), try matching "bar" with the rest of
the string.

"Match one or more directories" semantics can be easily achieved using
"foo/*/**/bar".

This also makes "**/foo" match "foo" in addition to "x/foo",
"x/y/foo"..

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowildmatch: adjust "**" behavior
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:26:00 +0000 (13:26 +0700)] 
wildmatch: adjust "**" behavior

Standard wildmatch() sees consecutive asterisks as "*" that can also
match slashes. But that may be hard to explain to users as
"abc/**/def" can match "abcdef", "abcxyzdef", "abc/def", "abc/x/def",
"abc/x/y/def"...

This patch changes wildmatch so that users can do

- "**/def" -> all paths ending with file/directory 'def'
- "abc/**" - equivalent to "/abc/"
- "abc/**/def" -> "abc/x/def", "abc/x/y/def"...
- otherwise consider the pattern malformed if "**" is found

Basically the magic of "**" only remains if it's wrapped around by
slashes.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowildmatch: fix case-insensitive matching
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:25:59 +0000 (13:25 +0700)] 
wildmatch: fix case-insensitive matching

dowild() does case insensitive matching by lower-casing the text. That
means lower case letters in patterns imply case-insensitive matching,
but upper case means exact matching.

We do not want that subtlety. Lower case pattern too so iwildmatch()
always does what we expect it to do.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowildmatch: remove static variable force_lower_case
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:25:58 +0000 (13:25 +0700)] 
wildmatch: remove static variable force_lower_case

One place less to worry about thread safety. Also combine wildmatch
and iwildmatch into one.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowildmatch: make wildmatch's return value compatible with fnmatch
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:25:57 +0000 (13:25 +0700)] 
wildmatch: make wildmatch's return value compatible with fnmatch

wildmatch returns non-zero if matched, zero otherwise. This patch
makes it return zero if matches, non-zero otherwise, like fnmatch().

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot3070: disable unreliable fnmatch tests
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:25:56 +0000 (13:25 +0700)] 
t3070: disable unreliable fnmatch tests

These tests show different results on different fnmatch() versions. We
don't want to test fnmatch here. We want to make sure wildmatch
behavior matches fnmatch and that only makes sense in cases when
fnmatch() behaves consistently.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoIntegrate wildmatch to git
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:25:55 +0000 (13:25 +0700)] 
Integrate wildmatch to git

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowildmatch: follow Git's coding convention
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:25:54 +0000 (13:25 +0700)] 
wildmatch: follow Git's coding convention

wildmatch's coding style is pretty close to Git's except the use of 4
space indentation instead of 8. This patch should produce empty diff
with "git diff -b"

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agowildmatch: remove unnecessary functions
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:25:53 +0000 (13:25 +0700)] 
wildmatch: remove unnecessary functions

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoImport wildmatch from rsync
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:25:52 +0000 (13:25 +0700)] 
Import wildmatch from rsync

These files are from rsync.git commit
f92f5b166e3019db42bc7fe1aa2f1a9178cd215d, which was the last commit
before rsync turned GPL-3. All files are imported as-is and
no-op. Adaptation is done in a separate patch.

rsync.git           ->  git.git
lib/wildmatch.[ch]      wildmatch.[ch]
wildtest.txt            t/t3070/wildtest.txt

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoctype: support iscntrl, ispunct, isxdigit and isprint
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:25:51 +0000 (13:25 +0700)] 
ctype: support iscntrl, ispunct, isxdigit and isprint

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoctype: make sane_ctype[] const array
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:25:50 +0000 (13:25 +0700)] 
ctype: make sane_ctype[] const array

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoattr: more matching optimizations from .gitignore
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:24:39 +0000 (13:24 +0700)] 
attr: more matching optimizations from .gitignore

.gitattributes and .gitignore share the same pattern syntax but has
separate matching implementation. Over the years, ignore's
implementation accumulates more optimizations while attr's stays the
same.

This patch reuses the core matching functions that are also used by
excluded_from_list. excluded_from_list and path_matches can't be
merged due to differences in exclude and attr, for example:

* "!pattern" syntax is forbidden in .gitattributes.  As an attribute
  can be unset (i.e. set to a special value "false") or made back to
  unspecified (i.e. not even set to "false"), "!pattern attr" is unclear
  which one it means.

* we support attaching attributes to directories, but git-core
  internally does not currently make use of attributes on
  directories.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogitignore: make pattern parsing code a separate function
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:24:38 +0000 (13:24 +0700)] 
gitignore: make pattern parsing code a separate function

This function can later be reused by attr.c. Also turn to_exclude
field into a flag.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoexclude: split pathname matching code into a separate function
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:24:37 +0000 (13:24 +0700)] 
exclude: split pathname matching code into a separate function

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoexclude: fix a bug in prefix compare optimization
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:24:36 +0000 (13:24 +0700)] 
exclude: fix a bug in prefix compare optimization

When "namelen" becomes zero at this stage, we have matched the fixed
part, but whether it actually matches the pattern still depends on the
pattern in "exclude". As demonstrated in t3001, path "three/a.3"
exists and it matches the "three/a.3" part in pattern "three/a.3[abc]",
but that does not mean a true match.

Don't be too optimistic and let fnmatch() do the job.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoexclude: split basename matching code into a separate function
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:24:35 +0000 (13:24 +0700)] 
exclude: split basename matching code into a separate function

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoexclude: stricten a length check in EXC_FLAG_ENDSWITH case
Nguyễn Thái Ngọc Duy [Mon, 15 Oct 2012 06:24:34 +0000 (13:24 +0700)] 
exclude: stricten a length check in EXC_FLAG_ENDSWITH case

This block of code deals with the "basename" part only, which has the
length of "pathlen - (basename - pathname)". Stricten the length check
and remove "pathname" from the main expression to avoid confusion.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge commit 'f9f6e2c' into nd/attr-match-optim-more
Junio C Hamano [Fri, 5 Oct 2012 19:45:30 +0000 (12:45 -0700)] 
Merge commit 'f9f6e2c' into nd/attr-match-optim-more

* commit 'f9f6e2c':
  exclude: do strcmp as much as possible before fnmatch
  dir.c: get rid of the wildcard symbol set in no_wildcard()
  Unindent excluded_from_list()

11 years agoattr: avoid searching for basename on every match
Nguyễn Thái Ngọc Duy [Fri, 5 Oct 2012 04:41:02 +0000 (11:41 +0700)] 
attr: avoid searching for basename on every match

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoattr: avoid strlen() on every match
Nguyễn Thái Ngọc Duy [Fri, 5 Oct 2012 04:41:01 +0000 (11:41 +0700)] 
attr: avoid strlen() on every match

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoGit 1.7.11.7 v1.7.11.7
Junio C Hamano [Sat, 15 Sep 2012 03:57:23 +0000 (20:57 -0700)] 
Git 1.7.11.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jk/maint-quiet-is-synonym-to-s-in-log' into maint-1.7.11
Junio C Hamano [Sat, 15 Sep 2012 03:48:31 +0000 (20:48 -0700)] 
Merge branch 'jk/maint-quiet-is-synonym-to-s-in-log' into maint-1.7.11

* jk/maint-quiet-is-synonym-to-s-in-log:
  log: fix --quiet synonym for -s

11 years agoMerge branch 'jc/maint-ident-missing-human-name' into maint-1.7.11
Junio C Hamano [Sat, 15 Sep 2012 03:48:22 +0000 (20:48 -0700)] 
Merge branch 'jc/maint-ident-missing-human-name' into maint-1.7.11

* jc/maint-ident-missing-human-name:
  split_ident_line(): make best effort when parsing author/committer line

11 years agoMerge branch 'rj/test-regex' into maint-1.7.11
Junio C Hamano [Sat, 15 Sep 2012 03:46:39 +0000 (20:46 -0700)] 
Merge branch 'rj/test-regex' into maint-1.7.11

* rj/test-regex:
  test-regex: Add a test to check for a bug in the regex routines

11 years agoMerge branch 'da/gitk-reload-tag-contents' into maint-1.7.11
Junio C Hamano [Sat, 15 Sep 2012 03:45:55 +0000 (20:45 -0700)] 
Merge branch 'da/gitk-reload-tag-contents' into maint-1.7.11

* da/gitk-reload-tag-contents:
  gitk: Rename 'tagcontents' to 'cached_tagcontent'
  gitk: Teach "Reread references" to reload tags
  gitk: Avoid Meta1-F5

11 years agoMerge branch 'jc/maint-checkout-fileglob-doc' into maint-1.7.11
Junio C Hamano [Sat, 15 Sep 2012 03:45:03 +0000 (20:45 -0700)] 
Merge branch 'jc/maint-checkout-fileglob-doc' into maint-1.7.11

* jc/maint-checkout-fileglob-doc:
  gitcli: contrast wildcard given to shell and to git
  gitcli: formatting fix
  Document file-glob for "git checkout -- '*.c'"

11 years agoMerge branch 'jc/apply-binary-p0' into maint-1.7.11
Junio C Hamano [Wed, 12 Sep 2012 21:00:52 +0000 (14:00 -0700)] 
Merge branch 'jc/apply-binary-p0' into maint-1.7.11

"git apply -p0" did not parse pathnames on "diff --git" line
correctly.  This caused patches that had pathnames in no other
places to be mistakenly rejected (most notably, binary patch that
does not rename nor change mode).  Textual patches, renames or mode
changes have preimage and postimage pathnames in different places in
a form that can be parsed unambiguously and did not suffer from this
problem.

* jc/apply-binary-p0:
  apply: compute patch->def_name correctly under -p0

11 years agoMerge branch 'jc/dotdot-is-parent-directory' into maint-1.7.11
Junio C Hamano [Wed, 12 Sep 2012 21:00:34 +0000 (14:00 -0700)] 
Merge branch 'jc/dotdot-is-parent-directory' into maint-1.7.11

"git log .." errored out saying it is both rev range and a path when
there is no disambiguating "--" is on the command line.  Update the
command line parser to interpret ".." as a path in such a case.

* jc/dotdot-is-parent-directory:
  specifying ranges: we did not mean to make ".." an empty set

11 years agoMerge branch 'jc/maint-doc-checkout-b-always-takes-branch-name' into maint-1.7.11
Junio C Hamano [Wed, 12 Sep 2012 20:59:58 +0000 (13:59 -0700)] 
Merge branch 'jc/maint-doc-checkout-b-always-takes-branch-name' into maint-1.7.11

The synopsis said "checkout [-B branch]" to make it clear the
branch name is a parameter to the option, but the heading for the
option description was "-B::", not "-B branch::", making the
documentation misleading.

* jc/maint-doc-checkout-b-always-takes-branch-name:
  doc: "git checkout -b/-B/--orphan" always takes a branch name

11 years agoMerge branch 'jk/maint-http-half-auth-push' into maint-1.7.11
Junio C Hamano [Wed, 12 Sep 2012 20:58:22 +0000 (13:58 -0700)] 
Merge branch 'jk/maint-http-half-auth-push' into maint-1.7.11

Pushing to smart HTTP server with recent Git fails without having
the username in the URL to force authentication, if the server is
configured to allow GET anonymously, while requiring authentication
for POST.

* jk/maint-http-half-auth-push:
  http: prompt for credentials on failed POST
  http: factor out http error code handling
  t: test http access to "half-auth" repositories
  t: test basic smart-http authentication
  t/lib-httpd: recognize */smart/* repos as smart-http
  t/lib-httpd: only route auth/dumb to dumb repos
  t5550: factor out http auth setup
  t5550: put auth-required repo in auth/dumb

11 years agoMerge branch 'kk/maint-for-each-ref-multi-sort' into maint-1.7.11
Junio C Hamano [Wed, 12 Sep 2012 20:57:43 +0000 (13:57 -0700)] 
Merge branch 'kk/maint-for-each-ref-multi-sort' into maint-1.7.11

"git for-each-ref" did not honor multiple "--sort=<key>" arguments
correctly.

* kk/maint-for-each-ref-multi-sort:
  for-each-ref: Fix sort with multiple keys
  t6300: test sort with multiple keys

11 years agoGit 1.7.11.6 v1.7.11.6
Junio C Hamano [Tue, 11 Sep 2012 18:18:48 +0000 (11:18 -0700)] 
Git 1.7.11.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jc/maint-mergetool-style-fix' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 18:10:23 +0000 (11:10 -0700)] 
Merge branch 'jc/maint-mergetool-style-fix' into maint-1.7.11

* jc/maint-mergetool-style-fix:
  mergetool: style fixes

11 years agoMerge branch 'sz/submodule-force-update' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 18:10:17 +0000 (11:10 -0700)] 
Merge branch 'sz/submodule-force-update' into maint-1.7.11

* sz/submodule-force-update:
  Make 'git submodule update --force' always check out submodules.

11 years agoMerge branch 'ph/stash-rerere' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 18:10:12 +0000 (11:10 -0700)] 
Merge branch 'ph/stash-rerere' into maint-1.7.11

* ph/stash-rerere:
  stash: invoke rerere in case of conflict
  test: git-stash conflict sets up rerere

11 years agoMerge branch 'jc/maint-sane-execvp-notdir' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 18:09:19 +0000 (11:09 -0700)] 
Merge branch 'jc/maint-sane-execvp-notdir' into maint-1.7.11

* jc/maint-sane-execvp-notdir:
  sane_execvp(): ignore non-directory on $PATH

11 years agoMerge branch 'jc/maint-config-exit-status' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 18:09:09 +0000 (11:09 -0700)] 
Merge branch 'jc/maint-config-exit-status' into maint-1.7.11

* jc/maint-config-exit-status:
  config: "git config baa" should exit with status 1

11 years agoMerge branch 'mh/maint-config-doc-proxy-command' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 18:09:01 +0000 (11:09 -0700)] 
Merge branch 'mh/maint-config-doc-proxy-command' into maint-1.7.11

* mh/maint-config-doc-proxy-command:
  git-config doc: unconfuse an example
  git-config.txt: fix example

11 years agoMerge branch 'hv/submodule-path-unmatch' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 18:08:55 +0000 (11:08 -0700)] 
Merge branch 'hv/submodule-path-unmatch' into maint-1.7.11

* hv/submodule-path-unmatch:
  Let submodule command exit with error status if path does not exist

11 years agoMerge branch 'mz/empty-rebase-test' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 18:08:48 +0000 (11:08 -0700)] 
Merge branch 'mz/empty-rebase-test' into maint-1.7.11

* mz/empty-rebase-test:
  add tests for 'git rebase --keep-empty'

11 years agoMerge branch 'jk/docs-docbook-monospace-display' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 18:08:40 +0000 (11:08 -0700)] 
Merge branch 'jk/docs-docbook-monospace-display' into maint-1.7.11

* jk/docs-docbook-monospace-display:
  docs: monospace listings in docbook output

11 years agoMerge branch 'ab/diff-write-incomplete-line' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 18:08:30 +0000 (11:08 -0700)] 
Merge branch 'ab/diff-write-incomplete-line' into maint-1.7.11

* ab/diff-write-incomplete-line:
  Fix '\ No newline...' annotation in rewrite diffs

11 years agoMerge branch 'jc/maint-t7406-rev-parse-max-count-huh' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 18:08:18 +0000 (11:08 -0700)] 
Merge branch 'jc/maint-t7406-rev-parse-max-count-huh' into maint-1.7.11

* jc/maint-t7406-rev-parse-max-count-huh:
  t7406: fix misleading "rev-parse --max-count=1 HEAD"

11 years agoMerge branch 'tr/void-diff-setup-done' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 17:53:40 +0000 (10:53 -0700)] 
Merge branch 'tr/void-diff-setup-done' into maint-1.7.11

* tr/void-diff-setup-done:
  diff_setup_done(): return void

11 years agoMerge branch 'tr/merge-recursive-flush' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 17:53:31 +0000 (10:53 -0700)] 
Merge branch 'tr/merge-recursive-flush' into maint-1.7.11

* tr/merge-recursive-flush:
  merge-recursive: eliminate flush_buffer() in favor of write_in_full()

11 years agoMerge branch 'nd/index-errno' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 17:53:21 +0000 (10:53 -0700)] 
Merge branch 'nd/index-errno' into maint-1.7.11

* nd/index-errno:
  read_index_from: remove bogus errno assignments

11 years agoMerge branch 'pg/maint-apply-remove-unused-variable' into maint-1.7.11
Junio C Hamano [Tue, 11 Sep 2012 17:53:11 +0000 (10:53 -0700)] 
Merge branch 'pg/maint-apply-remove-unused-variable' into maint-1.7.11

* pg/maint-apply-remove-unused-variable:
  apply: delete unused deflate_origlen from patch struct

11 years agoAlmost 1.7.11.6
Junio C Hamano [Mon, 10 Sep 2012 22:30:46 +0000 (15:30 -0700)] 
Almost 1.7.11.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'mg/rebase-i-onto-reflog-in-full' into maint-1.7.11
Junio C Hamano [Mon, 10 Sep 2012 22:26:03 +0000 (15:26 -0700)] 
Merge branch 'mg/rebase-i-onto-reflog-in-full' into maint-1.7.11

The reflog entries left by "git rebase" and "git rebase -i" were
inconsistent (the interactive one gave an abbreviated object name).

* mg/rebase-i-onto-reflog-in-full:
  rebase -i: use full onto sha1 in reflog

11 years agoMerge branch 'jc/maint-protect-sh-from-ifs' into maint-1.7.11
Junio C Hamano [Mon, 10 Sep 2012 22:25:45 +0000 (15:25 -0700)] 
Merge branch 'jc/maint-protect-sh-from-ifs' into maint-1.7.11

When the user exports a non-default IFS without HT, scripts that
rely on being able to parse "ls-files -s | while read a b c..."
start to fail.  Protect them from such a misconfiguration.

* jc/maint-protect-sh-from-ifs:
  sh-setup: protect from exported IFS

11 years agoMerge branch 'bc/receive-pack-stdout-protection' into maint-1.7.11
Junio C Hamano [Mon, 10 Sep 2012 22:25:09 +0000 (15:25 -0700)] 
Merge branch 'bc/receive-pack-stdout-protection' into maint-1.7.11

When "git push" triggered the automatic gc on the receiving end, a
message from "git prune" that said it was removing cruft leaked to
the standard output, breaking the communication protocol.

* bc/receive-pack-stdout-protection:
  receive-pack: do not leak output from auto-gc to standard output
  t/t5400: demonstrate breakage caused by informational message from prune

11 years agoMerge branch 'jk/maint-null-in-trees' into maint-1.7.11
Junio C Hamano [Mon, 10 Sep 2012 22:24:53 +0000 (15:24 -0700)] 
Merge branch 'jk/maint-null-in-trees' into maint-1.7.11

"git diff" had a confusion between taking data from a path in the
working tree and taking data from an object that happens to have
name 0{40} recorded in a tree.

* jk/maint-null-in-trees:
  fsck: detect null sha1 in tree entries
  do not write null sha1s to on-disk index
  diff: do not use null sha1 as a sentinel value

11 years agoMerge branch 'tr/maint-send-email-2047' into maint-1.7.11
Junio C Hamano [Mon, 10 Sep 2012 22:24:40 +0000 (15:24 -0700)] 
Merge branch 'tr/maint-send-email-2047' into maint-1.7.11

"git send-email" did not unquote encoded words that appear on the
header correctly, and lost "_" from strings.

* tr/maint-send-email-2047:
  send-email: improve RFC2047 quote parsing

11 years agoMerge branch 'mm/die-with-dashdash-help' into maint-1.7.11
Junio C Hamano [Mon, 10 Sep 2012 22:24:21 +0000 (15:24 -0700)] 
Merge branch 'mm/die-with-dashdash-help' into maint-1.7.11

When the user gives an argument that can be taken as both a
revision name and a pathname without disambiguating with "--", we
used to give a help message "Use '--' to separate".  The message
has been clarified to show where that '--' goes on the command
line.

* mm/die-with-dashdash-help:
  setup: clarify error messages for file/revisions ambiguity

11 years agoMerge branch 'js/gitweb-path-info-unquote' into maint-1.7.11
Junio C Hamano [Mon, 10 Sep 2012 22:23:46 +0000 (15:23 -0700)] 
Merge branch 'js/gitweb-path-info-unquote' into maint-1.7.11

"gitweb" when used with PATH_INFO failed to notice directories with
SP (and other characters that need URL-style quoting) in them.

* js/gitweb-path-info-unquote:
  gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO

11 years agogitcli: contrast wildcard given to shell and to git
Junio C Hamano [Fri, 7 Sep 2012 20:49:15 +0000 (13:49 -0700)] 
gitcli: contrast wildcard given to shell and to git

People who are not used to working with shell may intellectually
understand how the command line argument is massaged by the shell
but still have a hard time visualizing the difference between
letting the shell expand fileglobs and having Git see the fileglob
to use as a pathspec.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogitcli: formatting fix
Junio C Hamano [Mon, 10 Sep 2012 19:47:38 +0000 (12:47 -0700)] 
gitcli: formatting fix

The paragraph to encourage use of "--" in scripts belongs to the
bullet point that describes the behaviour for a command line without
the explicit "--" disambiguation; it is not a supporting explanation
for the entire bulletted list, and it is wrong to make it a separate
paragraph outside the list.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogitk: Rename 'tagcontents' to 'cached_tagcontent'
David Aguilar [Sat, 8 Sep 2012 19:53:16 +0000 (12:53 -0700)] 
gitk: Rename 'tagcontents' to 'cached_tagcontent'

Name the 'tagcontents' variable similarly to the rest of the
variables cleared in the changedrefs() function.

This makes the naming consistent and provides a hint that it
should be cleared when reloading gitk's cache.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogitk: Teach "Reread references" to reload tags
David Aguilar [Sat, 8 Sep 2012 19:03:13 +0000 (12:03 -0700)] 
gitk: Teach "Reread references" to reload tags

Tag contents, once read, are forever cached in memory.
This makes gitk unable to notice when tag contents change.

Allow users to cause a reload of the tag contents by using
the "File->Reread references" action.

Reported-by: Tim McCormack <cortex@brainonfire.net>
Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoDocument file-glob for "git checkout -- '*.c'"
Junio C Hamano [Tue, 4 Sep 2012 15:28:27 +0000 (08:28 -0700)] 
Document file-glob for "git checkout -- '*.c'"

Just like we give a similar example in "git add" documentation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agotest-regex: Add a test to check for a bug in the regex routines
Ramsay Jones [Sat, 1 Sep 2012 17:46:54 +0000 (18:46 +0100)] 
test-regex: Add a test to check for a bug in the regex routines

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agosplit_ident_line(): make best effort when parsing author/committer line
Junio C Hamano [Fri, 31 Aug 2012 21:54:18 +0000 (14:54 -0700)] 
split_ident_line(): make best effort when parsing author/committer line

Commits made by ancient version of Git allowed committer without
human readable name, like this (00213b17c in the kernel history):

    tree 6947dba41f8b0e7fe7bccd41a4840d6de6a27079
    parent 352dd1df32e672be4cff71132eb9c06a257872fe
    author Petr Baudis <pasky@ucw.cz> 1135223044 +0100
    committer  <sam@mars.ravnborg.org> 1136151043 +0100

    kconfig: Remove support for lxdialog --checklist

    ...

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
When fed such a commit, --format='%ci' fails to parse it, and gives
back an empty string.  Update the split_ident_line() to be a bit
more lenient when parsing, but make sure the caller that wants to
pick up sane value from its return value does its own validation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agolog: fix --quiet synonym for -s
Jeff King [Tue, 28 Aug 2012 21:29:34 +0000 (17:29 -0400)] 
log: fix --quiet synonym for -s

Originally the "--quiet" option was parsed by the
diff-option parser into the internal QUICK option. This had
the effect of silencing diff output from the log (which was
not intended, but happened to work and people started to
use it). But it also had other odd side effects at the diff
level (for example, it would suppress the second commit in
"git show A B").

To fix this, commit 1c40c36 converted log to parse-options
and handled the "quiet" option separately, not passing it
on to the diff code. However, it simply ignored the option,
which was a regression for people using it as a synonym for
"-s". Commit 01771a8 then fixed that by interpreting the
option to add DIFF_FORMAT_NO_OUTPUT to the list of output
formats.

However, that commit did not fix it in all cases. It sets
the flag after setup_revisions is called. Naively, this
makes sense because you would expect the setup_revisions
parser to overwrite our output format flag if "-p" or
another output format flag is seen.

However, that is not how the NO_OUTPUT flag works. We
actually store it in the bit-field as just another format.
At the end of setup_revisions, we call diff_setup_done,
which post-processes the bitfield and clears any other
formats if we have set NO_OUTPUT. By setting the flag after
setup_revisions is done, diff_setup_done does not have a
chance to make this tweak, and we end up with other format
options still set.

As a result, the flag would have no effect in "git log -p
--quiet" or "git show --quiet".  Fix it by setting the
format flag before the call to setup_revisions.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agohttp: prompt for credentials on failed POST
Jeff King [Mon, 27 Aug 2012 13:27:15 +0000 (09:27 -0400)] 
http: prompt for credentials on failed POST

All of the smart-http GET requests go through the http_get_*
functions, which will prompt for credentials and retry if we
see an HTTP 401.

POST requests, however, do not go through any central point.
Moreover, it is difficult to retry in the general case; we
cannot assume the request body fits in memory or is even
seekable, and we don't know how much of it was consumed
during the attempt.

Most of the time, this is not a big deal; for both fetching
and pushing, we make a GET request before doing any POSTs,
so typically we figure out the credentials during the first
request, then reuse them during the POST. However, some
servers may allow a client to get the list of refs from
receive-pack without authentication, and then require
authentication when the client actually tries to POST the
pack.

This is not ideal, as the client may do a non-trivial amount
of work to generate the pack (e.g., delta-compressing
objects). However, for a long time it has been the
recommended example configuration in git-http-backend(1) for
setting up a repository with anonymous fetch and
authenticated push. This setup has always been broken
without putting a username into the URL. Prior to commit
986bbc0, it did work with a username in the URL, because git
would prompt for credentials before making any requests at
all. However, post-986bbc0, it is totally broken. Since it
has been advertised in the manpage for some time, we should
make sure it works.

Unfortunately, it is not as easy as simply calling post_rpc
again when it fails, due to the input issue mentioned above.
However, we can still make this specific case work by
retrying in two specific instances:

  1. If the request is large (bigger than LARGE_PACKET_MAX),
     we will first send a probe request with a single flush
     packet. Since this request is static, we can freely
     retry it.

  2. If the request is small and we are not using gzip, then
     we have the whole thing in-core, and we can freely
     retry.

That means we will not retry in some instances, including:

  1. If we are using gzip. However, we only do so when
     calling git-upload-pack, so it does not apply to
     pushes.

  2. If we have a large request, the probe succeeds, but
     then the real POST wants authentication. This is an
     extremely unlikely configuration and not worth worrying
     about.

While it might be nice to cover those instances, doing so
would be significantly more complex for very little
real-world gain. In the long run, we will be much better off
when curl learns to internally handle authentication as a
callback, and we can cleanly handle all cases that way.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agohttp: factor out http error code handling
Jeff King [Mon, 27 Aug 2012 13:26:04 +0000 (09:26 -0400)] 
http: factor out http error code handling

Most of our http requests go through the http_request()
interface, which does some nice post-processing on the
results. In particular, it handles prompting for missing
credentials as well as approving and rejecting valid or
invalid credentials. Unfortunately, it only handles GET
requests. Making it handle POSTs would be quite complex, so
let's pull result handling code into its own function so
that it can be reused from the POST code paths.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot: test http access to "half-auth" repositories
Jeff King [Mon, 27 Aug 2012 13:25:53 +0000 (09:25 -0400)] 
t: test http access to "half-auth" repositories

Some sites set up http access to repositories such that
fetching is anonymous and unauthenticated, but pushing is
authenticated. While there are multiple ways to do this, the
technique advertised in the git-http-backend manpage is to
block access to locations matching "/git-receive-pack$".

Let's emulate that advice in our test setup, which makes it
clear that this advice does not actually work.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot: test basic smart-http authentication
Jeff King [Mon, 27 Aug 2012 13:25:36 +0000 (09:25 -0400)] 
t: test basic smart-http authentication

We do not currently test authentication over smart-http at
all. In theory, it should work exactly as it does for dumb
http (which we do test). It does indeed work for these
simple tests, but this patch lays the groundwork for more
complex tests in future patches.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot/lib-httpd: recognize */smart/* repos as smart-http
Jeff King [Mon, 27 Aug 2012 13:25:21 +0000 (09:25 -0400)] 
t/lib-httpd: recognize */smart/* repos as smart-http

We do not currently test authentication for smart-http repos
at all. Part of the infrastructure to do this is recognizing
that auth/smart is indeed a smart-http repo.

The current apache config recognizes only "^/smart/*" as
smart-http. Let's instead treat anything with /smart/ in the
URL as smart-http. This is obviously a stupid thing to do
for a real production site, but for our test suite we know
that our repositories will not have this magic string in the
name.

Note that we will route /foo/smart/bar.git directly to
git-http-backend/bar.git; in other words, everything before
the "/smart/" is irrelevant to finding the repo on disk (but
may impact apache config, for example by triggering auth
checks).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot/lib-httpd: only route auth/dumb to dumb repos
Jeff King [Mon, 27 Aug 2012 13:24:42 +0000 (09:24 -0400)] 
t/lib-httpd: only route auth/dumb to dumb repos

Our test apache config points all of auth/ directly to the
on-disk repositories via an Alias directive. This works fine
because everything authenticated is currently in auth/dumb,
which is a subset.  However, this would conflict with a
ScriptAlias for auth/smart (which will come in future
patches), so let's narrow the Alias.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot5550: factor out http auth setup
Jeff King [Mon, 27 Aug 2012 13:24:31 +0000 (09:24 -0400)] 
t5550: factor out http auth setup

The t5550 script sets up a nice askpass helper for
simulating user input and checking what git prompted for.
Let's make it available to other http scripts by migrating
it to lib-httpd.

We can use this immediately in t5540 to make our tests more
robust (previously, we did not check at all that hitting the
password-protected repo actually involved a password).
Unfortunately, we end up failing the test because the
current code erroneously prompts twice (once for
git-remote-http, and then again when the former spawns
git-http-push).

More importantly, though, it will let us easily add
smart-http authentication tests in t5541 and t5551; we
currently do not test smart-http authentication at all.

As part of making it generic, let's always look for and
store auxiliary askpass files at the top-level trash
directory; this makes it compatible with t5540, which runs
some tests from sub-repositories. We can abstract away the
ugliness with a short helper function.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot5550: put auth-required repo in auth/dumb
Jeff King [Mon, 27 Aug 2012 13:23:37 +0000 (09:23 -0400)] 
t5550: put auth-required repo in auth/dumb

In most of our tests, we put repos to be accessed by dumb
protocols in /dumb, and repos to be accessed by smart
protocols in /smart.  In our test apache setup, the whole
/auth hierarchy requires authentication. However, we don't
bother to split it by smart and dumb here because we are not
currently testing smart-http authentication at all.

That will change in future patches, so let's be explicit
that we are interested in testing dumb access here. This
also happens to match what t5540 does for the push tests.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agodoc: "git checkout -b/-B/--orphan" always takes a branch name
Junio C Hamano [Sun, 26 Aug 2012 18:40:08 +0000 (11:40 -0700)] 
doc: "git checkout -b/-B/--orphan" always takes a branch name

While the synopsis section makes it clear that the new branch name
is the parameter to these flags, the option description did not.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoapply: compute patch->def_name correctly under -p0
Junio C Hamano [Sat, 25 Aug 2012 05:48:55 +0000 (22:48 -0700)] 
apply: compute patch->def_name correctly under -p0

Back when "git apply" was written, we made sure that the user can
skip more than the default number of path components (i.e. 1) by
giving "-p<n>", but the logic for doing so was built around the
notion of "we skip N slashes and stop".  This obviously does not
work well when running under -p0 where we do not want to skip any,
but still want to skip SP/HT that separates the pathnames of
preimage and postimage and want to reject absolute pathnames.

Stop using "stop_at_slash()", and instead introduce a new helper
"skip_tree_prefix()" with similar logic but works correctly even for
the -p0 case.

This is an ancient bug, but has been masked for a long time because
most of the patches are text and have other clues to tell us the
name of the preimage and the postimage.

Noticed by Colin McCabe.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoPrepare for 1.7.11.6
Junio C Hamano [Fri, 24 Aug 2012 19:33:31 +0000 (12:33 -0700)] 
Prepare for 1.7.11.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'mv/pull-r-for-rebase' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:47 +0000 (12:05 -0700)] 
Merge branch 'mv/pull-r-for-rebase' into maint-1.7.11

A minor documentation update.

* mv/pull-r-for-rebase:
  man: git pull -r is a short for --rebase

11 years agoMerge branch 'jc/maint-abbrev-option-cli' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:44 +0000 (12:05 -0700)] 
Merge branch 'jc/maint-abbrev-option-cli' into maint-1.7.11

We did not document that many commands take unique prefix
abbreviations of long options (e.g. "--option" may be the only flag
that the command accepts that begin with "--opt", in which case you
can give "--opt") anywhere easy to find for new people.

* jc/maint-abbrev-option-cli:
  gitcli: describe abbreviation of long options

11 years agoMerge branch 'jc/maint-rev-list-topo-doc' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:40 +0000 (12:05 -0700)] 
Merge branch 'jc/maint-rev-list-topo-doc' into maint-1.7.11

It was unclear what "--topo-order" was really about in the
documentation. It is not just about "children before parent", but
also about "don't mix lineages".

* jc/maint-rev-list-topo-doc:
  rev-list docs: clarify --topo-order description

11 years agoMerge branch 'hv/coding-guidelines' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:35 +0000 (12:05 -0700)] 
Merge branch 'hv/coding-guidelines' into maint-1.7.11

In earlier days, "imitate the style in the neibouring code" was
sufficient to keep the coherent style, but over time some parts of
the codebase have drifted enough to make it ineffective.

* hv/coding-guidelines:
  Documentation/CodingGuidelines: spell out more shell guidelines

11 years agoMerge branch 'jc/tag-doc' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:30 +0000 (12:05 -0700)] 
Merge branch 'jc/tag-doc' into maint-1.7.11

Our documentation used to assume having files in .git/refs/*
directories was the only to have branches and tags, but that is not
true for quite some time.

* jc/tag-doc:
  Documentation: do not mention .git/refs/* directories

11 years agoMerge branch 'mk/test-seq' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:24 +0000 (12:05 -0700)] 
Merge branch 'mk/test-seq' into maint-1.7.11

Add a compatibility/utility function to the test framework.

* mk/test-seq:
  tests: Introduce test_seq

11 years agoMerge branch 'lp/no-cmd-http-fetch' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:19 +0000 (12:05 -0700)] 
Merge branch 'lp/no-cmd-http-fetch' into maint-1.7.11

* lp/no-cmd-http-fetch:
  builtin.h: remove unused cmd_<foo> declarations

11 years agoMerge branch 'bw/maint-1.7.9-solaris-getpass' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:11 +0000 (12:05 -0700)] 
Merge branch 'bw/maint-1.7.9-solaris-getpass' into maint-1.7.11

* bw/maint-1.7.9-solaris-getpass:
  Enable HAVE_DEV_TTY for Solaris
  terminal: seek when switching between reading and writing

11 years agoMerge branch 'jk/maint-commit-check-committer-early' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:08 +0000 (12:05 -0700)] 
Merge branch 'jk/maint-commit-check-committer-early' into maint-1.7.11

* jk/maint-commit-check-committer-early:
  commit: check committer identity more strictly

11 years agoMake 'git submodule update --force' always check out submodules.
Stefan Zager [Wed, 25 Jul 2012 17:41:54 +0000 (10:41 -0700)] 
Make 'git submodule update --force' always check out submodules.

Currently, it will only do a checkout if the sha1 registered in the containing
repository doesn't match the HEAD of the submodule, regardless of whether the
submodule is dirty.  As discussed on the mailing list, the '--force' flag is a
strong indicator that the state of the submodule is suspect, and should be reset
to HEAD.

Signed-off-by: Stefan Zager <szager@google.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomergetool: style fixes
Junio C Hamano [Thu, 23 Aug 2012 05:33:15 +0000 (22:33 -0700)] 
mergetool: style fixes

This script is one of the sizeable ones that tempted people to copy
its "neibouring style" in their new code, but was littered with
styles incompatible with our style guide.

 - use one tab, not four spaces, per indent level;

 - long lines can be wrapped after '|', '&&', or '||' for
   readability.

 - structures like "if .. then .. else .. fi", "while .. do .. done"
   are split into lines in such a way that does not require
   unnecessary semicolon.

 - case, esac and case-arms align at the same column.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMake the ciabot scripts completely self-configuring in the normal case.
Eric S. Raymond [Thu, 23 Aug 2012 05:21:53 +0000 (01:21 -0400)] 
Make the ciabot scripts completely self-configuring in the normal case.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoImproved documentation for the ciabot scripts.
Eric S. Raymond [Thu, 23 Aug 2012 04:10:53 +0000 (00:10 -0400)] 
Improved documentation for the ciabot scripts.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agospecifying ranges: we did not mean to make ".." an empty set
Junio C Hamano [Mon, 2 May 2011 20:39:16 +0000 (13:39 -0700)] 
specifying ranges: we did not mean to make ".." an empty set

Either end of revision range operator can be omitted to default to HEAD,
as in "origin.." (what did I do since I forked) or "..origin" (what did
they do since I forked).  But the current parser interprets ".."  as an
empty range "HEAD..HEAD", and worse yet, because ".." does exist on the
filesystem, we get this annoying output:

  $ cd Documentation/howto
  $ git log .. ;# give me recent commits that touch Documentation/ area.
  fatal: ambiguous argument '..': both revision and filename
  Use '--' to separate filenames from revisions

Surely we could say "git log ../" or even "git log -- .." to disambiguate,
but we shouldn't have to.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocontrib/ciabot: Get ciabot configuration from git variables
Eric S. Raymond [Wed, 22 Aug 2012 10:52:30 +0000 (06:52 -0400)] 
contrib/ciabot: Get ciabot configuration from git variables

These changes remove all need to modify the ciabot scripts for installation.
Instead, per-project configuration can be dome via variables in a [ciabot]
section of the config file.

Also, correct for the new server address.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agofor-each-ref: Fix sort with multiple keys
Kacper Kornet [Tue, 21 Aug 2012 07:47:26 +0000 (09:47 +0200)] 
for-each-ref: Fix sort with multiple keys

The linked list describing sort options was not correctly set up in
opt_parse_sort. In the result, contrary to the documentation, only the
last of multiple --sort options to git-for-each-ref was taken into
account. This commit fixes it.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot6300: test sort with multiple keys
Kacper Kornet [Tue, 21 Aug 2012 07:46:06 +0000 (09:46 +0200)] 
t6300: test sort with multiple keys

Documentation of git-for-each-ref says that --sort=<key> option can be
used multiple times, in which case the last key becomes the primary key.
However this functionality was never checked in test suite and is
currently broken. This commit adds appropriate test in preparation for fix.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>