Daniel Barkalow [Sat, 26 Apr 2008 19:53:09 +0000 (15:53 -0400)]
Make walker.fetch_ref() take a struct ref.
This simplifies a few things, makes a few things slightly more
complicated, but, more importantly, allows that, when struct ref can
represent a symref, http_fetch_ref() can return one.
Incidentally makes the string that http_fetch_ref() gets include "refs/"
(if appropriate), because that's how the name field of struct ref works.
As far as I can tell, the usage in walker:interpret_target() wouldn't have
worked previously, if it ever would have been used, which it wouldn't
(since the fetch process uses the hash instead of the name of the ref
there).
Signed-off-by: Daniel Barkalow <redacted>
Signed-off-by: Junio C Hamano <redacted>
Christian Couder [Fri, 25 Apr 2008 06:25:41 +0000 (08:25 +0200)]
documentation: web--browse: add a note about konqueror
This note explains how to work around the fact that we try to use
kfmclient to launch konqueror.
Signed-off-by: Christian Couder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Christian Couder [Fri, 25 Apr 2008 06:25:35 +0000 (08:25 +0200)]
documentation: help: add info about "man.<tool>.cmd" config var
This patch also describes the current behavior for "konqueror" and
how to modify it using "man.<tool>.cmd" if needed.
Signed-off-by: Christian Couder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Christian Couder [Fri, 25 Apr 2008 06:24:58 +0000 (08:24 +0200)]
help: use "man.<tool>.cmd" as custom man viewer command
Currently "git help -m GITCMD" is restricted to a set of man viewers
defined at compile time. You can subvert the "man.<tool>.path" to
force "git help -m" to use a different man, viewer, but if you have a
man viewer whose invocation syntax does not match one of the current
tools then you would have to write a wrapper script for it.
This patch adds a git config variable "man.<tool>.cmd" which allows a
more flexible man viewer choice.
If you run "git help -m GITCMD" with the "man.viewer" config variable
set to an unrecognized tool then it will query the "man.<tool>.cmd"
config variable. If this variable exists, then the specified tool will
be treated as a custom man viewer and it will be run in a shell with
the man page name of the GITCMD added as extra parameter.
Signed-off-by: Christian Couder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Christian Couder [Fri, 25 Apr 2008 06:24:41 +0000 (08:24 +0200)]
documentation: help: add "man.<tool>.path" config variable
This patch documents the "man.<tool>.path" configuration
variable.
Signed-off-by: Christian Couder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Christian Couder [Fri, 25 Apr 2008 06:24:22 +0000 (08:24 +0200)]
help: use man viewer path from "man.<tool>.path" config var
This patch implements reading values from "man.<tool>.path"
configuration variables, and using these values as pathes to
the man viewer <tool>s when lauching them.
This makes it possible to use different version of the tools
than the one on the current PATH, or maybe a custom script.
In this patch we also try to launch "konqueror" using
"kfmclient" even if a path to a konqueror binary is given
in "man.konqueror.path".
The "man_viewer_list" becomes a simple string list to simplify
things for the following patches.
Signed-off-by: Christian Couder <redacted>
Signed-off-by: Junio C Hamano <redacted>
Dan McGee [Sat, 26 Apr 2008 20:14:28 +0000 (15:14 -0500)]
Allow cherry-pick (and revert) to add signoff line
I often find myself pulling patches off of other peoples trees using
cherry-pick, and following it with an immediate 'git commit --amend -s'
command. Eliminate the need for a double commit by allowing signoff on a
cherry-pick or revert.
Signed-off-by: Dan McGee <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paul Mackerras [Sat, 26 Apr 2008 06:00:00 +0000 (16:00 +1000)]
gitk: Reorganize processing of arguments for git log
This moves the scanning of the argument list for each view into a
new function, parseviewargs, which is called from start_rev_list.
This also makes the date mode and the merge mode be per-view rather
than global. In merge mode, we work out the list of relevant files
in a new function called from start_rev_list, so it will be updated
on File->Reload. Plus we now do that after running the argscmd, so
if we have one and it generates a -d or --merge option they will be
correctly handled now.
The other thing this does is to make errors detected in start_rev_list
not be fatal. Now instead of doing exit 1 we just pop up and error
window and put "No commits selected" in the graph pane.
Signed-off-by: Paul Mackerras <redacted>
Junio C Hamano [Fri, 25 Apr 2008 19:17:45 +0000 (12:17 -0700)]
Merge branch 'ho/shared'
* ho/shared:
Make core.sharedRepository more generic
Junio C Hamano [Fri, 25 Apr 2008 05:40:02 +0000 (22:40 -0700)]
Merge branch 'maint'
* maint:
remote: create fetch config lines with '+'
push: allow unqualified dest refspecs to DWIM
doc/git-gc: add a note about what is collected
t5516: remove ambiguity test (1)
Linked glossary from cvs-migration page
write-tree: properly detect failure to write tree objects
Jeff King [Tue, 22 Apr 2008 11:11:13 +0000 (07:11 -0400)]
remote: create fetch config lines with '+'
Since git-remote always uses remote tracking branches, it
should be safe to always force updates of those branches.
I.e., we should generate
fetch = +refs/heads/*:refs/remotes/$remote/*
instead of
fetch = refs/heads/*:refs/remotes/$remote/*
This was the behavior of the perl version, which seems to
have been lost in the C rewrite.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Wed, 23 Apr 2008 09:16:06 +0000 (05:16 -0400)]
push: allow unqualified dest refspecs to DWIM
Previously, a push like:
git push remote src:dst
would go through the following steps:
1. check for an unambiguous 'dst' on the remote; if it
exists, then push to that ref
2. otherwise, check if 'dst' begins with 'refs/'; if it
does, create a new ref
3. otherwise, complain because we don't know where in the
refs hierarchy to put 'dst'
However, in some cases, we can guess about the ref type of
'dst' based on the ref type of 'src'. Specifically, before
complaining we now check:
2.5. if 'src' resolves to a ref starting with refs/heads
or refs/tags, then prepend that to 'dst'
So now this creates a new branch on the remote, whereas it
previously failed with an error message:
git push master:newbranch
Note that, by design, we limit this DWIM behavior only to
source refs which resolve exactly (including symrefs which
resolve to existing refs). We still complain on a partial
destination refspec if the source is a raw sha1, or a ref
expression such as 'master~10'.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Fri, 25 Apr 2008 04:50:48 +0000 (21:50 -0700)]
Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
t5516: remove ambiguity test (1)
Linked glossary from cvs-migration page
write-tree: properly detect failure to write tree objects
Jeff King [Thu, 24 Apr 2008 01:28:36 +0000 (21:28 -0400)]
doc/git-gc: add a note about what is collected
It seems to be a FAQ that people try running git-gc, and
then get puzzled about why the size of their .git directory
didn't change. This note mentions the reasons why things
might unexpectedly get kept.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Shawn O. Pearce [Thu, 24 Apr 2008 01:38:30 +0000 (21:38 -0400)]
Merge branch 'maint'
* maint:
git-gui: Don't use '$$cr master' with aspell earlier than 0.60
Shawn O. Pearce [Thu, 24 Apr 2008 01:34:58 +0000 (21:34 -0400)]
git-gui: Don't use '$$cr master' with aspell earlier than 0.60
Apparently aspell 0.50 does not recognize "$$cr master" as a command,
but instead tries to offer suggestions for how to correctly spell
the word "cr". This is not quite what we are after when we want
the name of the current dictionary.
Instead of locking up git-gui waiting for a response that may never
come back from aspell we avoid sending this command if the binary
we have started claims to be before version 0.60.
Signed-off-by: Shawn O. Pearce <redacted>
Jeff King [Wed, 23 Apr 2008 09:21:45 +0000 (05:21 -0400)]
t5516: remove ambiguity test (1)
This test tried to push into a remote with ambiguous refs in
remotes/$x/master and remotes/$y/master. However, the remote
never actually tells us about the refs/remotes hierarchy, so
we don't even see this ambiguity.
The test happened to pass because we were simply looking for
failure, and the test fails for another reason: the dst
refspec does not exist and does not begin with refs/, making
it invalid.
Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
Matt Graham [Wed, 23 Apr 2008 13:13:51 +0000 (09:13 -0400)]
Linked glossary from cvs-migration page
Coming from CVS, I found the git glossary vital to learning git and learning
how terms in git correlate to the cvs terminology with which I am familiar.
This patch links the glossary from the cvs-migration page so cvs users will
be able to fine the glossary as soon as they start looking at git documents.
Signed-off-by: Matt Graham <redacted>
Acked-by: J. Bruce Fields <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Wed, 23 Apr 2008 16:47:17 +0000 (09:47 -0700)]
write-tree: properly detect failure to write tree objects
Tomasz Fortuna reported that "git commit" does not error out properly when
it cannot write tree objects out. "git write-tree" shares the same issue,
as the failure to notice the error is deep in the logic to write tree
objects out recursively.
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Wed, 23 Apr 2008 07:03:56 +0000 (00:03 -0700)]
Merge branch 'maint'
* maint:
Amend git-push refspec documentation
git-gc --prune is deprecated
svn-git: Use binmode for reading/writing binary rev maps
diff options documentation: refer to --diff-filter in --name-status
Don't force imap.host to be set when imap.tunnel is set
git-clone.txt: Adjust note to --shared for new pruning behavior of git-gc
git-svn bug with blank commits and author file
archive.c: format_subst - fixed bogus argument to memchr
copy.c: copy_fd - correctly report write errors
gitattributes: Fix subdirectory attributes specified from root directory
Junio C Hamano [Wed, 23 Apr 2008 06:37:06 +0000 (23:37 -0700)]
Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
svn-git: Use binmode for reading/writing binary rev maps
diff options documentation: refer to --diff-filter in --name-status
git-svn bug with blank commits and author file
archive.c: format_subst - fixed bogus argument to memchr
copy.c: copy_fd - correctly report write errors
gitattributes: Fix subdirectory attributes specified from root directory
Sam Vilain [Mon, 21 Apr 2008 03:31:24 +0000 (15:31 +1200)]
Amend git-push refspec documentation
These paragraphs are a little confusing. Also, make it clearer when
you have to specify the full name for <dst>
Signed-off-by: Sam Vilain <redacted>
Signed-off-by: Junio C Hamano <redacted>
Dmitry Potapov [Mon, 14 Apr 2008 12:17:31 +0000 (16:17 +0400)]
git-gc --prune is deprecated
25ee9731c137d0a24b0f4879eb0b0cce9b77d5b0 made the '--prune' option
deprecated and removed its description from the git-gc man page. This
patch removes all references to this option from the rest of the Git
documentation.
Signed-off-by: Junio C Hamano <redacted>
Michael Weber [Fri, 18 Apr 2008 13:12:04 +0000 (15:12 +0200)]
svn-git: Use binmode for reading/writing binary rev maps
Otherwise, there is a possible interaction with UTF-8 locales in
combination with PERL_UNICODE, resulting in "inconsistent size: 40" or
"read:"-type errors.
See also:
perldoc -f binmode
<http://perldoc.perl.org/perl581delta.html#UTF-8-no-longer-default-under-UTF-8-locales>
Signed-off-by: Michael Weber <redacted>
Acked-by: Eric Wong <redacted>
Signed-off-by: Junio C Hamano <redacted>
Miklos Vajna [Tue, 22 Apr 2008 12:23:48 +0000 (14:23 +0200)]
diff options documentation: refer to --diff-filter in --name-status
git diff --name-status outputs letters, but the meaning of those letters
is documented elsewhere. Add a note to make the manpage more intuitive.
Signed-off-by: Miklos Vajna <redacted>
Signed-off-by: Junio C Hamano <redacted>
Jeff King [Tue, 22 Apr 2008 10:41:47 +0000 (06:41 -0400)]
Don't force imap.host to be set when imap.tunnel is set
The documentation for git-imap-send suggests a tunnel setting such as
Tunnel = "ssh -q user@server.com /usr/bin/imapd ./Maildir 2> /dev/null"
which works wonderfully and doesn't require a username, password or port
setting.
However, git-imap-send currently requires that the imap.host variable be
set in the config even when it was unused. This patch changes imap-send
to only require that the imap.host setting is set if imap.tunnel is not
set. Otherwise, server.host is set to "tunnel" for reporting purposes.
Acked-by: Andy Parkins <redacted>
Signed-off-by: Junio C Hamano <redacted>
Brandon Casey [Thu, 3 Apr 2008 18:26:13 +0000 (13:26 -0500)]
git-clone.txt: Adjust note to --shared for new pruning behavior of git-gc
Since git-gc now always calls prune, even with --auto, unreferenced objects
may be removed by more operations than just git-gc. This is important for
clones created using --shared or --reference.
Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Dmitry Potapov <redacted>
Signed-off-by: Junio C Hamano <redacted>
Thomas Guyot-Sionnest [Tue, 22 Apr 2008 10:07:47 +0000 (06:07 -0400)]
git-svn bug with blank commits and author file
When trying to import from svn using an author file, git-svn bails out
if it encounters a blank author. The attached patch changes this
behavior and allow using the author file with blanks authors.
I came across this bug while importing from a cvs2svn repo where the
initial revision (1) has a blank author. This doesn't break the behavior
of bailing out when an unknown author is encountered.
Acked-by: Eric Wong <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ariel Badichi [Wed, 23 Apr 2008 01:06:27 +0000 (04:06 +0300)]
archive.c: format_subst - fixed bogus argument to memchr
Also removed a superfluous test.
Signed-off-by: Ariel Badichi <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ariel Badichi [Wed, 23 Apr 2008 01:05:29 +0000 (04:05 +0300)]
copy.c: copy_fd - correctly report write errors
Previously, the errno could have been lost due to an intervening
close() call.
This patch also contains minor cosmetic changes.
Signed-off-by: Ariel Badichi <redacted>
Signed-off-by: Junio C Hamano <redacted>
Matthew Ogilvie [Tue, 22 Apr 2008 18:19:12 +0000 (12:19 -0600)]
gitattributes: Fix subdirectory attributes specified from root directory
Signed-off-by: Matthew Ogilvie <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Tue, 22 Apr 2008 07:10:20 +0000 (00:10 -0700)]
Merge branch 'maint'
* maint:
post-receive-email: fix accidental removal of a trailing space in signature line
Escape project names before creating pathinfo URLs
Escape project name in regexp
bash: Add completion for git diff --base --ours --theirs
diff-options.txt: document the new "--dirstat" option
Andy Parkins [Mon, 21 Apr 2008 13:44:44 +0000 (14:44 +0100)]
post-receive-email: fix accidental removal of a trailing space in signature line
post-receive-email adds a signature to the end of emails in
generate_email_footer(). The signature was separated from the main email
body using the standard string "-- ". (see RFC 3676)
a6080a0 (War on whitespace, 2007-06-07) removed the trailing whitespace
from "-- ", leaving it as "--", which is not a correct signature
separator.
This patch restores the missing space, but does it in a way that will
not set off the trailing whitespace alarms.
Signed-off-by: Andy Parkins <redacted>
Signed-off-by: Junio C Hamano <redacted>
Dan McGee [Sun, 20 Apr 2008 17:28:44 +0000 (12:28 -0500)]
completion: remove use of dashed git commands
Signed-off-by: Dan McGee <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
Dan McGee [Sun, 20 Apr 2008 19:34:07 +0000 (14:34 -0500)]
completion: allow 'git remote' subcommand completion
After typing 'git remote ', the subcommand options were not shown. Fix it
by adding the missing __gitcomp call.
Signed-off-by: Dan McGee <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
martin f. krafft [Sun, 20 Apr 2008 21:23:38 +0000 (23:23 +0200)]
Escape project names before creating pathinfo URLs
If a project name contains special URL characters like +, gitweb's links
break in subtle ways. The solution is to pass the project name through
esc_url() and using the return value.
Signed-off-by: martin f. krafft <redacted>
Signed-off-by: Junio C Hamano <redacted>
martin f. krafft [Sun, 20 Apr 2008 21:03:56 +0000 (23:03 +0200)]
Escape project name in regexp
The project name, when used in a regular expression, needs to be quoted
properly, so that stuff like '++' in the project name does not cause
Perl to barf.
Related info: http://bugs.debian.org/476076
This is a bug in Perl's CGI.pm, but fixing that exposed a similar bug in
gitweb.perl
Signed-off-by: martin f. krafft <redacted>
Signed-off-by: Junio C Hamano <redacted>
Rafael Garcia-Suarez [Thu, 17 Apr 2008 11:45:52 +0000 (13:45 +0200)]
Spelling fixes in the gitweb documentation
Mostly spelling and grammar nits.
Signed-off-by: Rafael Garcia-Suarez <redacted>
Signed-off-by: Junio C Hamano <redacted>
Clifford Caoile [Fri, 18 Apr 2008 13:07:12 +0000 (22:07 +0900)]
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 <redacted>
Acked-by: David Kågedal <redacted>
Signed-off-by: Junio C Hamano <redacted>
Teemu Likonen [Sun, 20 Apr 2008 19:32:47 +0000 (22:32 +0300)]
bash: Add completion for git diff --base --ours --theirs
Signed-off-by: Teemu Likonen <redacted>
Acked-by: Shawn O. Pearce <redacted>
Signed-off-by: Junio C Hamano <redacted>
Gerrit Pape [Mon, 21 Apr 2008 18:15:52 +0000 (18:15 +0000)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Paolo Bonzini [Thu, 17 Apr 2008 11:17:20 +0000 (13:17 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Lars Hjemli [Fri, 18 Apr 2008 16:30:15 +0000 (18:30 +0200)]
Add tests for `branch --[no-]merged`
Signed-off-by: Lars Hjemli <redacted>
Signed-off-by: Junio C Hamano <redacted>
Lars Hjemli [Thu, 17 Apr 2008 22:27:08 +0000 (00:27 +0200)]
git-branch.txt: compare --contains, --merged and --no-merged
Signed-off-by: Lars Hjemli <redacted>
Signed-off-by: Junio C Hamano <redacted>
Lars Hjemli [Thu, 17 Apr 2008 20:24:50 +0000 (22:24 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Sun, 20 Apr 2008 23:03:40 +0000 (16:03 -0700)]
First batch of post 1.5.5 updates
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Sun, 20 Apr 2008 22:51:57 +0000 (15:51 -0700)]
Merge branch 'maint'
* maint:
GIT 1.5.5.1
Junio C Hamano [Sun, 20 Apr 2008 18:36:53 +0000 (11:36 -0700)]
GIT 1.5.5.1
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Sun, 20 Apr 2008 06:01:51 +0000 (23:01 -0700)]
Merge branch 'jc/maint-rebase-am' into maint
* jc/maint-rebase-am:
rebase: do not munge commit log message
Conflicts:
git-am.sh
Junio C Hamano [Sun, 20 Apr 2008 04:12:52 +0000 (21:12 -0700)]
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
Junio C Hamano [Sun, 20 Apr 2008 04:12:34 +0000 (21:12 -0700)]
Merge branch 'jc/dirstat'
* jc/dirstat:
diff: make --dirstat binary-file safe
Junio C Hamano [Sun, 20 Apr 2008 04:12:24 +0000 (21:12 -0700)]
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
Junio C Hamano [Sun, 20 Apr 2008 04:11:29 +0000 (21:11 -0700)]
Merge branch 'py/submodule'
* py/submodule:
builtin-status: Add tests for submodule summary
builtin-status: submodule summary support
git-submodule summary: --for-status option
Junio C Hamano [Sun, 20 Apr 2008 04:10:54 +0000 (21:10 -0700)]
Merge branch 'jc/terminator-separator'
* jc/terminator-separator:
log: teach "terminator" vs "separator" mode to "--pretty=format"
Junio C Hamano [Sun, 20 Apr 2008 04:10:24 +0000 (21:10 -0700)]
Merge branch 'jk/remote-default-show'
* jk/remote-default-show:
git-remote: show all remotes with "git remote show"
Junio C Hamano [Sun, 20 Apr 2008 04:09:54 +0000 (21:09 -0700)]
Merge branch 'mk/color'
* mk/color:
Use color.ui variable in scripts too
Junio C Hamano [Sat, 19 Apr 2008 07:25:15 +0000 (00:25 -0700)]
Merge branch 'jc/maint-rebase-am'
* jc/maint-rebase-am:
rebase: do not munge commit log message
Conflicts:
git-am.sh
Junio C Hamano [Sat, 19 Apr 2008 05:58:32 +0000 (22:58 -0700)]
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
Jakub Narebski [Sun, 13 Apr 2008 12:12:15 +0000 (14:12 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Matthieu Moy [Sun, 13 Apr 2008 13:38:21 +0000 (15:38 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Sat, 19 Apr 2008 05:07:00 +0000 (22:07 -0700)]
Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
am: POSIX portability fix
Jonas Fonseca [Sun, 13 Apr 2008 09:56:54 +0000 (11:56 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Fri, 18 Apr 2008 23:11:40 +0000 (16:11 -0700)]
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 <redacted>
Heikki Orsila [Wed, 16 Apr 2008 08:34:24 +0000 (11:34 +0300)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 17 Apr 2008 00:49:52 +0000 (17:49 -0700)]
Merge branch 'maint'
* maint:
git-am: minor cleanup
Clarify and fix English in "git-rm" documentation
Junio C Hamano [Thu, 17 Apr 2008 00:04:05 +0000 (17:04 -0700)]
Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
git-am: minor cleanup
Clarify and fix English in "git-rm" documentation
Junio C Hamano [Wed, 16 Apr 2008 23:46:26 +0000 (16:46 -0700)]
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 <redacted>
Jon Loeliger [Wed, 16 Apr 2008 23:41:27 +0000 (18:41 -0500)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Wed, 16 Apr 2008 19:50:48 +0000 (12:50 -0700)]
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 <redacted>
Junio C Hamano [Wed, 16 Apr 2008 07:45:52 +0000 (00:45 -0700)]
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
Junio C Hamano [Wed, 16 Apr 2008 07:37:33 +0000 (00:37 -0700)]
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
Christian Couder [Mon, 14 Apr 2008 03:41:45 +0000 (05:41 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Linus Torvalds [Tue, 15 Apr 2008 19:56:50 +0000 (12:56 -0700)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Linus Torvalds [Tue, 15 Apr 2008 18:01:36 +0000 (11:01 -0700)]
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 <redacted>
----
builtin-fmt-merge-msg.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
Signed-off-by: Junio C Hamano <redacted>
Christian Couder [Wed, 16 Apr 2008 02:09:49 +0000 (04:09 +0200)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Alberto Bertogli [Mon, 14 Apr 2008 15:30:27 +0000 (12:30 -0300)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Scott Collins [Tue, 15 Apr 2008 21:44:43 +0000 (17:44 -0400)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Tue, 15 Apr 2008 06:15:09 +0000 (23:15 -0700)]
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
Shawn Bohrer [Sun, 13 Apr 2008 23:49:38 +0000 (18:49 -0500)]
git clean: Add test to verify directories aren't removed with a prefix
Signed-off-by: Shawn Bohrer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Shawn Bohrer [Tue, 15 Apr 2008 03:14:09 +0000 (22:14 -0500)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Mark Levedahl [Tue, 15 Apr 2008 02:48:06 +0000 (22:48 -0400)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Stephan Beyer [Tue, 8 Apr 2008 08:42:33 +0000 (10:42 +0200)]
builtin-apply.c: use git_config_string() to get apply_default_whitespace
Signed-off-by: Stephan Beyer <redacted>
Signed-off-by: Junio C Hamano <redacted>
Johannes Sixt [Mon, 14 Apr 2008 08:51:33 +0000 (10:51 +0200)]
git-gui: Report less precise object estimates for database compression
On startup, git-gui warns if there are many loose objects. It does so by
saying, e.g., that there are "approximately 768 loose objects". But isn't
"768" a very accurate number? Lets say "750", which (while still being a
very precise number) sounds much more like an estimation.
Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Shawn O. Pearce <redacted>
Junio C Hamano [Sun, 13 Apr 2008 19:11:11 +0000 (12:11 -0700)]
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 <redacted>
Ping Yin [Sat, 12 Apr 2008 15:05:33 +0000 (23:05 +0800)]
builtin-status: Add tests for submodule summary
Signed-off-by: Ping Yin <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ping Yin [Sat, 12 Apr 2008 15:05:32 +0000 (23:05 +0800)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Ping Yin [Sat, 12 Apr 2008 15:05:31 +0000 (23:05 +0800)]
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Sun, 30 Mar 2008 19:39:25 +0000 (12:39 -0700)]
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 <redacted>
Junio C Hamano [Sun, 30 Mar 2008 16:25:52 +0000 (09:25 -0700)]
write_index(): optimize ce_smudge_racily_clean_entry() calls with CE_UPTODATE
When writing the index out, we need to check the work tree again to see if
an entry whose timestamp indicates that it could be "racily clean", in
order to smudge it if it is stat-clean but with modified contents.
However, we can skip this step for entries marked with CE_UPTODATE,
which are known to be the really clean (i.e. the one we already have
checked when we prepared the index). This will reduce lstat(2) calls
necessary in git-status.
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 3 Apr 2008 05:17:53 +0000 (22:17 -0700)]
git-blame --reverse
This new option allows "git blame" to read an old version of the file, and
up to which commit each line survived (i.e. their children rewrote the
line out of the contents). The previous revision machinery update to
decorate each commit with its children was leading to this change. When
the --reverse option is given, we read the old version and pass blame to
the children of the current suspect, instead of the usual order of
starting from the latest and passing blame to parents.
The standard yardstick of "blame" in git.git history is "rev-list.c" which
was refactored heavily in its existence. For example:
git blame -C -C -w --reverse
9de48752..master -- rev-list.c
begins like this:
6c41b801 builtin-rev-list.c (JC Hamano 2008-04-02 1) #include "cache...
6c41b801 builtin-rev-list.c (JC Hamano 2008-04-02 2) #include "commi...
6c41b801 builtin-rev-list.c (JC Hamano 2008-04-02 3) #include "tree....
6c41b801 builtin-rev-list.c (JC Hamano 2008-04-02 4) #include "blob....
213523f4 rev-list.c (JC Hamano 2006-03-01 5) #include "epoch...
6c41b801 builtin-rev-list.c (JC Hamano 2008-04-02 6)
ab57c8dd rev-list.c (JC Hamano 2006-02-24 7) #define SEEN
ab57c8dd rev-list.c (JC Hamano 2006-02-24 8) #define INTERES...
213523f4 rev-list.c (JC Hamano 2006-03-01 9) #define COUNTED...
7e21c29b rev-list.c (LTorvalds 2005-07-06 10) #define SHOWN ...
6c41b801 builtin-rev-list.c (JC Hamano 2008-04-02 11)
6c41b801 builtin-rev-list.c (JC Hamano 2008-04-02 12) static const ch...
b1349229 rev-list.c (LTorvalds 2005-07-26 13) "usage: git-...
This reveals that the original first four lines survived until now in
builtin-rev-list.c , inclusion of "epoch.h" was removed after
213523f4
while the contents was still in rev-list.c.
This mode probably needs more tweaking so that the commit that removed the
line (i.e. the children of the commits listed in the above sample output)
is shown instead to be useful, but then there is a little matter of which
child of a fork point to show.
For now, you can find the diff that rewrote the fifth line above by doing:
$ git log --children
213523f4^..
to find its child, which is
1025fe5 (Merge branch 'lt/rev-list' into next,
2006-03-01), and then look at that child with:
$ git show
1025fe5
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 3 Apr 2008 07:56:23 +0000 (00:56 -0700)]
builtin-blame.c: allow more than 16 parents
This removes the hardcoded 16 parents limit from git-blame by allowing the
parent array to be allocated dynamically. As the ultimate objective is
not about allowing dodecapus, but about annotating the history upside
down, it also renames "parent" in the code to "scapegoat"; the name of the
game used to be "pass blame to your parents", but now it is "find a
scapegoat to pass blame on".
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 3 Apr 2008 05:17:53 +0000 (22:17 -0700)]
builtin-blame.c: move prepare_final() into a separate function.
After parsing the command line, we have a long loop to compute the commit
object to start annotating from. Move the logic to a separate function,
so that later patches become easier to read.
It also makes fill_origin_blob() return void; the check is always done
on !file->ptr, and nobody looks at the return value from the function.
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Fri, 4 Apr 2008 06:01:47 +0000 (23:01 -0700)]
rev-list --children
Just like --parents option shows the parents of commits, this shows the
children of commits.
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Thu, 3 Apr 2008 09:12:06 +0000 (02:12 -0700)]
revision traversal: --children option
This adds a new --children option to the revision machinery. In addition
to the list of parents, child commits of each commit are computed and
stored as a decoration to each commit.
Signed-off-by: Junio C Hamano <redacted>
SZEDER Gábor [Sun, 6 Apr 2008 01:23:46 +0000 (03:23 +0200)]
merge, pull: add '--(no-)log' command line option
These are the command line option equivalents of the 'merge.log' config
variable.
The patch also updates documentation and bash completion accordingly, and
adds a test.
Signed-off-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
SZEDER Gábor [Sun, 6 Apr 2008 01:23:45 +0000 (03:23 +0200)]
fmt-merge-msg: add '--(no-)log' options and 'merge.log' config variable
These are new synonyms to the '--(no-)summary' option and the
'merge.summary' config variable, but are consistent with the soon to be
added 'merge --(no-)log' options. The 'merge.summary' config variable and
'--(no-)summary' options are still accepted, but are advertised to be
removed in the future.
'merge.log' takes precedence over 'merge.summary' if they are both set
inconsistently.
Update documentation and tests accordingly.
Signed-off-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
SZEDER Gábor [Sun, 6 Apr 2008 01:23:44 +0000 (03:23 +0200)]
add 'merge.stat' config variable
This variable has the same effect, as 'merge.diffstat'.
Also mention it in the documentation.
Signed-off-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
SZEDER Gábor [Sun, 6 Apr 2008 01:23:43 +0000 (03:23 +0200)]
merge, pull: introduce '--(no-)stat' option
This option has the same effect as '--(no-)summary' (i.e. whether to
show a diffsat at the end of the merge or not), and it is consistent
with the '--stat' option of other git commands.
Documentation, tests, and bash completion are updaed accordingly, and the
old --summary option is marked as being deprected.
Signed-off-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
SZEDER Gábor [Sun, 6 Apr 2008 01:23:42 +0000 (03:23 +0200)]
doc: moved merge.* config variables into separate merge-config.txt
Include the new file from config.txt and git-merge.txt.
Signed-off-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
Junio C Hamano [Sun, 13 Apr 2008 02:17:51 +0000 (19:17 -0700)]
Merge branch 'maint'
* maint:
t7401: squelch garbage output
Documentation/git-submodule: typofix
Fix config key miscount in url.*.insteadOf
Docs gitk: Explicitly mention the files that gitk uses (~/.gitk)
Document -w option to shortlog
bisect: report bad rev better