1
0
mirror of https://github.com/git/git.git synced 2024-10-23 09:49:23 +02:00
Commit Graph

30915 Commits

Author SHA1 Message Date
Pete Wyckoff
73350fb6aa git p4: remove unneeded cmd initialization
It confuses pylint, and is never needed.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26 11:01:31 -08:00
Pete Wyckoff
a4e9054cfb git p4: fix labelDetails typo in exception
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26 11:01:04 -08:00
Pete Wyckoff
e6777fde8d git p4 test: display unresolvable host error
This test passes already.  Make sure p4 diagnostic errors are displayed.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26 11:00:49 -08:00
Pete Wyckoff
78189bead3 git p4: catch p4 errors when streaming file contents
Error messages that arise during the "p4 print" phase of
generating commits were silently ignored.  Catch them,
abort the fast-import, and exit.

Without this fix, the sync/clone appears to work, but files that
are inaccessible by the p4d server will still be imported to git,
although without the proper contents.  Instead the errant files
will contain a p4 error message, such as "Librarian checkout
//depot/path failed".

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26 11:00:34 -08:00
Pete Wyckoff
249da4c0dc git p4: handle servers without move support
Support for the "p4 move" command was added in 8e9497c (git p4:
add support for 'p4 move' in P4Submit, 2012-07-12), which checks
to make sure that the client and server support the command.

But older versions of p4d may not handle the "-k" argument, and
newer p4d allow disabling "p4 move" with a configuration setting.
Check for both these cases by testing a p4 move command on bogus
filenames and looking for strings in the error messages.

Reported-by: Vitor Antunes <vitor.hda@gmail.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26 10:59:57 -08:00
Pete Wyckoff
18fa13d0b3 git p4: catch p4 describe errors
Group the two calls to "p4 describe" into a new helper function,
and try to validate the p4 results.  The current behavior when p4
describe fails is to die with a python backtrace.  The new behavior
will print the full response.

This does not solve any particular problem, but adds more
checking in hopes of narrowing down odd behavior seen on
at least two occasions.

Based-on-patch-by: Matt Arsenault <arsenm2@gmail.com>
Reported-by: Arthur <a.foulon@amesys.fr>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26 10:59:08 -08:00
Enrico Scholz
f7d8e3d01f emacs: make 'git-status' work with separate git dirs
when trying 'M-x git-status' in a submodule created with recent (1.7.5+)
git, the command fails with

| ... is not a git working tree

This is caused by creating submodules with '--separate-git-dir' but
still checking for a working tree by testing for a '.git' directory.

The patch fixes this by relaxing the existing detection a little bit.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Acked-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26 09:34:28 -08:00
Junio C Hamano
e8a1f5a2ae Update draft release notes to 1.8.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-25 18:52:42 -08:00
Junio C Hamano
be95387af2 Merge branch 'rr/submodule-diff-config'
Allow "git diff --submodule=log" to set to be the default via
configuration.

* rr/submodule-diff-config:
  submodule: display summary header in bold
  diff: rename "set" variable
  diff: introduce diff.submodule configuration variable
  Documentation: move diff.wordRegex from config.txt to diff-config.txt
2012-11-25 18:44:50 -08:00
Junio C Hamano
5ab539bb00 Merge branch 'nd/maint-compat-fnmatch-fix'
* nd/maint-compat-fnmatch-fix:
  compat/fnmatch: fix off-by-one character class's length check
2012-11-25 18:44:41 -08:00
Junio C Hamano
e0a7f2bbbb Merge branch 'bc/do-not-recurse-in-die'
* bc/do-not-recurse-in-die:
  usage.c: detect recursion in die routines and bail out immediately
2012-11-25 18:44:36 -08:00
Junio C Hamano
f225f9b720 Merge branch 'mk/complete-tcsh'
* mk/complete-tcsh:
  tcsh-completion re-using git-completion.bash
2012-11-25 18:44:28 -08:00
Junio C Hamano
cf22e272e4 Merge branch 'jh/update-ref-d-through-symref'
"update-ref -d --deref SYM" to delete a ref through a symbolic ref
that points to it did not remove it correctly.

* jh/update-ref-d-through-symref:
  Fix failure to delete a packed ref through a symref
  t1400-update-ref: Add test verifying bug with symrefs in delete_ref()
2012-11-25 18:44:17 -08:00
Junio C Hamano
76c39289ba Merge branch 'lt/diff-stat-show-0-lines'
We failed to mention a file without any content change but whose
permission bit was modified, or (worse yet) a new file without any
content in the "git diff --stat" output.

* lt/diff-stat-show-0-lines:
  Fix "git diff --stat" for interesting - but empty - file changes
2012-11-25 18:44:06 -08:00
Junio C Hamano
09b61b5e8c Merge branch 'sg/complete-help-undup'
* sg/complete-help-undup:
  completion: remove 'help' duplicate from porcelain commands
2012-11-25 18:43:54 -08:00
Junio C Hamano
f9b329a7d1 Sync with 1.8.0.1 2012-11-25 18:40:55 -08:00
Junio C Hamano
ed9fe75513 Git 1.8.0.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.8.0.1
2012-11-25 18:40:34 -08:00
Junio C Hamano
5956732ebb Merge branch 'jk/checkout-out-of-unborn' into maint
* jk/checkout-out-of-unborn:
  checkout: print a message when switching unborn branches
2012-11-25 18:35:50 -08:00
Junio C Hamano
ccf1bb3ab6 Merge branch 'cn/config-missing-path' into maint
* cn/config-missing-path:
  config: don't segfault when given --path with a missing value
2012-11-25 18:35:46 -08:00
Junio C Hamano
326922fd20 Merge branch 'jk/maint-gitweb-xss' into maint
Fixes an XSS vulnerability in gitweb.

* jk/maint-gitweb-xss:
  gitweb: escape html in rss title
2012-11-25 18:35:41 -08:00
Marc Khouzam
4db42b3823 Completion must sort before using uniq
The user can be presented with invalid completion results
when trying to complete a 'git checkout' command.  This can happen
when using a branch name prefix that matches multiple remote branches.

For example, if available branches are:
  master
  remotes/GitHub/maint
  remotes/GitHub/master
  remotes/origin/maint
  remotes/origin/master

When performing completion on 'git checkout ma' the user will be
given the choices:
  maint
  master

However, 'git checkout maint' will fail in this case, although
completion previously said 'maint' was valid.  Furthermore, when
performing completion on 'git checkout mai', no choices will be
suggested.  So, the user is first told that the branch name
'maint' is valid, but when trying to complete 'mai' into 'maint',
that completion is no longer valid.

The completion results should never propose 'maint' as a valid
branch name, since 'git checkout' will refuse it.

The reason for this bug is that the uniq program only
works with sorted input.  The man page states
"uniq prints the unique lines in a sorted file".

When __git_refs uses the guess heuristic employed by checkout for
tracking branches it wants to consider remote branches but only if
the branch name is unique.  To do that, it calls 'uniq -u'.  However
the input given to 'uniq -u' is not sorted.

Therefore, in the above example, when dealing with 'git checkout ma',
"__git_refs '' 1" will find the following list:
  master
  maint
  master
  maint
  master

which, when passed to 'uniq -u' will remain the same.  Therefore
'maint' will be wrongly suggested as a valid option.

When dealing with 'git checkout mai', the list will be:
  maint
  maint

which happens to be sorted and will be emptied by 'uniq -u',
properly ignoring 'maint'.

A solution for preventing the completion script from suggesting
such invalid branch names is to first call 'sort' and then 'uniq -u'.

Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-24 22:35:48 -08:00
Junio C Hamano
2d242fb3fc Update draft release notes for 1.8.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-21 13:32:58 -08:00
Junio C Hamano
22d33a20f9 Merge branch 'esr/maint-doc-fast-import'
* esr/maint-doc-fast-import:
  doc/fast-import: clarify how content states are built
2012-11-21 13:32:48 -08:00
Junio C Hamano
681b036fa0 Merge branch 'wtk/submodule-doc-fixup'
* wtk/submodule-doc-fixup:
  git-submodule: wrap branch option with "<>" in usage strings.
2012-11-21 13:25:42 -08:00
Junio C Hamano
5471fb1c4c Merge branch 'so/prompt-command'
Updates __git_ps1 so that it can be used as $PROMPT_COMMAND,
instead of being used for command substitution in $PS1, to embed
color escape sequences in its output.

* so/prompt-command:
  coloured git-prompt: paint detached HEAD marker in red
  Fix up colored git-prompt
  show color hints based on state of the git tree
  Allow __git_ps1 to be used in PROMPT_COMMAND
2012-11-21 13:17:01 -08:00
Junio C Hamano
2739889c98 Merge branch 'jk/config-ignore-duplicates'
Drop duplicate detection from "git-config --get"; this lets it
better match the internal config callbacks, which clears up some
corner cases with includes.

* jk/config-ignore-duplicates:
  builtin/config.c: Fix a sparse warning
  git-config: use git_config_with_options
  git-config: do not complain about duplicate entries
  git-config: collect values instead of immediately printing
  git-config: fix regexp memory leaks on error conditions
  git-config: remove memory leak of key regexp
  t1300: test "git config --get-all" more thoroughly
  t1300: remove redundant test
  t1300: style updates
2012-11-21 13:16:44 -08:00
Junio C Hamano
fda800f0b1 Merge branch 'jk/maint-http-half-auth-fetch'
Finishing touches to squelch a compiler warning.

* jk/maint-http-half-auth-fetch:
  remote-curl.c: Fix a compiler warning
2012-11-21 11:59:29 -08:00
Ramsay Jones
377115493a remote-curl.c: Fix a compiler warning
In particular, gcc issues an "'gzip_size' might be used uninitialized"
warning (-Wuninitialized). However, this warning is a false positive,
since the 'gzip_size' variable would not, in fact, be used uninitialized.
In order to suppress the warning, we simply initialise the variable to
zero in it's declaration.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-21 11:54:32 -08:00
Nguyễn Thái Ngọc Duy
f10e3864dc compat/fnmatch: fix off-by-one character class's length check
Character class "xdigit" is the only one that hits 6 character limit
defined by CHAR_CLASS_MAX_LENGTH. All other character classes are 5
character long and therefore never caught by this.

This should make xdigit tests in t3070 pass on Windows.

Reported-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-20 12:13:09 -08:00
Junio C Hamano
3a189da601 Sixth batch for 1.8.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-20 10:46:29 -08:00
Junio C Hamano
2f2c7e1252 Merge branch 'ml/cygwin-mingw-headers'
Make git compile on cygwin with newer header files.

* ml/cygwin-mingw-headers:
  USE CGYWIN_V15_WIN32API as macro to select api for cygwin
  Update cygwin.c for new mingw-64 win32 api headers
2012-11-20 10:44:29 -08:00
Junio C Hamano
9cfe5f4be3 Merge branch 'jk/checkout-out-of-unborn'
* jk/checkout-out-of-unborn:
  checkout: print a message when switching unborn branches
2012-11-20 10:43:18 -08:00
Junio C Hamano
0f76f97676 Merge branch 'cn/config-missing-path'
"git config --path $key" segfaulted on "[section] key" (a boolean
"true" spelled without "=", not "[section] key = true").

* cn/config-missing-path:
  config: don't segfault when given --path with a missing value
2012-11-20 10:40:46 -08:00
Junio C Hamano
b4f35513be Merge branch 'jl/submodule-rm'
* jl/submodule-rm:
  docs: move submodule section
2012-11-20 10:40:31 -08:00
Junio C Hamano
3a2c082383 Merge branch 'mg/replace-resolve-delete'
Be more user friendly to people using "git replace -d".

* mg/replace-resolve-delete:
  replace: parse revision argument for -d
2012-11-20 10:38:32 -08:00
Junio C Hamano
79a09bba1c Merge branch 'jk/maint-gitweb-xss'
Fixes an XSS vulnerability in gitweb.

* jk/maint-gitweb-xss:
  gitweb: escape html in rss title
2012-11-20 10:37:27 -08:00
Junio C Hamano
05849c4818 Merge branch 'rh/maint-gitweb-highlight-ext'
Fixes a clever misuse of perl's list interpretation.

* rh/maint-gitweb-highlight-ext:
  gitweb.perl: fix %highlight_ext mappings
2012-11-20 10:35:53 -08:00
Junio C Hamano
077ad4a0f2 Merge branch 'pw/maint-p4-rcs-expansion-newline'
I do not have p4 to play with, but looks obviously correct to me.

* pw/maint-p4-rcs-expansion-newline:
  git p4: RCS expansion should not span newlines
2012-11-20 10:34:15 -08:00
Junio C Hamano
b0c07c8dc4 Merge branch 'mh/alt-odb-string-list-cleanup'
Cleanups in the alternates code. Fixes a potential bug and makes the
code much cleaner.

* mh/alt-odb-string-list-cleanup:
  link_alt_odb_entries(): take (char *, len) rather than two pointers
  link_alt_odb_entries(): use string_list_split_in_place()
2012-11-20 10:34:09 -08:00
Junio C Hamano
dc998a489a Merge branch 'ta/doc-cleanup'
* ta/doc-cleanup:
  Documentation: build html for all files in technical and howto
  Documentation/howto: convert plain text files to asciidoc
  Documentation/technical: convert plain text files to asciidoc
  Change headline of technical/send-pack-pipeline.txt to not confuse its content with content from git-send-pack.txt
  Shorten two over-long lines in git-bisect-lk2009.txt by abbreviating some sha1
  Split over-long synopsis in git-fetch-pack.txt into several lines
2012-11-20 10:32:58 -08:00
Junio C Hamano
10022a6d02 Merge branch 'kb/preload-index-more'
Use preloadindex in more places, which has a nice speedup on systems
with slow stat calls (and even on Linux).

* kb/preload-index-more:
  update-index/diff-index: use core.preloadindex to improve performance
2012-11-20 10:32:10 -08:00
Junio C Hamano
a9bb4e55a3 Merge branch 'jk/maint-http-half-auth-fetch'
Fixes fetch from servers that ask for auth only during the actual
packing phase. This is not really a recommended configuration, but it
cleans up the code at the same time.

* jk/maint-http-half-auth-fetch:
  remote-curl: retry failed requests for auth even with gzip
  remote-curl: hoist gzip buffer size to top of post_rpc
2012-11-20 10:30:17 -08:00
Junio C Hamano
80dfab86cd Sync with maint
* maint:
  Further preparation for 1.8.0.1
2012-11-20 10:16:34 -08:00
Junio C Hamano
1c03999bef Further preparation for 1.8.0.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-20 10:16:14 -08:00
Junio C Hamano
91d0cd9a6e Merge branch 'mg/maint-pull-suggest-upstream-to' into maint
* mg/maint-pull-suggest-upstream-to:
  push/pull: adjust missing upstream help text to changed interface
2012-11-20 10:15:09 -08:00
Junio C Hamano
cf48960b6d Merge branch 'mm/maint-doc-commit-edit' into maint
* mm/maint-doc-commit-edit:
  Document 'git commit --no-edit' explicitly
2012-11-20 10:14:55 -08:00
Junio C Hamano
cdcd793213 Merge branch 'as/maint-doc-fix-no-post-rewrite' into maint
* as/maint-doc-fix-no-post-rewrite:
  commit: fixup misplacement of --no-post-rewrite description
2012-11-20 10:14:47 -08:00
Junio C Hamano
c5afc5b73e Merge branch 'rs/lock-correct-ref-during-delete' into maint
* rs/lock-correct-ref-during-delete:
  refs: lock symref that is to be deleted, not its target
2012-11-20 10:14:41 -08:00
Junio C Hamano
e87719fc94 Merge branch 'rf/maint-mailmap-off-by-one' into maint
* rf/maint-mailmap-off-by-one:
  mailmap: avoid out-of-bounds memory access
2012-11-20 10:14:29 -08:00
Junio C Hamano
35cae74c4d Merge branch 'jk/maint-diff-grep-textconv' into maint
"git diff -G<pattern>" did not honor textconv filter when looking
for changes.

* jk/maint-diff-grep-textconv:
  diff_grep: use textconv buffers for add/deleted files
2012-11-20 10:03:12 -08:00