summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-04-16Merge branch 'maint'Libravatar Junio C Hamano6-33/+54
* 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-16Merge branch 'maint-1.5.4' into maintLibravatar Junio C Hamano6-33/+54
* 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-16git-bisect: make "start", "good" and "skip" succeed or fail atomicallyLibravatar Christian Couder2-5/+16
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-16git-am: cope better with an empty Subject: lineLibravatar Linus Torvalds1-14/+10
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-15Ignore leading empty lines while summarizing mergesLibravatar Linus Torvalds1-1/+9
"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-15bisect: squelch "fatal: ref HEAD not a symref" misleading messageLibravatar Christian Couder1-1/+1
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-15builtin-apply: Show a more descriptive error on failure when opening a patchLibravatar Alberto Bertogli1-1/+1
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-15Clarify documentation of git-cvsserver, particularly in relation to git-shellLibravatar Scott Collins1-11/+17
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-14Merge branch 'maint'Libravatar Junio C Hamano4-10/+13
* 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-14git clean: Add test to verify directories aren't removed with a prefixLibravatar Shawn Bohrer1-2/+3
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-14git clean: Don't automatically remove directories when run within subdirectoryLibravatar Shawn Bohrer2-7/+8
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-14git-submodule - possibly use branch name to describe a moduleLibravatar Mark Levedahl1-1/+2
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-14builtin-apply.c: use git_config_string() to get apply_default_whitespaceLibravatar Stephan Beyer1-6/+2
Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-13Fix git_config_bool_or_intLibravatar Junio C Hamano3-4/+80
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-12Merge branch 'maint'Libravatar Junio C Hamano8-12/+23
* 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
2008-04-12t7401: squelch garbage outputLibravatar Junio C Hamano1-1/+1
The script had an unconditional output done outside of test_expect_* construct, which leaked out and contaminated the output without -v. Squelch it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12git_config_bool_or_int()Libravatar Junio C Hamano2-1/+10
This new function can be used by config parsers to tell if a variable is simply set, set to 1, or set to "true". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12Documentation/git-submodule: typofixLibravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12Fix config key miscount in url.*.insteadOfLibravatar Daniel Barkalow2-5/+5
Also tighten test to require it to be correct. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12Merge branch 'maint-1.5.4' into maintLibravatar Junio C Hamano4-5/+16
* maint-1.5.4: Docs gitk: Explicitly mention the files that gitk uses (~/.gitk) Document -w option to shortlog bisect: report bad rev better
2008-04-12Docs gitk: Explicitly mention the files that gitk uses (~/.gitk)Libravatar Clifford Caoile1-0/+5
gitk creates and uses ~/.gitk Signed-off-by: Clifford Caoile <piyo@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12Document -w option to shortlogLibravatar Junio C Hamano2-3/+9
Noticed by Fredrik Noring. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12bisect: report bad rev betterLibravatar Christian Couder1-2/+2
The previous one overwrote the variable used to report the bad input when the input is actually bad, and we did not give a useful enough information. This corrects it. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-11Merge branch 'maint'Libravatar Junio C Hamano9-15/+36
* maint: bisect: fix bad rev checking in "git bisect good" revision.c: make --date-order overriddable git-submodule: Avoid 'fatal: cannot describe' message Force the medium pretty format on calls to git log Fix section about backdating tags in the git-tag docs Document option --only of git commit Documentation/git-request-pull: Fixed a typo ("send" -> "end")
2008-04-11Merge branch 'maint-1.5.4' into maintLibravatar Junio C Hamano7-13/+34
* maint-1.5.4: bisect: fix bad rev checking in "git bisect good" revision.c: make --date-order overriddable Fix section about backdating tags in the git-tag docs Document option --only of git commit Documentation/git-request-pull: Fixed a typo ("send" -> "end")
2008-04-11bisect: fix bad rev checking in "git bisect good"Libravatar Christian Couder2-9/+18
It seems that "git bisect good" and "git bisect skip" have never properly checked arguments that have been passed to them. As soon as one of them can be parsed as a SHA1, no error or warning would be given. This is because 'git rev-parse --revs-only --no-flags "$@"' always "exit 0" and outputs all the SHA1 it can found from parsing "$@". This patch fix this by using, for each "bisect good" argument, the same logic as for the "bisect bad" argument. While at it, this patch teaches "bisect bad" to give a meaningfull error message when it is passed more than one argument. Note that if "git bisect good" or "git bisect skip" is given some proper revs and then something that is not a proper rev, then the first proper revs will still have been marked as "good" or "skip". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-11bisect: add "git bisect help" subcommand to get a long usage stringLibravatar Christian Couder2-3/+16
Users are not often aware of the fact that "git bisect -h" can give them a long usage description, as "git bisect" seems to accept only dashless subcommands like "start", "good", ... That's why this patch adds a "git bisect help" subcommand that just calls "git bisect -h". This new subcommand is also fully documented in the short usage string (that "git bisect" gives), in the long usage string and in the man page (that "git help bisect" gives). Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-11builtin-commit.c: Remove a redundant assignment.Libravatar Johannes Sixt1-3/+1
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-11revision.c: make --date-order overriddableLibravatar Michele Ballabio1-0/+1
Jan Engelhardt noticed that while --topo-order can be overridden by a subsequent --date-order, the reverse was not possible. That's because setup_revisions() failed to set revs->lifo properly. Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-11git-submodule: Avoid 'fatal: cannot describe' messageLibravatar Ping Yin1-1/+1
When "git submodule status" command tries to show the name of the submodule HEAD revision more descriptively, but the submodule repository lacked a suitable tag to do so, it leaked "fatal: cannot describe" message to the UI. Squelch it by using '--always'. Signed-off-by: Ping Yin <pkufranky@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-11Force the medium pretty format on calls to git logLibravatar Pedro Melo1-1/+1
If a user has customized format.pretty in config, git-svn rebase fails with: Unable to determine upstream SVN information from working tree history because the command expects to read the commit log in the default format. This fixes the command to explicitly ask for the format it wants to read from. Signed-off-by: Pedro Melo <melo@simplicidade.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-11Fix section about backdating tags in the git-tag docsLibravatar Björn Steinbrink1-2/+2
The tagger is equal to the committer, not the author, so GIT_COMMITTER_DATE is the right environment variable to use, not GIT_AUTHOR_DATE. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-11Document option --only of git commitLibravatar Johannes Sixt2-1/+12
Its documentation was removed by 6c96753 (Documentation/git-commit: rewrite to make it more end-user friendly, 2006-12-08), even though it is referenced from a few places, including builtin-commit.c (as part of the commentary in the commit message template). Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-11Documentation/git-request-pull: Fixed a typo ("send" -> "end")Libravatar Dirk Suesserott1-1/+1
Signed-off-by: Dirk Suesserott <newsletter@dirk.my1.cc> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-10Merge branch 'maint'Libravatar Junio C Hamano8-30/+45
* maint: git-fetch: fix status output when not storing tracking ref core-tutorial.txt: Fix showing the current behaviour. git-archive: ignore prefix when checking file attribute Fix documentation syntax of optional arguments in short options.
2008-04-10git-fetch: fix status output when not storing tracking refLibravatar Jeff King1-15/+13
There was code in update_local_ref for handling this case, but it never actually got called. It assumed that storing in FETCH_HEAD meant a blank peer_ref name, but we actually have a NULL peer_ref in this case, so we never even made it to the update_local_ref function. On top of that, the display formatting was different from all of the other cases, probably owing to the fact that nobody had ever actually seen the output. This patch harmonizes the output with the other cases and moves the detection of this case into store_updated_refs, where we can actually trigger it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-10Merge branch 'maint-1.5.4' into maintLibravatar Junio C Hamano7-15/+32
* maint-1.5.4: core-tutorial.txt: Fix showing the current behaviour. git-archive: ignore prefix when checking file attribute Fix documentation syntax of optional arguments in short options.
2008-04-10core-tutorial.txt: Fix showing the current behaviour.Libravatar Carlos Rica1-6/+6
The --root option from "git diff-tree" won't do nothing when is given to commands like git-whatchanged or git-log, because those always print the initial commit by default. This fixes the tutorial explaining the function of the log.showroot configuration variable. Signed-off-by: Carlos Rica <jasampler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-10git-archive: ignore prefix when checking file attributeLibravatar René Scharfe3-5/+22
Ulrik Sverdrup noticed that git-archive doesn't correctly apply the attribute export-subst when the option --prefix is given, too. When it checked if a file has the attribute turned on, git-archive would try to look up the full path -- including the prefix -- in .gitattributes. That's wrong, as the prefix doesn't need to have any relation to any existing directories, tracked or not. This patch makes git-archive ignore the prefix when looking up if value of the attribute export-subst for a file. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-10Fix documentation syntax of optional arguments in short options.Libravatar Carlos Rica3-4/+4
When an argument for an option is optional, like in -n from git-tag, puting a space between the option and the argument is interpreted as a missing argument for the option plus an isolated argument. Documentation now reflects the need to write the parameter following the option -n, as in "git tag -nARG", for instance. Signed-off-by: Carlos Rica <jasampler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-09Merge branch 'jc/rename'Libravatar Junio C Hamano1-22/+58
* 'jc/rename' (early part): Optimize rename detection for a huge diff
2008-04-09Merge branch 'gp/gitweb'Libravatar Junio C Hamano4-3/+21
* gp/gitweb: gitweb: fallback to system-wide config file (fixup) gitweb: fallback to system-wide config file if default config does not exist
2008-04-09Merge branch 'mk/unpack-careful'Libravatar Junio C Hamano5-33/+284
* mk/unpack-careful: t5300: add test for "index-pack --strict" receive-pack: allow using --strict mode for unpacking objects unpack-objects: fix --strict handling t5300: add test for "unpack-objects --strict" unpack-objects: prevent writing of inconsistent objects
2008-04-09Merge branch 'fl/send-email-outside'Libravatar Junio C Hamano3-36/+32
* fl/send-email-outside: send-email: Don't require to be called in a repository Git.pm: Don't require repository instance for ident Git.pm: Don't require a repository instance for config var: Don't require to be in a git repository.
2008-04-09Merge branch 'jc/rebase'Libravatar Junio C Hamano1-20/+32
* jc/rebase: rebase [--onto O] A B: omit needless checkout
2008-04-09Merge branch 'jk/add-i-mode'Libravatar Junio C Hamano2-0/+68
* jk/add-i-mode: add--interactive: allow user to choose mode update add--interactive: ignore mode change in 'p'atch command
2008-04-09Merge branch 'gs/pretty-hexval'Libravatar Junio C Hamano3-2/+16
* gs/pretty-hexval: pretty.c: add %x00 format specifier.
2008-04-07GIT 1.5.5Libravatar Junio C Hamano3-8/+7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-07Merge git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano1-3/+3
* git://git.kernel.org/pub/scm/gitk/gitk: gitk: Fix changing colors through Edit->Preferences
2008-04-07git-svn: fix following renamed paths when tracking a single pathLibravatar Eric Wong3-2/+113
When using git-svn to follow only a single (empty) path per svn-remote (i.e. not using --stdlayout), following the history of a renamed path was broken in c586879cdfa4f8181a14e953a9152a4639eef333. This reverts the regression for the single (emtpy) path per svn-remote case. To avoid breaking the tests in a committed revision, this is an addendum to a patch originally submitted by Santhosh Kumar Mani <santhoshmani@gmail.com>: > git-svn: add test for renamed directory fetch > > This test tries to fetch a directory which had renames in the > history from a SVN repository. [ew: unneccesary dependency on the starting an HTTP server removed from Santhosh's original test.] Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>