Commit graph

14195 commits

Author SHA1 Message Date
Junio C Hamano 4afbcab989 diff.c: fix emit_line() again not to add extra line
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-16 17:37:21 -07:00
SZEDER Gábor 06ff64ae3d diff: reset color before printing newline
It worked that way since commit 50f575fc (Tweak diff colors,
2006-06-22), but commit c1795bb0 (Unify whitespace checking, 2007-12-13)
changed it.  This patch restores the old behaviour.

Besides Linus' arguments in the log message of 50f575fc, resetting color
before printing newline is also important to keep 'git add --patch'
happy.  If the last line(s) of a file are removed, then that hunk will
end with a colored line.  However, if the newline comes before the color
reset, then the diff output will have an additional line at the end
containing only the reset sequence.  This causes trouble in
git-add--interactive.perl's parse_diff function, because @colored will
have one more element than @diff, and that last element will contain the
color reset.  The elements of these arrays will then be copied to @hunk,
but only as many as the number of elements in @diff.  As a result the
last color reset is lost and all subsequent terminal output will be
printed in color.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-16 15:22:09 -07:00
Fred Maranhão 2feaf4e977 fix typo in tutorial
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-11 16:21:45 -07:00
Miklos Vajna 22e801f285 git-read-tree: document -v option.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-09 15:49:44 -07:00
Johannes Sixt 170e095a9c Remove exec bit from builtin-fast-export.c
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-08 10:48:46 -07:00
Junio C Hamano 7064ca51b0 GIT 1.5.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-07 11:45:48 -07:00
Lea Wiemann c0f6dc9b20 git-for-each-ref.txt: minor improvements
Rewrapped synopsis and removed wrong asterisk behind --count option;
clarified --sort=<key> description for multiple keys; documented that
for-each-ref supports not only glob patterns but also prefixes like
"refs/heads" as patterns, and that multiple patterns can be given.

Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-06 08:39:54 -07:00
Björn Steinbrink a83123deec name-rev: Fix segmentation fault when using --all
In commit da2478db "describe --always: fall back to showing an
abbreviated object name" we lost the check that skips empty entries in
the object hash table when iterating over it in cmd_name_rev. That may
cause a NULL pointer being handed to show_name(), leading to a
segmentation fault. So add that check back again.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-05 21:01:45 -07:00
Michael Dressel 4ed19a3c17 describe: match pattern for lightweight tags too
The <pattern> given "git describe --match" was used only to filter tag
objects, and not to filter lightweight tags.  This fixes it.

[jc: made the log to clarify this is a bugfix, not an enhancement, with
additional test]

Signed-off-by: Michael Dressel <MichaelTiloDressel@t-online.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-04 13:08:03 -07:00
Junio C Hamano 28bc30220f GIT 1.5.5.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-27 22:32:47 -07:00
Gerrit Pape d5350fd2b3 commit --interactive: properly update the index before commiting
When adding files through git commit --interactive, and 'quit'
afterwards, the message in the editor of the commit message indicates
that many (maybe all) files are deleted from the tree.  Dismissing that
and running git commit afterwards does the right thing.  This commit
fixes git commit --interactive to properly update the index before
commiting.

Reported by Jiří Paleček through
 http://bugs.debian.org/480429

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-27 22:32:47 -07:00
Lea Wiemann 1f684dc01c gitweb: only display "next" links in logs if there is a next page
There was a bug in the implementation of the "next" links in
format_paging_nav (for log and shortlog), which caused the next links
to always be displayed, even if there is no next page.  This fixes it.

Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-27 22:27:30 -07:00
Johannes Sixt a17171b473 Revert "filter-branch: subdirectory filter needs --full-history"
This reverts commit cfabd6eee1. I had
implemented it without understanding what --full-history does. Consider
this history:

    C--M--N
   /  /  /
  A--B  /
   \   /
    D-/

where B and C modify a path, X, in the same way so that the result is
identical, and D does not modify it at all. With the path limiter X and
without --full-history this is simplified to

   A--B

i.e. only one of the paths via B or C is chosen. I had assumed that
--full-history would keep both paths like this

    C--M
   /  /
  A--B

removing the path via D; but in fact it keeps the entire history.

Currently, git does not have the capability to simplify to this
intermediary case. However, the other extreme to keep the entire history
is not wanted either in usual cases. I think we can expect that histories
like the above are rare, and in the usual cases we want a simplified
history. So let's remove --full-history again.

(Concerning t7003, subsequent tests depend on what the test case sets up,
so we can't just back out the entire test case.)

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-27 22:27:30 -07:00
Gerrit Pape 049c1ad2d6 Documentation/git-bundle.txt: fix synopsis
The <git-rev-list args> are mandatory to git bundle create, not
optional.  The usage output of git bundle is already right on this.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-27 22:01:31 -07:00
Junio C Hamano 109440c1bf Merge branch 'gp/bisect-fix' into maint
* gp/bisect-fix:
  bisect: print an error message when "git rev-list --bisect-vars" fails
  git-bisect.sh: don't accidentally override existing branch "bisect"
2008-05-26 19:15:03 -07:00
Michele Ballabio df2740b066 Documentation: fix graph in git-rev-parse.txt
Preformatted html and man pages show a mangled graph, caused by a
backslash.

Commit f1ec6b22a8 fixed this same issue,
but it seems that new versions of the Asciidoc toolchain changed their
behaviour.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-26 19:10:03 -07:00
Junio C Hamano f8fcb57bb4 show-branch --current: do not barf on detached HEAD
The code assumed that there always is the current branch, but the result
from resolve_ref() on detached HEAD does not even start with "refs/heads/".

Originally noticed and fixed by Stephan Beyer.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-26 15:09:56 -07:00
Junio C Hamano a2f5be5008 Merge branch 'jk/maint-send-email-compose' into maint
* jk/maint-send-email-compose:
  send-email: rfc2047-quote subject lines with non-ascii characters
  send-email: specify content-type of --compose body
2008-05-25 22:34:23 -07:00
Junio C Hamano 93c7b9c159 Merge branch 'hb/maint-send-email-quote-recipients' into maint
* hb/maint-send-email-quote-recipients:
  Fix recipient santitization
2008-05-25 22:34:20 -07:00
Junio C Hamano 6abf189506 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  builtin-fast-export: Only output a single parent per line
2008-05-25 22:34:05 -07:00
Pieter de Bie 5070b49e52 builtin-fast-export: Only output a single parent per line
According to the git-fast-import man-page, you can only put a single
committish per merge: line, like this:

  merge :10
  merge :11

However, git-fast-export puts all parents on a single line, like this:

  merge :10 :11

This changes fast-export to output a single parent per line.  Otherwise
neither git-fast-import nor bzr-fast-import can read its output.

[jc: fix-up to remove excess LF in the output that makes fast-import barf]

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 22:26:24 -07:00
Junio C Hamano 20bd3b072f Release Notes for 1.5.5.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 21:11:24 -07:00
Junio C Hamano 77599cc0bb Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  rev-parse --symbolic-full-name: don't print '^' if SHA1 is not a ref
2008-05-23 15:52:43 -07:00
Johannes Sixt e00f3790b8 rev-parse --symbolic-full-name: don't print '^' if SHA1 is not a ref
The intention of --symbolic-full-name is to not print anything if a
revision is not an exact ref. But this command:

    $ git-rev-parse --symbolic-full-name --not master~1

still emitted a sole '^' to stdout (provided that there's no other ref at
master~1). This fixes it.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23 15:52:20 -07:00
Heikki Orsila 26b4d0039d Add missing "short" alternative to --date in rev-list-options.txt
Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 23:29:46 -07:00
Jon Loeliger 3a3e097b86 git-show.txt: Not very stubby these days.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 23:21:30 -07:00
Shawn O. Pearce c30f9936b0 Clarify repack -n documentation
While repacking a local repository a coworker thought the -n option
was necessary to git-repack to keep it from updating some unknown
file on the central server we all share.  Explaining further what
the option is (not) doing helps to make it clear the option does
not impact any remote repositories the user may have configured.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 23:21:29 -07:00
Junio C Hamano 008442f5e7 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  git-am: fix typo in usage message
  doc/git-daemon: s/uploadarchive/uploadarch/
2008-05-21 14:27:59 -07:00
Horst H. von Brand 18023c2065 Fix recipient santitization
Need to quote all special characters, not just the first one

Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 13:05:50 -07:00
Jeff King d54eaaa268 send-email: rfc2047-quote subject lines with non-ascii characters
We always use 'utf-8' as the encoding, since we currently
have no way of getting the information from the user.

This also refactors the quoting of recipient names, since
both processes can share the rfc2047 quoting code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 13:05:10 -07:00
Jeff King 0706bd19ef send-email: specify content-type of --compose body
If the compose message contains non-ascii characters, then
we assume it is in utf-8 and include the appropriate MIME
headers. If the user has already included a MIME-Version
header, then we assume they know what they are doing and
don't add any headers.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 13:05:09 -07:00
Jeff King e77b0b5d0f git-am: fix typo in usage message
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-19 22:47:16 -07:00
Jeff King 74190d2363 doc/git-daemon: s/uploadarchive/uploadarch/
The git-daemon upload-archive feature has always used the
config directive 'daemon.uploadarch'; the documentation
which came later seems to have just mistakenly used the
wrong name.

Noticed by lionel@over-blog.com.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-19 22:46:13 -07:00
Jon Loeliger e4d594c6bd git-filter-branch: Clarify file removal example.
Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16 13:13:24 -07:00
Junio C Hamano a473445ac2 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  Documentation/git-describe.txt: make description more readable
2008-05-14 13:46:42 -07:00
Ian Hilt b7893cde53 Documentation/git-describe.txt: make description more readable
Signed-off-by: Ian Hilt <ian.hilt@gmail.com>
Credit-to: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-14 11:47:03 -07:00
Junio C Hamano 3e08f5db65 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  wt-status.h: declare global variables as extern
  builtin-commit.c: add -u as short name for --untracked-files
  git-repack: re-enable parsing of -n command line option
2008-05-11 12:09:12 -07:00
Johannes Sixt 32efcd91c6 wt-status.h: declare global variables as extern
There are linkers out there that complain if a global non-static variable
is defined multiple times.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11 10:04:46 -07:00
Sitaram Chamarty e1645901ed builtin-commit.c: add -u as short name for --untracked-files
This makes the C code consistent with the documentation and the old shell
code.

Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11 10:04:20 -07:00
A Large Angry SCM 2b36b146fa git-repack: re-enable parsing of -n command line option
In commit 5715d0b (Migrate git-repack.sh to use git-rev-parse --parseopt,
2007-11-04), parsing of the '-n' command line option was accidentally lost
when git-repack.sh was migrated to use git-rev-parse --parseopt. This adds
it back.

Signed-off-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-11 10:03:58 -07:00
Junio C Hamano 32a27b5666 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull"
  doc: clarify definition of "update" for git-add -u
2008-05-08 20:12:44 -07:00
Christian Couder 42ba5ee776 bisect: print an error message when "git rev-list --bisect-vars" fails
Before this patch no error was printed when "git rev-list --bisect-vars"
failed. This can happen when bad and good revs are mistaken.

This patch prints an error message on stderr that describe the likely
failure cause.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-08 17:50:00 -07:00
Dustin Sallings 15ddb6fab2 Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull"
Signed-off-by: Dustin Sallings <dustin@spy.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-08 12:15:30 -07:00
Jeff King afd899e1b7 doc: clarify definition of "update" for git-add -u
The "-u" option is described only in terms of "updating"
files, which in turn is described only as "similar to what
git commit -a does". Let's be a little more specific about
what updating entails.

Suggested by Geoffrey Irving.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-08 12:09:42 -07:00
Gerrit Pape ee831f7ddf git-bisect.sh: don't accidentally override existing branch "bisect"
If a branch named "bisect" or "new-bisect" already was created in the
repo by other means than git bisect, doing a git bisect used to override
the branch without a warning.  Now if the branch "bisect" or
"new-bisect" already exists, and it was not created by git bisect itself,
git bisect start fails with an appropriate error message.  Additionally,
if checking out a new bisect state fails due to a merge problem, git
bisect cleans up the temporary branch "new-bisect".

The accidental override has been noticed by Andres Salomon, reported
through
 http://bugs.debian.org/478647

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-05 17:18:20 -07:00
Junio C Hamano 6233a5210e Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  filter-branch: Documentation fix.
2008-05-03 18:55:33 -07:00
Jeff King 278863180a checkout: don't rfc2047-encode oneline on detached HEAD
When calling pretty_print_commit, there is an implicit
assumption that passing in a non-NULL "subject" variable
for oneline or email formats means that the output is part
of a subject and therefore "subject" to rfc2047 encoding.
This is not the desired effect when reporting the movement
of detached HEAD.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-03 18:47:18 -07:00
Florian Ragwitz a1748890db filter-branch: Documentation fix.
It's --msg-filter, not --message-filter.

Signed-off-by: Florian Ragwitz <rafl@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-03 12:05:21 -07:00
Junio C Hamano 2d8bed969d fetch-pack: brown paper bag fix
When I applied Linus's patch from the list by hand somehow I ended
up reversing the logic by mistake.  This fixes it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-30 11:42:05 -07:00
Junio C Hamano 30c0312fd1 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  cvsimport: always pass user data to "system" as a list
  fix reflog approxidate parsing bug
2008-04-29 22:55:07 -07:00