Commit Graph

26759 Commits

Author SHA1 Message Date
Junio C Hamano
3d8567417d Merge branch 'jn/no-g-plus-s-on-bsd' into next
* jn/no-g-plus-s-on-bsd:
  Makefile: do not set setgid bit on directories on GNU/kFreeBSD
2011-10-06 15:42:02 -07:00
Junio C Hamano
a68770d8f0 Merge branch 'jn/ident-from-etc-mailname' into next
* jn/ident-from-etc-mailname:
  ident: do not retrieve default ident when unnecessary
  ident: check /etc/mailname if email is unknown
2011-10-06 15:42:02 -07:00
Junio C Hamano
d6c6741b2d Merge branch 'jc/is-url-simplify' into next
* jc/is-url-simplify:
  url.c: simplify is_url()
2011-10-06 15:42:01 -07:00
Junio C Hamano
209126d108 Merge branch 'nd/git-daemon-error-msgs' into next
* nd/git-daemon-error-msgs:
  daemon: return "access denied" if a service is not allowed
2011-10-06 15:42:01 -07:00
Junio C Hamano
0c5f5d073e Merge branch 'nd/document-err-packet' into next
* nd/document-err-packet:
  pack-protocol: document "ERR" line
2011-10-06 15:42:01 -07:00
Junio C Hamano
5f3630f46e Merge branch 'nd/daemon-log-sock-errors' into next
* nd/daemon-log-sock-errors:
  daemon: log errors if we could not use some sockets
2011-10-06 15:42:00 -07:00
Junio C Hamano
7e3083f3fe Merge branch 'il/archive-err-signal' into next
* il/archive-err-signal:
  Support ERR in remote archive like in fetch/push
2011-10-06 15:42:00 -07:00
Junio C Hamano
da42ad07ec Merge branch 'cp/git-web-browse-browsers' into next
* cp/git-web-browse-browsers:
  git-web--browse: avoid the use of eval
2011-10-06 15:42:00 -07:00
Junio C Hamano
b16cffe149 Merge branch 'jc/grep-untracked-exclude' into next
* jc/grep-untracked-exclude:
  grep: teach --untracked and --exclude-standard options
2011-10-06 15:41:59 -07:00
Junio C Hamano
69fe65d498 Merge branch 'jp/get-ref-dir-unsorted' into next
* jp/get-ref-dir-unsorted:
  refs: Use binary search to lookup refs faster
  Don't sort ref_list too early

Conflicts:
	refs.c
2011-10-06 15:41:59 -07:00
Junio C Hamano
33ac777f10 Merge branch 'ph/push-to-delete-nothing' into next
* ph/push-to-delete-nothing:
  receive-pack: don't pass non-existent refs to post-{receive,update} hooks

Conflicts:
	builtin/receive-pack.c
2011-10-06 15:41:59 -07:00
Junio C Hamano
64061aaf7f Merge branch 'jc/checkout-from-tree-keep-local-changes' into next
* jc/checkout-from-tree-keep-local-changes:
  checkout $tree $path: do not clobber local changes in $path not in $tree
2011-10-06 15:41:58 -07:00
Junio C Hamano
93c00f0373 Merge branch 'cs/perl-config-path-send-email' into next
* cs/perl-config-path-send-email:
  use new Git::config_path() for aliasesfile
  Add Git::config_path()
2011-10-06 15:41:58 -07:00
Junio C Hamano
78b31cdd9e Merge branch 'zj/send-email-authen-sasl' into next
* zj/send-email-authen-sasl:
  send-email: auth plain/login fix
2011-10-06 15:41:58 -07:00
Junio C Hamano
dd4936cc3f Merge branch 'jc/parse-options-boolean' into next
* jc/parse-options-boolean:
  apply: use OPT_NOOP_NOARG
  revert: use OPT_NOOP_NOARG
  parseopt: add OPT_NOOP_NOARG
  archive.c: use OPT_BOOL()
  parse-options: deprecate OPT_BOOLEAN

Conflicts:
	builtin/revert.c
2011-10-06 15:41:57 -07:00
Junio C Hamano
76e90c3381 Merge branch 'dm/tree-walk' into next
* dm/tree-walk:
  tree-walk: micro-optimization in tree_entry_interesting
  tree-walk: drop unused parameter from match_dir_prefix
2011-10-06 15:41:57 -07:00
Junio C Hamano
9236f5e71f Merge branch 'ps/gitweb-js-with-lineno' into next
* ps/gitweb-js-with-lineno:
  gitweb: Fix links to lines in blobs when javascript-actions are enabled
2011-10-06 15:41:57 -07:00
Junio C Hamano
0af69bb8f1 Merge branch 'mh/maint-notes-merge-pathbuf-fix' into next
* mh/maint-notes-merge-pathbuf-fix:
  notes_merge_commit(): do not pass temporary buffer to other function
2011-10-06 15:41:56 -07:00
Junio C Hamano
f6b8355f7f Merge branch 'nd/sparse-doc' into next
* nd/sparse-doc:
  git-read-tree.txt: update sparse checkout examples
2011-10-06 15:41:56 -07:00
Junio C Hamano
a9dfd8fb8a Merge branch 'jc/apply-blank-at-eof-fix' into next
* jc/apply-blank-at-eof-fix:
  apply --whitespace=error: correctly report new blank lines at end
2011-10-06 15:41:56 -07:00
Junio C Hamano
3a01ef1b55 Merge branch 'di/fast-import-empty-tag-note-fix' into next
* di/fast-import-empty-tag-note-fix:
  fast-import: don't allow to note on empty branch
  fast-import: don't allow to tag empty branch
2011-10-06 15:41:55 -07:00
Junio C Hamano
fa5e0fe777 Merge branch 'jc/request-pull-show-head-4' into next
* jc/request-pull-show-head-4:
  request-pull: use the branch description
  request-pull: state what commit to expect
  request-pull: modernize style
  branch: teach --edit-description option
  format-patch: use branch description in cover letter
  branch: add read_branch_desc() helper function

Conflicts:
	builtin/branch.c
2011-10-06 15:41:55 -07:00
Junio C Hamano
c2774985d8 Merge branch 'mh/check-ref-format-3' into next
* mh/check-ref-format-3: (23 commits)
  add_ref(): verify that the refname is formatted correctly
  resolve_ref(): expand documentation
  resolve_ref(): also treat a too-long SHA1 as invalid
  resolve_ref(): emit warnings for improperly-formatted references
  resolve_ref(): verify that the input refname has the right format
  remote: avoid passing NULL to read_ref()
  remote: use xstrdup() instead of strdup()
  resolve_ref(): do not follow incorrectly-formatted symbolic refs
  resolve_ref(): extract a function get_packed_ref()
  resolve_ref(): turn buffer into a proper string as soon as possible
  resolve_ref(): only follow a symlink that contains a valid, normalized refname
  resolve_ref(): use prefixcmp()
  resolve_ref(): explicitly fail if a symlink is not readable
  Change check_refname_format() to reject unnormalized refnames
  Inline function refname_format_print()
  Make collapse_slashes() allocate memory for its result
  Do not allow ".lock" at the end of any refname component
  Refactor check_refname_format()
  Change check_ref_format() to take a flags argument
  Change bad_ref_char() to return a boolean value
  ...
2011-10-06 15:41:54 -07:00
Junio C Hamano
c083e6915d Merge branch 'nd/maint-autofix-tag-in-head' into next
* nd/maint-autofix-tag-in-head:
  Accept tags in HEAD or MERGE_HEAD
  merge: remove global variable head[]
  merge: use return value of resolve_ref() to determine if HEAD is invalid
  merge: keep stash[] a local variable

Conflicts:
	builtin/merge.c
2011-10-06 15:41:54 -07:00
Junio C Hamano
e3cbb90185 Merge branch 'nd/maint-sparse-errors' into next
* nd/maint-sparse-errors:
  Add explanation why we do not allow to sparse checkout to empty working tree
  sparse checkout: show error messages when worktree shaping fails
2011-10-06 15:41:54 -07:00
Junio C Hamano
325270b0a6 Merge branch 'bw/grep-no-index-no-exclude' into next
* bw/grep-no-index-no-exclude:
  grep --no-index: don't use git standard exclusions
  grep: do not use --index in the short usage output
2011-10-06 15:41:53 -07:00
Junio C Hamano
0354e94b6b Merge branch 'js/bisect-no-checkout' into next
* js/bisect-no-checkout:
  bisect: fix exiting when checkout failed in bisect_start()
2011-10-06 15:41:53 -07:00
Junio C Hamano
02f99826d9 Merge branch 'sp/smart-http-failure' into next
* sp/smart-http-failure:
  remote-curl: Fix warning after HTTP failure
2011-10-06 15:41:53 -07:00
Junio C Hamano
c7a33e5ffe Merge branch 'mh/iterate-refs' into next
* mh/iterate-refs:
  refs.c: make create_cached_refs() static
  Retain caches of submodule refs
  Store the submodule name in struct cached_refs
  Allocate cached_refs objects dynamically
  Change the signature of read_packed_refs()
  Access reference caches only through new function get_cached_refs()
  Extract a function clear_cached_refs()
2011-10-06 15:41:52 -07:00
Junio C Hamano
b8e830fdb1 Merge branch 'jm/mergetool-pathspec' into next
* jm/mergetool-pathspec:
  mergetool: no longer need to save standard input
  mergetool: Use args as pathspec to unmerged files
2011-10-06 15:41:52 -07:00
Junio C Hamano
36c972d2e3 Merge branch 'jc/maint-diffstat-numstat-context' into next
* jc/maint-diffstat-numstat-context:
  diff: teach --stat/--numstat to honor -U$num
2011-10-06 15:41:52 -07:00
Junio C Hamano
96db20de26 Merge branch 'mz/remote-rename' into next
* mz/remote-rename:
  remote: only update remote-tracking branch if updating refspec
  remote rename: warn when refspec was not updated
  remote: "rename o foo" should not rename ref "origin/bar"
  remote: write correct fetch spec when renaming remote 'remote'
2011-10-06 15:41:52 -07:00
Junio C Hamano
8349bca15d Merge branch 'cb/common-prefix-unification' into next
* cb/common-prefix-unification:
  rename pathspec_prefix() to common_prefix() and move to dir.[ch]
  consolidate pathspec_prefix and common_prefix
  remove prefix argument from pathspec_prefix
2011-10-06 15:41:51 -07:00
Junio C Hamano
668a7068af Merge branch 'jn/maint-http-error-message' into next
* jn/maint-http-error-message:
  http: avoid empty error messages for some curl errors
  http: remove extra newline in error message
2011-10-06 15:41:51 -07:00
Junio C Hamano
4c105df120 Merge branch 'hv/submodule-update-none' into next
* hv/submodule-update-none:
  add update 'none' flag to disable update of submodule by default
  submodule: move update configuration variable further up
2011-10-06 15:41:51 -07:00
Junio C Hamano
3526bb9cde Merge branch 'fg/submodule-git-file-git-dir' into next
* fg/submodule-git-file-git-dir:
  Move git-dir for submodules
  rev-parse: add option --resolve-git-dir <path>

Conflicts:
	cache.h
	git-submodule.sh
2011-10-06 15:41:51 -07:00
Jonathan Nieder
d855e4d35d ident: do not retrieve default ident when unnecessary
Avoid a getpwuid() call (which contacts the network if the password
database is not local), read of /etc/mailname, gethostname() call, and
reverse DNS lookup if the user has already chosen a name and email
through configuration, the environment, or the command line.

This should slightly speed up commands like "git commit".  More
importantly, it improves error reporting when computation of the
default ident string does not go smoothly.  For example, after
detecting a problem (e.g., "warning: cannot open /etc/mailname:
Permission denied") in retrieving the default committer identity:

	touch /etc/mailname;	# as root
	chmod -r /etc/mailname;	# as root
	git commit -m 'test commit'

you can squelch the warning while waiting for your sysadmin to fix the
permissions problem.

	echo '[user] email = me@example.com' >>~/.gitconfig

Inspired-by: Johannes Sixt <j6t@kdgb.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-06 11:16:16 -07:00
Junio C Hamano
c016814783 request-pull: use the branch description
Now we have branch descriptions stored in the repository, we can
use it when preparing the request-pull message.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 14:51:26 -07:00
Junio C Hamano
cf7316663e request-pull: state what commit to expect
The message gives a detailed explanation of the commit the requester based
the changes on, but lacks information that is necessary for the person who
performs a fetch & merge in order to verify that the correct branch was
fetched when responding to the pull request.

Add a few more lines to describe the commit at the tip expected to be
fetched to the same level of detail as the base commit.

Also update the warning message slightly when the script notices that the
commit may not have been pushed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 14:51:26 -07:00
Junio C Hamano
3c9f1e7c11 request-pull: modernize style
Make it a bit more conforming to Documentation/Codingstyle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 14:51:26 -07:00
Junio C Hamano
b7200e8397 branch: teach --edit-description option
Using branch.$name.description as the configuration key, give users a
place to write about what the purpose of the branch is and things like
that, so that various subsystems, e.g. "push -s", "request-pull", and
"format-patch --cover-letter", can later be taught to use this
information.

The "-m" option similar to "commit/tag" is deliberately omitted, as the
whole point of branch description is about giving descriptive information
(the name of the branch itself is a better place for information that fits
on a single-line).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 14:51:26 -07:00
Junio C Hamano
739453a3fb format-patch: use branch description in cover letter
Use the description for the branch when preparing the cover letter
when available.

While at it, mark a loosely written codepath that would do a random and
useless thing given an unusual input (e.g. "^master HEAD HEAD^"), which
we may want to fix someday.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 14:50:46 -07:00
Junio C Hamano
6f9a332144 branch: add read_branch_desc() helper function
This will be used by various callers that make use of the branch
description throughout the system, so that if we need to update
the implementation the callers do not have to be modified.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 14:48:39 -07:00
Michael Haggerty
dce4bab656 add_ref(): verify that the refname is formatted correctly
In add_ref(), verify that the refname is formatted correctly before
adding it to the ref_list.  Here we have to allow refname components
that start with ".", since (for example) the remote protocol uses
synthetic reference name ".have".  So add a new REFNAME_DOT_COMPONENT
flag that can be passed to check_refname_format() to allow leading
dots.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 13:45:31 -07:00
Michael Haggerty
7cb368421f resolve_ref(): expand documentation
Record information about resolve_ref(), hard-won via reverse
engineering, in a comment for future spelunkers.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 13:45:31 -07:00
Michael Haggerty
f989fea0e0 resolve_ref(): also treat a too-long SHA1 as invalid
If the SHA1 in a reference file is not terminated by a space or
end-of-file, consider it malformed and emit a warning.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 13:45:31 -07:00
Michael Haggerty
629cd3ac6d resolve_ref(): emit warnings for improperly-formatted references
While resolving references, if a reference is found that is in an
unrecognized format, emit a warning (and then fail, as before).
Wouldn't *you* want to know?

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 13:45:31 -07:00
Michael Haggerty
8384d78886 resolve_ref(): verify that the input refname has the right format
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 13:45:31 -07:00
Michael Haggerty
d51b720fca remote: avoid passing NULL to read_ref()
read_ref() can (and in test t5800, actually *does*) return NULL.
Don't pass the NULL along to read_ref().  Coincidentally, this mistake
didn't make resolve_ref() blow up, but upcoming changes to
resolve_ref() will make it less forgiving.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 13:45:31 -07:00
Michael Haggerty
c28cce55e0 remote: use xstrdup() instead of strdup()
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-05 13:45:31 -07:00