1
0
mirror of https://github.com/git/git.git synced 2024-10-01 00:12:47 +02:00
Commit Graph

14293 Commits

Author SHA1 Message Date
Rafael Garcia-Suarez
eae7a75904 Spelling fixes in the gitweb documentation
Mostly spelling and grammar nits.

Signed-off-by: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-21 23:18:06 -07:00
Clifford Caoile
dbe48256b4 git.el: Set process-environment instead of invoking env
According to the similar patch from David Kågedal [1], "this will make
it a little less posix-dependent and more efficient." However, there
are two other areas that need to replaced, namely
git-run-command-region and git-run-hooks. This patch implements the
changes of [1] onto those Emacs Lisp functions.

If unpatched, using the git port "msysgit" on Windows will require
defadvice changes as shown at [2] (also explained at 4msysgit.git
[3]).

I have tested git-run-command-region on msysgit, because this is
always called by git-commit (via git-commit-tree <- git-do-commit <-
git-commit-file). However, I could not test git-run-hooks because it
currently does not work on the Emacs Windows port. The latter reports
the hooks files as a+rw and a-x, despite msysgit and cygwin chmod
setting on the respective files.

References:
[1] f27e55864317611385be4d33b3c53ca787379df9
[2] http://groups.google.com/group/msysgit/browse_thread/thread/b852fef689817707
[3] http://repo.or.cz/w/git/mingw/4msysgit.git?a=commit;h=3c30e5e87358eba7b6d7dcd6301ae8438f0c30ea

Signed-off-by: Clifford Caoile <piyo@users.sourceforge.net>
Acked-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-21 22:56:16 -07:00
Teemu Likonen
f457413908 bash: Add completion for git diff --base --ours --theirs
Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-21 22:52:15 -07:00
Gerrit Pape
37152d8310 diff-options.txt: document the new "--dirstat" option
This commit adds the documentation for the new option added by 7df7c01
(Add "--dirstat" for some directory statistics, 2008-02-12).

Noticed by Clint Adams, reported through
 http://bugs.debian.org/476437

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-21 22:50:21 -07:00
Paolo Bonzini
84bb2dfd9f Add a remote.*.mirror configuration option
This patch adds a remote.*.mirror configuration option that,
when set, automatically puts git-push in --mirror mode for that
remote.

Furthermore, the option is set automatically by `git remote
add --mirror'.

The code in remote.c to parse remote.*.skipdefaultupdate
had a subtle problem: a comment in the code indicated that
special care was needed for boolean options, but this care was
not used in parsing the option.  Since I was touching related
code, I did this fix too.

[jc: and I further fixed up the "ignore boolean" code.]

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-20 18:49:22 -07:00
Lars Hjemli
f9fd5210c8 Add tests for branch --[no-]merged
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-20 18:16:46 -07:00
Lars Hjemli
9a7ea2b1f3 git-branch.txt: compare --contains, --merged and --no-merged
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-20 18:16:46 -07:00
Lars Hjemli
e8b404c27e git-branch: add support for --merged and --no-merged
These options filter the output from git branch to only include branches
whose tip is either merged or not merged into HEAD.

The use-case for these options is when working with integration of branches
from many remotes: `git branch --no-merged -a` will show a nice list of merge
candidates while `git branch --merged -a` will show the progress of your
integration work.

Also, a plain `git branch --merged` is a quick way to find local branches
which you might want to delete.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-20 18:16:46 -07:00
Junio C Hamano
5909ca92d8 First batch of post 1.5.5 updates
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-20 16:03:40 -07:00
Junio C Hamano
5f0734f4b2 Merge branch 'maint'
* maint:
  GIT 1.5.5.1
2008-04-20 15:51:57 -07:00
Junio C Hamano
66aaa2fc22 GIT 1.5.5.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.5.5.1
2008-04-20 11:36:53 -07:00
Junio C Hamano
41a3e3aa9b Merge branch 'jc/maint-rebase-am' into maint
* jc/maint-rebase-am:
  rebase: do not munge commit log message

Conflicts:

	git-am.sh
2008-04-19 23:01:51 -07:00
Junio C Hamano
e9f9d4f4b7 Merge branch 'jc/sha1-lookup'
* jc/sha1-lookup:
  sha1-lookup: make selection of 'middle' less aggressive
  sha1-lookup: more memory efficient search in sorted list of SHA-1
2008-04-19 21:12:52 -07:00
Junio C Hamano
4581f4020a Merge branch 'jc/dirstat'
* jc/dirstat:
  diff: make --dirstat binary-file safe
2008-04-19 21:12:34 -07:00
Junio C Hamano
a2fa254bd2 Merge branch 'mv/defer-gc'
* mv/defer-gc:
  contrib/hooks: add an example pre-auto-gc hook
  Documentation/hooks: add pre-auto-gc hook
  git-gc --auto: add pre-auto-gc hook
2008-04-19 21:12:24 -07:00
Junio C Hamano
3642617ee7 Merge branch 'py/submodule'
* py/submodule:
  builtin-status: Add tests for submodule summary
  builtin-status: submodule summary support
  git-submodule summary: --for-status option
2008-04-19 21:11:29 -07:00
Junio C Hamano
d52301630f Merge branch 'jc/terminator-separator'
* jc/terminator-separator:
  log: teach "terminator" vs "separator" mode to "--pretty=format"
2008-04-19 21:10:54 -07:00
Junio C Hamano
141ca95be1 Merge branch 'jk/remote-default-show'
* jk/remote-default-show:
  git-remote: show all remotes with "git remote show"
2008-04-19 21:10:24 -07:00
Junio C Hamano
dc46fa36b8 Merge branch 'mk/color'
* mk/color:
  Use color.ui variable in scripts too
2008-04-19 21:09:54 -07:00
Junio C Hamano
8876046037 Merge branch 'jc/maint-rebase-am'
* jc/maint-rebase-am:
  rebase: do not munge commit log message

Conflicts:

	git-am.sh
2008-04-19 00:25:15 -07:00
Junio C Hamano
d9f39d9838 Merge branch 'maint'
* maint:
  gitweb: Fix 'history' view for deleted files with history
  Document that WebDAV doesn't need git on the server, and works over SSL
  git-remote: reject adding remotes with invalid names
  am: POSIX portability fix
2008-04-18 22:58:32 -07:00
Jakub Narebski
5634cf2476 gitweb: Fix 'history' view for deleted files with history
When asked for history of a file which is not present in given branch
("HEAD", i.e. current branch, or given by transient $hash_hase ('hb')
parameter), but is present deeper in the history (meaning that "git
rev-list --full-history $hash_base -- $file_name" is not empty), and
there is no $hash ('h') parameter set for a file, gitweb would spew
multiple of "Use of uninitialized value" warnings, and some links
would be missing.  This commit fixes this bug.

This bug occurs in the rare cases when "git log -- <path>" is empty
and "git log --full-history -- <path>" is not, or to be more exact in
the cases when full-history starts later than given branch.  It can
happen if you are using handcrafted gitwb URL, or if you follow
generic 'history' link or bookmark for a file which got deleted.

Gitweb tried to get file type ('tree', or 'blob', or even 'commit')
from the commit we start searching from (where the file was not
present), and not among found commits.  This was the cause of "Use of
uninitialized value" warnings.

This commit also add tests for such situation to t9500 test.

While we are it, return HTTP error if there is _no_ history; it means
that file or directory was not found (for given branch).  Also error
out if type of item could not be found: it should not happen now, but
better be sure.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-18 22:10:38 -07:00
Matthieu Moy
f01f81505a Document that WebDAV doesn't need git on the server, and works over SSL
I managed to set up a Git repository on a preconfigured WebDAV server,
and using HTTPS, without installing Git on it or changing the server
configuration. This works through a proxy too. This patch reflects
this (it previously stated that Git was _necessary_ on the server,
which isn't true). Also give a few hints to troubleshoting.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-18 22:09:24 -07:00
Junio C Hamano
4c414e2e09 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  am: POSIX portability fix
2008-04-18 22:07:00 -07:00
Jonas Fonseca
24b6177e02 git-remote: reject adding remotes with invalid names
This can happen if the arguments to git-remote add is switched by the
user, and git would only show an error if fetching was also requested.
Fix it by using the refspec parsing engine to check if the requested
name can be parsed as a remote before add it.

Also cleanup so that the "remote.<name>.url" config name buffer is only
initialized once.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-18 16:31:27 -07:00
Junio C Hamano
29df2385d0 am: POSIX portability fix
POSIX allows echo without flag to interpret specials such as \n, and we
tried to make things portable by using printf instead where it matters.
Recently added code to "git am" had unprotected "echo", which was caught
by t4014 and Rémi Vanicat.

This should fix it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-18 16:11:40 -07:00
Heikki Orsila
06cbe85503 Make core.sharedRepository more generic
git init --shared=0xxx, where '0xxx' is an octal number, will create
a repository with file modes set to '0xxx'. Users with a safe umask
value (0077) can use this option to force file modes. For example,
'0640' is a group-readable but not group-writable regardless of
user's umask value. Values compatible with old Git versions are written
as they were before, for compatibility reasons. That is, "1" for
"group" and "2" for "everybody".

"git config core.sharedRepository 0xxx" is also handled.

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-16 18:23:54 -07:00
Junio C Hamano
9a49e00b9a Merge branch 'maint'
* maint:
  git-am: minor cleanup
  Clarify and fix English in "git-rm" documentation
2008-04-16 17:49:52 -07:00
Junio C Hamano
d0ab520a25 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  git-am: minor cleanup
  Clarify and fix English in "git-rm" documentation
2008-04-16 17:04:05 -07:00
Junio C Hamano
11dc4e70c3 git-am: minor cleanup
This moves the assignment to FIRSTLINE down so that we do not have
to have multiple copies.

Suggested by Linus.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-16 16:46:26 -07:00
Jon Loeliger
25dc720077 Clarify and fix English in "git-rm" documentation
Do some verb-noun agreement changes.
Clarify some file globbing cases.
Fixed a wrong statement in an example.

Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-16 16:45:23 -07:00
Junio C Hamano
5e835cac86 rebase: do not munge commit log message
Traditionally git-rebase was implemented in terms of "format-patch" piped
to "am -3", to strike balance between speed (because it avoids a rather
expensive read-tree/merge-recursive machinery most of the time) and
flexibility (the magic "-3" allows it to fall back to 3-way merge as
necessary).  However, this combination has one flaw when dealing with a
nonstandard commit log message format that has more than one lines in the
first paragraph.

This teaches "git am --rebasing" to take advantage of the fact that the
mbox message "git rebase" prepares for it records the original commit
object name, to get the log message from the original commit object
instead.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-16 12:50:48 -07:00
Junio C Hamano
a17b1d2f0b Merge branch 'maint'
* maint:
  git-bisect: make "start", "good" and "skip" succeed or fail atomically
  git-am: cope better with an empty Subject: line
  Ignore leading empty lines while summarizing merges
  bisect: squelch "fatal: ref HEAD not a symref" misleading message
  builtin-apply: Show a more descriptive error on failure when opening a patch
  Clarify documentation of git-cvsserver, particularly in relation to git-shell
2008-04-16 00:45:52 -07:00
Junio C Hamano
464509f790 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  git-bisect: make "start", "good" and "skip" succeed or fail atomically
  git-am: cope better with an empty Subject: line
  Ignore leading empty lines while summarizing merges
  bisect: squelch "fatal: ref HEAD not a symref" misleading message
  builtin-apply: Show a more descriptive error on failure when opening a patch
  Clarify documentation of git-cvsserver, particularly in relation to git-shell
2008-04-16 00:37:33 -07:00
Christian Couder
d3e54c8829 git-bisect: make "start", "good" and "skip" succeed or fail atomically
Before this patch, when "git bisect start", "git bisect good" or
"git bisect skip" were called with many revisions, they could fail
after having already marked some revisions as "good", "bad" or
"skip".

This could be especilally bad for "git bisect start" because as
the file ".git/BISECT_NAMES" would not have been written, there
would have been no attempt to clear the marked revisions on a
"git bisect reset". That's because if there is no
".git/BISECT_NAMES" file, nothing is done to clean things up, as
the bisect session is not supposed to have started.

While at it, let's also create the ".git/BISECT_START" file, only
after ".git/BISECT_NAMES" as been created.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-16 00:11:37 -07:00
Linus Torvalds
2e6e3e829f git-am: cope better with an empty Subject: line
When the Subject: line is empty for whatever reason, git-am was fooled by
it and left an empty line at the beginning of the resulting commit log
message.

This moves the logic around so that we do not keep $SUBJECT in a separate
variable.  Instead, $dotest/msg-clean, which used to be the log message
body extracted from the message and then trailing whitespaces cleansed
out, now contains the subject line followed by a blank line at the
beginning for normal messages, and we use the first line from the file as
the summary line throughout the program.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-16 00:11:04 -07:00
Linus Torvalds
6a28518ae0 Ignore leading empty lines while summarizing merges
"git log" and friends normally skip the initial empty lines when showing
one-line summary of a commit, but merge summary didn't.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
----
 builtin-fmt-merge-msg.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-15 23:53:26 -07:00
Christian Couder
48949a18c8 bisect: squelch "fatal: ref HEAD not a symref" misleading message
To get the current HEAD when we start bisecting using for example
"git bisect start", we first try "git symbolic-ref HEAD" to get a
nice name, and if it fails, we fall back to "git rev-parse
--verify HEAD".

The problem is that when "git symbolic-ref HEAD" fails, it
displays "fatal: ref HEAD not a symref", so it looks like "git
bisect start" failed and does not accept detached HEAD, even if
in fact it worked fine.

This patch adds "-q" option to the "git symbolic-ref" call to
get rid of the misleading error message.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-15 22:42:19 -07:00
Alberto Bertogli
1da16439be builtin-apply: Show a more descriptive error on failure when opening a patch
When a patch can't be opened (it doesn't exist, there are permission
problems, etc.) we get the usage text, which is not a proper indication of
failure.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-15 22:42:08 -07:00
Scott Collins
2c2d02a6a7 Clarify documentation of git-cvsserver, particularly in relation to git-shell
For SSH clients restricted to git-shell, CVS_SERVER does not have to be
specified, because git-shell understands the default value of 'cvs' to
mean git-cvsserver'. This makes it totally transparent to CVS users, but
the instruction to set up CVS access for people with real shell access
does not apply.

Previous wording mentioning GIT_AUTHOR, GIT_COMMITTER variables was
unclear that we really meant GIT_AUTHOR_(NAME|EMAIL), etc.

Note that the .ssh/environment file is a good place to set these, and that
the .bashrc is shell-specific. Add a bit of text to differentiate cvs -d
(setting CVSROOT) from cvs co -d (setting the name of the newly checked
out directory).  Removed an extra 'Example:' string.

Signed-off-by: Scott Collins <scc@ScottCollins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-15 22:41:54 -07:00
Junio C Hamano
189d6b8bfa Merge branch 'maint'
* maint:
  git clean: Add test to verify directories aren't removed with a prefix
  git clean: Don't automatically remove directories when run within subdirectory
  git-submodule - possibly use branch name to describe a module
2008-04-14 23:15:09 -07:00
Shawn Bohrer
2b6f0b0a78 git clean: Add test to verify directories aren't removed with a prefix
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-14 23:14:58 -07:00
Shawn Bohrer
f2d0df7148 git clean: Don't automatically remove directories when run within subdirectory
When git clean is run from a subdirectory it should follow the normal
policy and only remove directories if they are passed in as a pathspec,
or -d is specified.

The fix is to send len which could be shorter than ent->len because we
have stripped the trailing '/' that read_directory adds. Additionaly
match_one() was modified to allow a name[] that is not NUL terminated.
This allows us to check if the name matched the pathspec exactly
instead of recursively.

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-14 23:14:58 -07:00
Mark Levedahl
f669ac0be9 git-submodule - possibly use branch name to describe a module
This changes the search logic for describing a submodule from:
- annotated tag
- any tag
- tag on a subsequent commit
- commit id

to

- annotated tag
- any tag
- tag on a subsequent commit
- local or remote branch
- commit id

The change is describing with respect to a branch before falling
back to the commit id. By itself, git-submodule will maintain submodules
as headless checkouts without ever making a local branch. In
general, such heads can always be described relative to the remote branch
regardless of existence of tags, and so provides a better fallback
summary than just the commit id.

This requires inserting an extra describe step as --contains is
incompatible with --all, but the latter can be used with --always
to fall back to a commit ID. Also, --contains implies --tags, so the
latter is not needed.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-14 23:14:08 -07:00
Stephan Beyer
8e4c6aa1ac builtin-apply.c: use git_config_string() to get apply_default_whitespace
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-14 22:37:47 -07:00
Junio C Hamano
c35b0b5884 Fix git_config_bool_or_int
The earlier one botched the return value logic between config_bool and
config_bool_and_int.  The former should normalize between 0 and 1 while
the latter should give back full range of integer values.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-13 12:11:11 -07:00
Ping Yin
e5e4a7f23d builtin-status: Add tests for submodule summary
Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12 20:00:45 -07:00
Ping Yin
ac8d5afca6 builtin-status: submodule summary support
This commit teaches 'git commit/status' show a new 'Modified submodules'
section, which is an output from:

  git submodule summary --cached --for-status --summary-limit <limit>

just before the 'Untracked files' section.

The <limit> is given by the config variable status.submodulesummary
to limit the submodule summary size. status.submodulesummary is a
bool/int variable with value:

  - false or 0 by default to disable the summary, or
  - positive number to limit the summary size, or
  - true or negative number to unlimit the summary size.

Also mention status.submodulesummary in the documentation.

Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12 20:00:45 -07:00
Ping Yin
d0f64dd44d git-submodule summary: --for-status option
The --for-status option is mainly used by builtin-status/commit.
It adds 'Modified submodules:' line at top and  '# ' prefix to all
following lines.

Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12 20:00:45 -07:00
Junio C Hamano
8fa29602d4 diff-files: mark an index entry we know is up-to-date as such
This does not make any difference when running diff-files alone, but if
you internally run run_diff_files() and then run other operations further
on the index, we do not have to run lstat(2) again on entries we already
have checked.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12 19:42:17 -07:00