1
0
mirror of https://github.com/git/git.git synced 2024-10-21 11:38:56 +02:00
Commit Graph

34961 Commits

Author SHA1 Message Date
Junio C Hamano
05e9d907dd t4015: simplify sed command that is not even seen by sed
Noticed by Andreas Schwab; \<LF> inside a double quotes pair is
eaten by the shell to become an empty string and is not doing
anything.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-04 10:11:15 -08:00
Ben Walton
53039ab154 Avoid difference in tr semantics between System V and BSD
Solaris' tr (both /usr/bin/ and /usr/xpg4/bin) uses the System V
semantics for tr whereby string1's length is truncated to the length
of string2 if string2 is shorter. The BSD semantics, as used by GNU tr
see string2 padded to the length of string1 using the final character
in string2. POSIX explicitly doesn't specify the correct behavior
here, making both equally valid.

This difference means that Solaris' native tr implementations produce
different results for tr ":\t\n" "\0" than GNU tr. This breaks a few
tests in t0008-ignores.sh.

Possible fixes for this are to make string2 be "\0\0\0" or "[\0*]".

Instead, use perl to perform these transliterations which means we
don't need to worry about the difference at all. Since we're replacing
tr with perl, we also use perl to replace the sed invocations used to
transform the files.

Replace four identical transforms with a function named
broken_c_unquote. Replace the other two identical transforms with a
fuction named broken_c_unquote_verbose.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-30 10:38:23 -07:00
Ben Walton
90a95301d3 Change sed i\ usage to something Solaris' sed can handle
Solaris' sed was choking on the i\ commands used in
t4015-diff-whitespace as it couldn't parse the program properly.
Modify two uses of sed that worked in GNU sed but not Solaris'
(/usr/bin or /usr/xpg4/bin) to an equivalent form that is handled
properly by both.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-28 09:27:06 -07:00
Junio C Hamano
3d092bfc6f Update draft release notes to 1.8.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-23 13:37:27 -07:00
Junio C Hamano
ea21efc740 Sync with 'maint' 2013-10-23 13:36:57 -07:00
Junio C Hamano
ca462804c6 Almost 1.8.4.2 ;-)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-23 13:34:39 -07:00
Junio C Hamano
e03a5010b3 Merge branch 'jc/ls-files-killed-optim' into maint
"git ls-files -k" needs to crawl only the part of the working tree
that may overlap the paths in the index to find killed files, but
shared code with the logic to find all the untracked files, which
made it unnecessarily inefficient.

* jc/ls-files-killed-optim:
  dir.c::test_one_path(): work around directory_exists_in_index_icase() breakage
  t3010: update to demonstrate "ls-files -k" optimization pitfalls
  ls-files -k: a directory only can be killed if the index has a non-directory
  dir.c: use the cache_* macro to access the current index
2013-10-23 13:33:08 -07:00
Junio C Hamano
74051fa805 Merge branch 'jh/checkout-auto-tracking' into maint
"git branch --track" had a minor regression in v1.8.3.2 and later
that made it impossible to base your local work on anything but a
local branch of the upstream repository you are tracking from.

* jh/checkout-auto-tracking:
  t3200: fix failure on case-insensitive filesystems
  branch.c: Relax unnecessary requirement on upstream's remote ref name
  t3200: Add test demonstrating minor regression in 41c21f2
  Refer to branch.<name>.remote/merge when documenting --track
  t3200: Minor fix when preparing for tracking failure
  t2024: Fix &&-chaining and a couple of typos
2013-10-23 13:32:50 -07:00
Junio C Hamano
6ba0d9551a Merge branch 'nd/fetch-into-shallow' into maint
When there is no sufficient overlap between old and new history
during a "git fetch" into a shallow repository, objects that the
sending side knows the receiving end has were unnecessarily sent.

* nd/fetch-into-shallow:
  Add testcase for needless objects during a shallow fetch
  list-objects: mark more commits as edges in mark_edges_uninteresting
  list-objects: reduce one argument in mark_edges_uninteresting
  upload-pack: delegate rev walking in shallow fetch to pack-objects
  shallow: add setup_temporary_shallow()
  shallow: only add shallow graft points to new shallow file
  move setup_alternate_shallow and write_shallow_commits to shallow.c
2013-10-23 13:32:17 -07:00
Junio C Hamano
26145c9c73 Merge branch 'bc/gnome-keyring'
Cleanups and tweaks for credential handling to work with ancient versions
of the gnome-keyring library that are still in use.

* bc/gnome-keyring:
  contrib/git-credential-gnome-keyring.c: support really ancient gnome-keyring
  contrib/git-credential-gnome-keyring.c: support ancient gnome-keyring
  contrib/git-credential-gnome-keyring.c: report failure to store password
  contrib/git-credential-gnome-keyring.c: use glib messaging functions
  contrib/git-credential-gnome-keyring.c: use glib memory allocation functions
  contrib/git-credential-gnome-keyring.c: use secure memory for reading passwords
  contrib/git-credential-gnome-keyring.c: use secure memory functions for passwds
  contrib/git-credential-gnome-keyring.c: use gnome helpers in keyring_object()
  contrib/git-credential-gnome-keyring.c: set Gnome application name
  contrib/git-credential-gnome-keyring.c: ensure buffer is non-empty before accessing
  contrib/git-credential-gnome-keyring.c: strlen() returns size_t, not ssize_t
  contrib/git-credential-gnome-keyring.c: exit non-zero when called incorrectly
  contrib/git-credential-gnome-keyring.c: add static where applicable
  contrib/git-credential-gnome-keyring.c: *style* use "if ()" not "if()" etc.
  contrib/git-credential-gnome-keyring.c: remove unused die() function
  contrib/git-credential-gnome-keyring.c: remove unnecessary pre-declarations
2013-10-23 13:21:50 -07:00
Junio C Hamano
f92f068e76 Merge branch 'po/dot-url'
Explain how '.' can be used to refer to the "current repository"
in the documentation.

* po/dot-url:
  doc/cli: make "dot repository" an independent bullet point
  config doc: update dot-repository notes
  doc: command line interface (cli) dot-repository dwimmery
2013-10-23 13:21:48 -07:00
Junio C Hamano
807c895fcb Merge branch 'jc/prompt-upstream'
An enhancement to the GIT_PS1_SHOWUPSTREAM facility.

* jc/prompt-upstream:
  git-prompt.sh: optionally show upstream branch name
2013-10-23 13:21:45 -07:00
Junio C Hamano
f2c1b01c24 Merge branch 'hu/cherry-pick-previous-branch'
"git cherry-pick" without further options would segfault.

Could use a follow-up to handle '-' after argv[1] better.

* hu/cherry-pick-previous-branch:
  cherry-pick: handle "-" after parsing options
2013-10-23 13:21:35 -07:00
Junio C Hamano
4197361e39 Merge branch 'mg/more-textconv'
Make "git grep" and "git show" pay attention to --textconv when
dealing with blob objects.

* mg/more-textconv:
  grep: honor --textconv for the case rev:path
  grep: allow to use textconv filters
  t7008: demonstrate behavior of grep with textconv
  cat-file: do not die on --textconv without textconv filters
  show: honor --textconv for blobs
  diff_opt: track whether flags have been set explicitly
  t4030: demonstrate behavior of show with textconv
2013-10-23 13:21:31 -07:00
Junio C Hamano
eeb8e8373f Merge branch 'jc/pack-objects'
* jc/pack-objects:
  pack-objects: shrink struct object_entry
2013-10-23 13:21:26 -07:00
Junio C Hamano
db9bdfbeb0 Update draft release notes to 1.8.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-18 13:53:52 -07:00
Junio C Hamano
82c41a9bfc Merge branch 'maint'
* maint:
  git-merge: document the -S option
2013-10-18 13:53:48 -07:00
Junio C Hamano
6c2bec96a8 Merge branch 'jc/reflog-doc'
Document rules to use GIT_REFLOG_ACTION variable in the scripted
Porcelain.  git-rebase--interactive locally violates them, but it
is a leaf user that does not call out to or dot-source other
scripts, so it does not urgently need to be fixed.

* jc/reflog-doc:
  setup_reflog_action: document the rules for using GIT_REFLOG_ACTION
2013-10-18 13:50:12 -07:00
Junio C Hamano
dec034a34e Merge branch 'sb/repack-in-c'
Rewrite "git repack" in C.

* sb/repack-in-c:
  repack: improve warnings about failure of renaming and removing files
  repack: retain the return value of pack-objects
  repack: rewrite the shell script in C
2013-10-18 13:49:57 -07:00
Junio C Hamano
f94a84c408 Merge branch 'jk/clone-progress-to-stderr'
Some progress and diagnostic messages from "git clone" were
incorrectly sent to the standard output stream, not to the standard
error stream.

* jk/clone-progress-to-stderr:
  clone: always set transport options
  clone: treat "checking connectivity" like other progress
  clone: send diagnostic messages to stderr
2013-10-18 13:49:51 -07:00
Junio C Hamano
039048e653 Merge git://github.com/git-l10n/git-po
* git://github.com/git-l10n/git-po:
  l10n: fr.po: 2135/2135 messages translated
2013-10-18 13:49:00 -07:00
Nicolas Vigier
5f737ac91b git-merge: document the -S option
The option to gpg sign a merge commit is available but was not
documented. Use wording from the git-commit(1) manpage.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-18 12:47:33 -07:00
Jean-Noel Avila
ba1b8cfac1 l10n: fr.po: 2135/2135 messages translated
Signed-off-by: Sebastien Helleu <flashcode@flashtux.org>
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
2013-10-18 10:29:33 +08:00
Junio C Hamano
2141c474d0 Update draft release notes to 1.8.5 2013-10-17 15:57:12 -07:00
Junio C Hamano
046180ad9d Merge branch 'jk/format-patch-from'
"format-patch --from=<whom>" forgot to omit unnecessary in-body
from line, i.e. when <whom> is the same as the real author.

* jk/format-patch-from:
  format-patch: print in-body "From" only when needed
2013-10-17 15:55:18 -07:00
Junio C Hamano
d6a58b7773 Merge branch 'es/name-hash-no-trailing-slash-in-dirs'
Clean up the internal of the name-hash mechanism used to work
around case insensitivity on some filesystems to cleanly fix a
long-standing API glitch where the caller of cache_name_exists()
that ask about a directory with a counted string was required to
have '/' at one location past the end of the string.

* es/name-hash-no-trailing-slash-in-dirs:
  dir: revert work-around for retired dangerous behavior
  name-hash: stop storing trailing '/' on paths in index_state.dir_hash
  employ new explicit "exists in index?" API
  name-hash: refactor polymorphic index_name_exists()
2013-10-17 15:55:16 -07:00
Junio C Hamano
be98d915be Merge branch 'jk/trailing-slash-in-pathspec'
Code refactoring.

* jk/trailing-slash-in-pathspec:
  reset: handle submodule with trailing slash
  rm: re-use parse_pathspec's trailing-slash removal
2013-10-17 15:55:14 -07:00
Junio C Hamano
f52752d36a Merge branch 'lc/filter-branch-too-many-refs'
"git filter-branch" in a repository with many refs blew limit of
command line length.

* lc/filter-branch-too-many-refs:
  Allow git-filter-branch to process large repositories with lots of branches.
2013-10-17 15:55:12 -07:00
Junio C Hamano
ff6e1b887f Merge branch 'jc/checkout-detach-doc'
"git checkout [--detach] <commit>" was listed poorly in the
synopsis section of its documentation.

* jc/checkout-detach-doc:
  checkout: update synopsys and documentation on detaching HEAD
2013-10-17 15:55:08 -07:00
Junio C Hamano
83f18cdd71 Sync with maint
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-17 15:54:28 -07:00
Junio C Hamano
92ab409055 Start preparing for 1.8.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-17 15:50:45 -07:00
Junio C Hamano
9432c6aaa5 Merge branch 'jk/upload-pack-keepalive' into maint
* jk/upload-pack-keepalive:
  upload-pack: bump keepalive default to 5 seconds
  upload-pack: send keepalive packets during pack computation
2013-10-17 15:46:01 -07:00
Junio C Hamano
968792eeeb Merge branch 'bc/http-backend-allow-405' into maint
* bc/http-backend-allow-405:
  http-backend: provide Allow header for 405
2013-10-17 15:46:00 -07:00
Junio C Hamano
da39d5e0bc Merge branch 'jc/cvsserver-perm-bit-fix' into maint
* jc/cvsserver-perm-bit-fix:
  cvsserver: pick up the right mode bits
2013-10-17 15:45:58 -07:00
Junio C Hamano
fa0963dac7 Merge branch 'js/add-i-mingw' into maint
* js/add-i-mingw:
  add--interactive: fix external command invocation on Windows
2013-10-17 15:45:56 -07:00
Junio C Hamano
f8aeacfa1f Merge branch 'nd/git-dir-pointing-at-gitfile' into maint
* nd/git-dir-pointing-at-gitfile:
  Make setup_git_env() resolve .git file when $GIT_DIR is not specified
2013-10-17 15:45:55 -07:00
Junio C Hamano
7d9dd6da4a Merge branch 'jk/has-sha1-file-retry-packed' into maint
* jk/has-sha1-file-retry-packed:
  has_sha1_file: re-check pack directory before giving up
2013-10-17 15:45:54 -07:00
Junio C Hamano
87b24a42ea Merge branch 'ap/commit-author-mailmap' into maint
* ap/commit-author-mailmap:
  commit: search author pattern against mailmap
2013-10-17 15:45:52 -07:00
Junio C Hamano
f8a3fd28fd Merge branch 'es/rebase-i-no-abbrev' into maint
* es/rebase-i-no-abbrev:
  rebase -i: fix short SHA-1 collision
  t3404: rebase -i: demonstrate short SHA-1 collision
  t3404: make tests more self-contained

Conflicts:
	t/t3404-rebase-interactive.sh
2013-10-17 15:45:50 -07:00
Junio C Hamano
9a3a02b605 Merge branch 'rt/rebase-p-no-merge-summary' into maint
* rt/rebase-p-no-merge-summary:
  rebase --preserve-merges: ignore "merge.log" config
2013-10-17 15:45:45 -07:00
Junio C Hamano
6f89c2714a Merge branch 'es/rebase-i-respect-core-commentchar' into maint
* es/rebase-i-respect-core-commentchar:
  rebase -i: fix cases ignoring core.commentchar
2013-10-17 15:45:24 -07:00
SZEDER Gábor
ddeaf7ef0d t4254: modernize tests
- Don't start tests with 'test $? = 0' to catch preparation done
  outside the test_expect_success block.

- Move writing the bogus patch and the expected output into the
  appropriate test_expect_success blocks.

- Use the test_must_fail helper instead of manually checking for
  non-zero exit code.

- Use the debug-friendly test_path_is_file helper instead of 'test -f'.

- No space after '>'.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-17 15:05:53 -07:00
Junio C Hamano
1d25dd416f Update draft release notes to 1.8.5
List notable topics that graduated during Jonathan's interim
maintainership.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 12:27:45 -07:00
Junio C Hamano
1668b7d78f Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  git-svn: Warn about changing default for --prefix in Git v2.0
  Documentation/git-svn: Promote the use of --prefix in docs + examples
  git-svn.txt: elaborate on rev_map files
  git-svn.txt: replace .git with $GIT_DIR
  git-svn.txt: reword description of gc command
  git-svn.txt: fix AsciiDoc formatting error
  git-svn: fix signed commit parsing
2013-10-16 10:45:58 -07:00
Brandon Casey
15f7221686 contrib/git-credential-gnome-keyring.c: support really ancient gnome-keyring
The gnome-keyring lib (0.4) distributed with RHEL 4.X is really ancient
and does not provide most of the synchronous functions that even ancient
releases do.  Thankfully, we're only using one function that is missing.
Let's emulate gnome_keyring_item_delete_sync() by calling the asynchronous
function and then triggering the event loop processing until our
callback is called.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:33 -07:00
Brandon Casey
5a3db11053 contrib/git-credential-gnome-keyring.c: support ancient gnome-keyring
The gnome-keyring lib distributed with RHEL 5.X is ancient and does
not provide a few of the functions/defines that more recent versions
do, but mostly the API is the same.  Let's provide the missing bits
via macro definitions and function implementation.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:33 -07:00
Brandon Casey
81c57e2c9d contrib/git-credential-gnome-keyring.c: report failure to store password
Produce an error message when we fail to store a password to the keyring.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:33 -07:00
Brandon Casey
3006297a0e contrib/git-credential-gnome-keyring.c: use glib messaging functions
Rather than roll our own, let's use the messaging functions provided
by glib.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:32 -07:00
Brandon Casey
68a65f5fe5 contrib/git-credential-gnome-keyring.c: use glib memory allocation functions
Rather than roll our own, let's use the memory allocation/free routines
provided by glib.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:32 -07:00
Brandon Casey
da2727f23c contrib/git-credential-gnome-keyring.c: use secure memory for reading passwords
gnome-keyring provides functions to allocate non-pageable memory (if
possible).  Let's use them to allocate memory that may be used to hold
secure data read from the keyring.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:32 -07:00