Commit graph

44 commits

Author SHA1 Message Date
Jeff King cc1b8d8bc6 docs: don't talk about $GIT_DIR/refs/ everywhere
It is misleading to say that we pull refs from $GIT_DIR/refs/*, because we
may also consult the packed refs mechanism. These days we tend to treat
the "refs hierarchy" as more of an abstract namespace that happens to be
represented as $GIT_DIR/refs. At best, this is a minor inaccuracy, but at
worst it can confuse users who then look in $GIT_DIR/refs and find that it
is missing some of the refs they expected to see.

This patch drops most uses of "$GIT_DIR/refs/*", changing them into just
"refs/*", under the assumption that users can handle the concept of an
abstract refs namespace. There are a few things to note:

  - most cases just dropped the $GIT_DIR/ portion. But for cases where
    that left _just_ the word "refs", I changed it to "refs/" to help
    indicate that it was a hierarchy.  I didn't do the same for longer
    paths (e.g., "refs/heads" remained, instead of becoming
    "refs/heads/").

  - in some cases, no change was made, as the text was explicitly about
    unpacked refs (e.g., the discussion in git-pack-refs).

  - In some cases it made sense instead to note the existence of packed
    refs (e.g., in check-ref-format and rev-parse).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17 21:40:09 -08:00
Ralf Wildenhues 6a5d0b0a90 Fix typos in technical documentation.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-31 10:24:53 -08:00
Ilari Liusvaara b09fe971de rev-parse --branches/--tags/--remotes=pattern
Since local branch, tags and remote tracking branch namespaces are
most often used, add shortcut notations for globbing those in
manner similar to --glob option.

With this, one can express the "what I have but origin doesn't?"
as:

'git log --branches --not --remotes=origin'

Original-idea-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-20 12:30:25 -08:00
Ilari Liusvaara d08bae7e22 rev-parse --glob
Add --glob=<glob-pattern> option to rev-parse and everything that
accepts its options. This option matches all refs that match given
shell glob pattern (complete with some DWIM logic).

Example:

'git log --branches --not --glob=remotes/origin'

To show what you have that origin doesn't.

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-20 12:29:05 -08:00
Christian Couder af06e93a3e Documentation: update descriptions of revision options related to '--bisect'
In commit ad3f9a7 (Add '--bisect' revision machinery argument) the
'--bisect' option was added to easily pass bisection refs to commands
using the revision machinery.

This patch updates the documentation of the related options to describe
the new behavior.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-24 01:00:34 -08:00
Junio C Hamano 60da8b15c1 Make --stdin option to "log" family read also pathspecs
Similar to the command line arguments, after giving zero or more revs, you can
feed a line "--" and then feed pathspecs one at a time.

With this

	(
		echo ^maint
		echo --
		echo Documentation
	) | git log --stat --oneline --stdin master -- t

lists commits that touch Documentation/ or t/ between maint and master.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-20 15:10:47 -08:00
Junio C Hamano 8b3dce5650 Teach --stdin option to "log" family
Move the logic to read revs from standard input that rev-list knows about
from it to revision machinery, so that all the users of setup_revisions()
can feed the list of revs from the standard input when "--stdin" is used
on the command line.

Allow some users of the revision machinery that want different semantics
from the "--stdin" option to disable it by setting an option in the
rev_info structure.

This also cleans up the kludge made to bundle.c via cut and paste.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-20 15:10:29 -08:00
SZEDER Gábor 2657420d9e Document 'git (rev-list|log) --merges'
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-13 11:09:41 -07:00
Matthieu Moy 982962ce24 git-rev-list.txt: make ascii markup uniform with other pages.
Other pages use --option=<argument>, not --option='argument', do the
same here.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-04-07 22:08:13 -07:00
Christian Couder 3d2d4f96d2 Documentation: fix badly indented paragraphs in "--bisect-all" description
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-07 11:21:41 -08:00
Linus Torvalds 7dff9b30ea Support 'raw' date format
Talking about --date, one thing I wanted for the 1234567890 date was to
get things in the raw format. Sure, you get them with --pretty=raw, but it
felt a bit sad that you couldn't just ask for the date in raw format.

So here's a throw-away patch (meaning: I won't be re-sending it, because I
really don't think it's a big deal) to add "--date=raw". It just prints
out the internal raw git format - seconds since epoch plus timezone (put
another way: 'date +"%s %z"' format)

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-20 21:45:42 -08:00
Mark Burton c2e6385da5 Documentation: rev-list-options.txt: added --branches, --tags & --remotes.
Added simple descriptions of these options (based on description of --all).

Signed-off-by: Mark Burton <markb@ordern.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-18 16:09:08 -08:00
Junio C Hamano b2b80c107f Merge branch 'lt/decorate'
* lt/decorate:
  rev-list documentation: clarify the two parts of history simplification
  Document "git log --simplify-by-decoration"
  Document "git log --source"
  revision traversal: '--simplify-by-decoration'
  Make '--decorate' set an explicit 'show_decorations' flag
  revision: make tree comparison functions take commits rather than trees
  Add a 'source' decorator for commits

Conflicts:
	Documentation/rev-list-options.txt
2008-11-12 21:51:19 -08:00
Santi Béjar 7bc2508bfe rev-list documentation: clarify the two parts of history simplification
One set of options and parameters determine what commits are involved in
the simplification process, and another set of options determine how the
simplification is done.  Clarify their distinction at the beginning.

Signed-off-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12 14:28:16 -08:00
Nanako Shiraishi 3fcfd662dc Document "git log --simplify-by-decoration"
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12 14:23:11 -08:00
Junio C Hamano a9645b780b Merge branch 'maint'
* maint:
  Documentation: bisect: change a few instances of "git-cmd" to "git cmd"
  Documentation: rev-list: change a few instances of "git-cmd" to "git cmd"
  checkout: Don't crash when switching away from an invalid branch.
2008-11-09 10:56:26 -08:00
Christian Couder 6514aa36d2 Documentation: rev-list: change a few instances of "git-cmd" to "git cmd"
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-09 10:19:38 -08:00
Junio C Hamano 84cdd3c635 Merge branch 'maint'
* maint:
  Add reference for status letters in documentation.
  Document that git-log takes --all-match.
  Update draft 1.6.0.4 release notes
2008-11-02 16:36:40 -08:00
Mikael Magnusson 7756ba74c0 Document that git-log takes --all-match.
Signed-off-by: Mikael Magnusson <mikachu@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02 15:51:37 -08:00
Junio C Hamano 01914577ed Merge branch 'tr/filter-branch'
* tr/filter-branch:
  revision --simplify-merges: make it a no-op without pathspec
  revision --simplify-merges: do not leave commits unprocessed
  revision --simplify-merges: use decoration instead of commit->util field
  Documentation: rev-list-options: move --simplify-merges documentation
  filter-branch: use --simplify-merges
  filter-branch: fix ref rewriting with --subdirectory-filter
  filter-branch: Extend test to show rewriting bug
  Topo-sort before --simplify-merges
  revision traversal: show full history with merge simplification
  revision.c: whitespace fix
2008-09-02 17:47:13 -07:00
Junio C Hamano fc721b699b Merge branch 'maint'
* maint:
  Do not talk about "diff" in rev-list documentation.
2008-08-12 22:46:22 -07:00
Junio C Hamano 9612e74342 Do not talk about "diff" in rev-list documentation.
Since 8c02eee (git-rev-list(1): group options; reformat; document more
options, 2006-09-01), git-rev-list documentation talks as if it supports
any kind of diff output.  It doesn't.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 22:40:44 -07:00
Thomas Rast d266a98845 Documentation: rev-list-options: move --simplify-merges documentation
Fits --simplify-merges documentation into the 'History Simplification'
section, including example.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 21:40:20 -07:00
Junio C Hamano 00b718e02d Merge branch 'jc/post-simplify' into tr/rev-list-docs
* jc/post-simplify:
  Topo-sort before --simplify-merges
  revision traversal: show full history with merge simplification
  revision.c: whitespace fix

Conflicts:
	Documentation/rev-list-options.txt
2008-08-12 21:40:05 -07:00
Thomas Rast 70d9895ebc Documentation: rev-list-options: Rewrite simplification descriptions for clarity
This completely rewrites the documentation of --full-history with lots
of examples.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-12 17:54:06 -07:00
Thomas Rast d777af86d8 Documentation: rev-list-options: Fix a typo
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 17:13:57 -07:00
Junio C Hamano ac39efbdf3 Merge branch 'maint'
* maint:
  Re-fix rev-list-options documentation
2008-08-11 14:28:35 -07:00
Junio C Hamano e534735a4c Re-fix rev-list-options documentation
18a2197 (Documentation: rev-list-options: Fix -g paragraph formatting,
2008-08-10) introduced the third paragraph that is continued, but it seems
to confuse docbook toolchain on FC9 machines.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-11 14:24:51 -07:00
Junio C Hamano 10d9d887ec Merge branch 'maint'
* maint:
  Documentation: fix invalid reference to 'mybranch' in user manual
  Fix deleting reflog entries from HEAD reflog
  reflog test: add more tests for 'reflog delete'
  Documentation: rev-list-options: Fix -g paragraph formatting

Conflicts:
	Documentation/user-manual.txt
2008-08-11 00:53:31 -07:00
Thomas Rast 18a2197e6d Documentation: rev-list-options: Fix -g paragraph formatting
- Add an escape to @{now}.  Without the escape, the brace does
  something magic and eats half the sentence up to the closing brace
  at 'timestamp}'.

- Join the last paragraph with a '+'.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-10 23:11:48 -07:00
Junio C Hamano 6546b5931e revision traversal: show full history with merge simplification
The --full-history traversal keeps all merges in addition to non-merge
commits that touch paths in the given pathspec.  This is useful to view
both sides of a merge in a topology like this:

        A---M---o
       /   /
   ---O---B

even when A and B makes identical change to the given paths.  The revision
traversal without --full-history aims to come up with the simplest history
to explain the final state of the tree, and one of the side branches can
be pruned away.

The behaviour to keep all merges however is inconvenient if neither A nor
B touches the paths we are interested in.  --full-history reduces the
topology to:

   ---O---M---o

in such a case, without removing M.

This adds a post processing phase on top of --full-history traversal to
remove needless merges from the resulting history.

The idea is to compute, for each commit in the "full history" result set,
the commit that should replace it in the simplified history.  The commit
to replace it in the final history is determined as follows:

 * In any case, we first figure out the replacement commits of parents of
   the commit we are looking at.  The commit we are looking at is
   rewritten as if the replacement commits of its original parents are its
   parents.  While doing so, we reduce the redundant parents from the
   rewritten parent list by not just removing the identical ones, but also
   removing a parent that is an ancestor of another parent.

 * After the above parent simplification, if the commit is a root commit,
   an UNINTERESTING commit, a merge commit, or modifies the paths we are
   interested in, then the replacement commit of the commit is itself.  In
   other words, such a commit is not dropped from the final result.

The first point above essentially means that the history is rewritten in
the bottom up direction.  We can rewrite the parent list of a commit only
after we know how all of its parents are rewritten.  This means that the
processing needs to happen on the full history (i.e. after limit_list()).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02 00:33:15 -07:00
Junio C Hamano b1264da863 Documentation: clarify diff --cc
The definition of an "uninteresting" hunk was not in line with reality.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01 23:00:42 -07:00
Junio C Hamano ea3d988df7 Documentation: clarify diff --cc
The definition of an "uninteresting" hunk was not in line with reality.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-23 16:57:13 -07:00
Junio C Hamano 8bb65883d1 Merge branch 'jc/blame' (early part) into HEAD
* 'jc/blame' (early part):
  git-blame --reverse
  builtin-blame.c: allow more than 16 parents
  builtin-blame.c: move prepare_final() into a separate function.
  rev-list --children
  revision traversal: --children option

Conflicts:

	Documentation/rev-list-options.txt
	revision.c
2008-07-08 15:25:44 -07:00
Stephan Beyer 3240240ff4 Docs: Use "-l::\n--long\n" format in OPTIONS sections
The OPTIONS section of a documentation file contains a list
of the options a git command accepts.

Currently there are several variants to describe the case that
different options (almost) do the same in the OPTIONS section.

Some are:

 -f, --foo::
 -f|--foo::
 -f | --foo::

But AsciiDoc has the special form:

 -f::
 --foo::

This patch applies this form to the documentation of the whole git suite,
and removes useless em-dash prevention, so \--foo becomes --foo.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-08 13:46:38 -07:00
Junio C Hamano adf60f1440 Documentation: git-log cannot use rev-list specific options
The log family and git-rev-list share the same set of options that come
from revision walking machinery, but they both have options unique to
them.  Notably, --header, --timestamp, --stdin and --quiet apply only to
rev-list.  Exclude them from the git-log documentation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-03 23:56:56 -07:00
Junio C Hamano e13067a749 Merge branch 'maint'
* maint:
  rev-parse --symbolic-full-name: don't print '^' if SHA1 is not a ref
  Add missing "short" alternative to --date in rev-list-options.txt
  git-show.txt: Not very stubby these days.
  Clarify repack -n documentation
2008-05-23 16:05:46 -07:00
Heikki Orsila dd0ffd5b31 Add log.date config variable
log.date config variable sets the default date-time mode for the log
command. Setting log.date value is similar to using git log's --date
option.

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23 16:05:42 -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
Adam Simpkins 7fefda5cc7 log and rev-list: add --graph option
This new option causes a text-based representation of the history to be
printed to the left of the normal output.

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-05 18:46:35 -07:00
Junio C Hamano 72276a3ecb rev-list --children
Just like --parents option shows the parents of commits, this shows the
children of commits.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-12 19:41:29 -07:00
Jakub Narebski 56b6d01d84 Documentation: Remove --{min,max}-age option from git-log(1)
The --max-age=<timestamp> and --min-age=<timestamp> are now shown only
in the git-rev-list manpage (plumbing).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-02 13:52:08 -08:00
Jakub Narebski dc1c0fffd3 Add '--fixed-strings' option to "git log --grep" and friends
Add support for -F | --fixed-strings option to "git log --grep"
and friends: "git log --author", "git log --committer=<pattern>".
Code is based on implementation of this option in "git grep".

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-26 23:59:49 -08:00
Miklos Vajna fdcf39e59b Include rev-list options in git-log manpage.
Replace the "This manual page describes only the most frequently used options."
text with the list of rev-list options in git-log manpage. (The git-diff-tree
options are already included.)

Move these options to a separate file and include it from both
git-rev-list.txt and git-log.txt.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-18 15:09:08 -08:00