1
0
mirror of https://github.com/git/git.git synced 2024-10-21 13:59:03 +02:00
Commit Graph

34793 Commits

Author SHA1 Message Date
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
Brandon Casey
9fe3e6cf9e contrib/git-credential-gnome-keyring.c: use secure memory functions for passwds
gnome-keyring provides functions for allocating non-pageable memory (if
possible) intended to be used for storing passwords.  Let's use them.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:31 -07:00
Brandon Casey
8bb7a54c57 contrib/git-credential-gnome-keyring.c: use gnome helpers in keyring_object()
Rather than carefully allocating memory for sprintf() to write into,
let's make use of the glib helper function g_strdup_printf(), which
makes things a lot easier and less error-prone.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:31 -07:00
Brandon Casey
ff55c47d0f contrib/git-credential-gnome-keyring.c: set Gnome application name
Since this is a Gnome application, let's set the application name to
something reasonable.  This will be displayed in Gnome dialog boxes
e.g. the one that prompts for the user's keyring password.

We add an include statement for glib.h and add the glib-2.0 cflags and
libs to the compilation arguments, but both of these are really noops
since glib is already a dependency of gnome-keyring.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:31 -07:00
Brandon Casey
73bbc0796b contrib/git-credential-gnome-keyring.c: ensure buffer is non-empty before accessing
Ensure buffer length is non-zero before attempting to access the last
element.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:31 -07:00
Brandon Casey
fb2763746f contrib/git-credential-gnome-keyring.c: strlen() returns size_t, not ssize_t
Also, initialization is not necessary since it is assigned before it is
used.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:30 -07:00
Brandon Casey
7a6d6423c5 contrib/git-credential-gnome-keyring.c: exit non-zero when called incorrectly
If the correct arguments were not specified, this program should exit
non-zero.  Let's do so.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:30 -07:00
Brandon Casey
18fe5add33 contrib/git-credential-gnome-keyring.c: add static where applicable
Mark global variable and functions as static.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:35:29 -07:00
Brandon Casey
4bc47cc009 contrib/git-credential-gnome-keyring.c: *style* use "if ()" not "if()" etc.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16 09:34:26 -07:00
Brandon Casey
083afc0ec0 contrib/git-credential-gnome-keyring.c: remove unused die() function
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-23 10:58:07 -07:00
Brandon Casey
e72aefc9ec contrib/git-credential-gnome-keyring.c: remove unnecessary pre-declarations
These are all defined before they are used, so it is not necessary to
pre-declare them.  Remove the pre-declarations.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-23 10:58:07 -07:00
Junio C Hamano
128a96c984 Update draft release notes to 1.8.5 for the fifth batch of topics
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-20 12:42:02 -07:00
Junio C Hamano
7b8315bb59 Merge branch 'jk/upload-pack-keepalive'
When running "fetch -q", a long silence while the sender side
computes the set of objects to send can be mistaken by proxies as
dropped connection.  The server side has been taught to send a small
empty messages to keep the connection alive.

* jk/upload-pack-keepalive:
  upload-pack: bump keepalive default to 5 seconds
  upload-pack: send keepalive packets during pack computation
2013-09-20 12:39:05 -07:00
Junio C Hamano
f406140baa Merge branch 'fc/at-head'
Instead of typing four capital letters "HEAD", you can say "@" now,
e.g. "git log @".

* fc/at-head:
  Add new @ shortcut for HEAD
  sha1-name: pass len argument to interpret_branch_name()
2013-09-20 12:38:10 -07:00
Junio C Hamano
005a1de380 Merge branch 'dw/check-ignore-sans-index'
"git check-ignore" follows the same rule as "git add" and "git
status" in that the ignore/exclude mechanism does not take effect
on paths that are already tracked.  With "--no-index" option, it
can be used to diagnose which paths that should have been ignored
have been mistakenly added to the index.

* dw/check-ignore-sans-index:
  check-ignore: Add option to ignore index contents
2013-09-20 12:37:32 -07:00
Junio C Hamano
b4980c63ac Merge branch 'mm/commit-template-squelch-advice-messages'
From the commit log template, remove irrelevant "advice" messages
that are shared with "git status" output.

* mm/commit-template-squelch-advice-messages:
  commit: disable status hints when writing to COMMIT_EDITMSG
  wt-status: turn advice_status_hints into a field of wt_status
  commit: factor status configuration is a helper function
2013-09-20 12:36:32 -07:00
Junio C Hamano
9a86b89941 Merge branch 'bk/refs-multi-update'
Give "update-refs" a "--stdin" option to read multiple update
requests and perform them in an all-or-none fashion.

* bk/refs-multi-update:
  update-ref: add test cases covering --stdin signature
  update-ref: support multiple simultaneous updates
  refs: add update_refs for multiple simultaneous updates
  refs: add function to repack without multiple refs
  refs: factor delete_ref loose ref step into a helper
  refs: factor update_ref steps into helpers
  refs: report ref type from lock_any_ref_for_update
  reset: rename update_refs to reset_refs
2013-09-20 12:36:12 -07:00
Junio C Hamano
087350398e Merge branch 'nr/git-cd-to-a-directory'
Just like "make -C <directory>", make "git -C <directory> ..." to
go there before doing anything else.

* nr/git-cd-to-a-directory:
  t0056: "git -C" test updates
  git: run in a directory given with -C option
2013-09-20 12:35:42 -07:00
Junio C Hamano
f26f250b44 Merge branch 'mm/rebase-continue-freebsd-WB'
Work around a bug in FreeBSD shell that caused a regression to "git
rebase" in v1.8.4.  May need to be later applied to 'maint'.

* mm/rebase-continue-freebsd-WB:
  rebase: fix run_specific_rebase's use of "return" on FreeBSD
2013-09-20 12:34:37 -07:00
Junio C Hamano
b05fc49adc Merge branch 'jh/checkout-auto-tracking'
Fix 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-09-20 12:31:57 -07:00
Junio C Hamano
26e53f8ac0 Merge branch 'bc/http-backend-allow-405'
When the webserver responds with "405 Method Not Allowed", it
should tell the client what methods are allowed with the "Allow"
header.

* bc/http-backend-allow-405:
  http-backend: provide Allow header for 405
2013-09-20 12:30:54 -07:00
Junio C Hamano
3fb9d685db Merge branch 'np/lookup-object-hashing'
Micro optimize hash function used in the object hash table.

* np/lookup-object-hashing:
  lookup_object: remove hashtable_index() and optimize hash_obj()
2013-09-20 12:30:49 -07:00
Junio C Hamano
08092082b7 Merge branch 'hu/cherry-pick-previous-branch'
Just like "git checkout -" knows to check out and "git merge -"
knows to merge the branch you were previously on, "git cherry-pick"
now understands "git cherry-pick -" to pick from the previous
branch.

* hu/cherry-pick-previous-branch:
  cherry-pick: allow "-" as abbreviation of '@{-1}'
2013-09-20 12:29:58 -07:00
Junio C Hamano
6d3e1f2e45 Merge branch 'mm/status-without-comment-char'
"git status" now omits the prefix to make its output a comment in a
commit log editor, which is not necessary for human consumption.

We may want to tighten the output to omit unnecessary trailing blank
lines, but that does not have to be in the scope of this series.

* mm/status-without-comment-char:
  t7508: avoid non-portable sed expression
  status: add missing blank line after list of "other" files
  tests: don't set status.displayCommentPrefix file-wide
  status: disable display of '#' comment prefix by default
  submodule summary: ignore --for-status option
  wt-status: use argv_array API
  builtin/stripspace.c: fix broken indentation
2013-09-20 12:29:01 -07:00
Junio C Hamano
638924fec2 Merge branch 'rh/peeling-tag-to-tag'
Make "foo^{tag}" to peel a tag to itself, i.e. no-op., and fail if
"foo" is not a tag.  "git rev-parse --verify v1.0^{tag}" would be a
more convenient way to say "test $(git cat-file -t v1.0) = tag".

* rh/peeling-tag-to-tag:
  peel_onion: do not assume length of x_type globals
  peel_onion(): add support for <rev>^{tag}
2013-09-20 12:27:18 -07:00
Junio C Hamano
2e6e3e82ee Merge branch 'jx/branch-vv-always-compare-with-upstream'
"git branch -v -v" (and "git status") did not distinguish among a
branch that does not build on any other branch, a branch that is in
sync with the branch it builds on, and a branch that is configured
to build on some other branch that no longer exists.

* jx/branch-vv-always-compare-with-upstream:
  status: always show tracking branch even no change
  branch: report invalid tracking branch as gone
2013-09-20 12:26:57 -07:00
Junio C Hamano
238504b014 Merge branch 'nd/fetch-into-shallow'
When there is no sufficient overlap between old and new history
during a fetch into a shallow repository, we unnecessarily sent
objects the sending side knows the receiving end has.

* 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-09-20 12:25:32 -07:00
Junio C Hamano
79e46c9fed Merge branch 'jk/config-int-range-check'
* jk/config-int-range-check:
  compat/mingw.h: define PRId64
2013-09-19 11:04:25 -07:00
Johannes Sixt
1562f3be48 compat/mingw.h: define PRId64
Provide PRId64 alongside PRIuMAX.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-19 11:03:38 -07:00
Nazri Ramliy
28a81f8b93 t0056: "git -C" test updates
Instead of repeating the text to record as the commit log message
and string we expect to see in "log" output, use the same variable
to avoid them going out of sync.

Use different names for test files in different directories to
improve our chance to catch future breakages that makes "-C <dir>"
go to a place that is different from what was specified.

Signed-off-by: Nazri Ramliy <ayiehere@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-19 10:15:06 -07:00
Junio C Hamano
eeaee045c8 Merge branch 'maint'
* maint:
  Start preparing for 1.8.4.1
2013-09-18 12:08:41 -07:00
Junio C Hamano
a0d3f1090d Start preparing for 1.8.4.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-18 12:08:09 -07:00
Junio C Hamano
ebb9d1968a Merge branch 'bc/completion-for-bash-3.0' into maint
Some people still use rather old versions of bash, which cannot grok
some constructs like 'printf -v varname' the prompt and completion
code started to use recently.

* bc/completion-for-bash-3.0:
  contrib/git-prompt.sh: handle missing 'printf -v' more gracefully
  t9902-completion.sh: old Bash still does not support array+=('') notation
  git-completion.bash: use correct Bash/Zsh array length syntax
2013-09-18 12:00:11 -07:00
Junio C Hamano
b25b9d5939 Merge branch 'mm/no-shell-escape-in-die-message' into maint
Fixes a minor bug in "git rebase -i" (there could be others, as the
root cause is pretty generic) where the code feeds a random, data
dependeant string to 'echo' and expects it to come out literally.

* mm/no-shell-escape-in-die-message:
  die_with_status: use "printf '%s\n'", not "echo"
2013-09-18 11:59:51 -07:00
Junio C Hamano
dd42145b1e Merge branch 'jl/some-submodule-config-are-not-boolean' into maint
* jl/some-submodule-config-are-not-boolean:
  avoid segfault on submodule.*.path set to an empty "true"
2013-09-18 11:59:35 -07:00
Junio C Hamano
6930cd10de Merge branch 'tr/log-full-diff-keep-true-parents' into maint
Output from "git log --full-diff -- <pathspec>" looked strange,
because comparison was done with the previous ancestor that touched
the specified <pathspec>, causing the patches for paths outside the
pathspec to show more than the single commit has changed.

* tr/log-full-diff-keep-true-parents:
  log: use true parents for diff when walking reflogs
  log: use true parents for diff even when rewriting
2013-09-18 11:59:05 -07:00
Junio C Hamano
1e93c28f53 Merge branch 'jc/transport-do-not-use-connect-twice-in-fetch' into maint
The auto-tag-following code in "git fetch" tries to reuse the same
transport twice when the serving end does not cooperate and does
not give tags that point to commits that are asked for as part of
the primary transfer.  Unfortunately, Git-aware transport helper
interface is not designed to be used more than once, hence this
does not work over smart-http transfer.

* jc/transport-do-not-use-connect-twice-in-fetch:
  builtin/fetch.c: Fix a sparse warning
  fetch: work around "transport-take-over" hack
  fetch: refactor code that fetches leftover tags
  fetch: refactor code that prepares a transport
  fetch: rename file-scope global "transport" to "gtransport"
  t5802: add test for connect helper
2013-09-18 11:58:18 -07:00
Junio C Hamano
4b510c385a Merge branch 'sp/clip-read-write-to-8mb' into maint
Send a large request to read(2)/write(2) as a smaller but still
reasonably large chunks, which would improve the latency when the
operation needs to be killed and incidentally works around broken
64-bit systems that cannot take a 2GB write or read in one go.

* sp/clip-read-write-to-8mb:
  Revert "compat/clipped-write.c: large write(2) fails on Mac OS X/XNU"
  xread, xwrite: limit size of IO to 8MB
2013-09-18 11:57:58 -07:00
Junio C Hamano
19230ab8a8 Merge branch 'jk/mailmap-incomplete-line' into maint
* jk/mailmap-incomplete-line:
  mailmap: handle mailmap blobs without trailing newlines
2013-09-18 11:57:33 -07:00
Junio C Hamano
587e0a164a Update draft release notes to 1.8.5 for the fourth batch of topics 2013-09-18 11:55:59 -07:00
Junio C Hamano
34e8d9982a Merge branch 'jc/url-match'
While normalizing a URL, we forgot that the buffer that holds it
could be relocated when it grows, which was a brown-paper-bag bug
that can lead to a crash introduced on 'master' post 1.8.4 release.

* jc/url-match:
  urlmatch.c: recompute pointer after append_normalized_escapes
2013-09-18 11:48:54 -07:00
Junio C Hamano
2f46b53957 Merge branch 'jc/cvsserver-perm-bit-fix'
"git cvsserver" computed the permission mode bits incorrectly for
executable files.

* jc/cvsserver-perm-bit-fix:
  cvsserver: pick up the right mode bits
2013-09-18 11:48:02 -07:00
Junio C Hamano
139189b92e Merge branch 'bc/send-email-ssl-die-message-fix'
When send-email comes up with an error message to die with upon
failure to start an SSL session, it tried to read the error string
from a wrong place.

* bc/send-email-ssl-die-message-fix:
  send-email: don't call methods on undefined values
2013-09-18 11:47:27 -07:00
Junio C Hamano
70c87a9854 Merge branch 'uh/git-svn-serf-fix'
"git-svn" used with SVN 1.8.0 when talking over https:// connection
dumped core due to a bug in the serf library that SVN uses.  Work
it around on our side, even though the SVN side is being fixed.

* uh/git-svn-serf-fix:
  git-svn: fix termination issues for remote svn connections
2013-09-18 11:46:06 -07:00
Junio C Hamano
751e2b3718 Merge branch 'fc/contrib-bzr-hg-fixes'
* fc/contrib-bzr-hg-fixes:
  contrib/remote-helpers: quote variable references in redirection targets
  contrib/remote-helpers: style updates for test scripts
  remote-hg: use notes to keep track of Hg revisions
  remote-helpers: cleanup more global variables
  remote-helpers: trivial style fixes
  remote-hg: improve basic test
  remote-hg: add missing &&s in the test
  remote-hg: fix test
  remote-bzr: make bzr branches configurable per-repo
  remote-bzr: fix export of utf-8 authors
2013-09-18 11:45:49 -07:00
Junio C Hamano
ac4d29550f Merge branch 'js/add-i-mingw'
The implementation of "add -i" has a crippling code to work around
ActiveState Perl limitation but it by mistake also triggered on Git
for Windows where MSYS perl is used.

* js/add-i-mingw:
  add--interactive: fix external command invocation on Windows
2013-09-18 11:45:06 -07:00
Junio C Hamano
34022ba21a Merge branch 'ks/p4-view-spec'
* ks/p4-view-spec:
  git p4: implement view spec wildcards with "p4 where"
  git p4 test: sanitize P4CHARSET
2013-09-18 11:44:50 -07:00
Junio C Hamano
6c34560053 Merge branch 'jk/duplicate-objects-in-packs'
A packfile that stores the same object more than once is broken and
will be rejected by "git index-pack" that is run when receiving data
over the wire.

* jk/duplicate-objects-in-packs:
  t5308: check that index-pack --strict detects duplicate objects
  test index-pack on packs with recoverable delta cycles
  add tests for indexing packs with delta cycles
  sha1-lookup: handle duplicate keys with GIT_USE_LOOKUP
  test-sha1: add a binary output mode
2013-09-18 11:43:47 -07:00
Junio C Hamano
01e0fa2b37 Merge branch 'nd/git-dir-pointing-at-gitfile'
We made sure that we notice the user-supplied GIT_DIR is actually a
gitfile, but did not do the same when the default ".git" is a gitfile.

* nd/git-dir-pointing-at-gitfile:
  Make setup_git_env() resolve .git file when $GIT_DIR is not specified
2013-09-18 11:42:36 -07:00