Commit graph

48 commits

Author SHA1 Message Date
Junio C Hamano 59eb68aa2b Update my e-mail address
The old cox.net address is still getting mails from gitters.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-21 12:14:42 -07:00
Junio C Hamano b773fc34a0 Merge branch 'jc/branch-merged'
* jc/branch-merged:
  branch --merged/--no-merged: allow specifying arbitrary commit
  branch --contains: default to HEAD
  parse-options: add PARSE_OPT_LASTARG_DEFAULT flag

Conflicts:
	Documentation/git-branch.txt
2008-07-14 23:47:01 -07:00
Junio C Hamano 049716b370 branch --merged/--no-merged: allow specifying arbitrary commit
"git-branch --merged" is a handy way to list all the branches that have
already been merged to the current branch, but it did not allow checking
against anything but the current branch.  Having to switch branches only
to list the branches that are merged with another branch made the feature
practically useless.

This updates the option parser so that "git branch --merged next" is
accepted when you are on 'master' branch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-09 02:12:24 -07:00
Jonathan Nieder ba020ef5eb manpages: italicize git command names (which were in teletype font)
The names of git commands are not meant to be entered at the
commandline; they are just names. So we render them in italics,
as is usual for command names in manpages.

Using

	doit () {
	  perl -e 'for (<>) { s/\`(git-[^\`.]*)\`/'\''\1'\''/g; print }'
	}
	for i in git*.txt config.txt diff*.txt blame*.txt fetch*.txt i18n.txt \
	        merge*.txt pretty*.txt pull*.txt rev*.txt urls*.txt
	do
	  doit <"$i" >"$i+" && mv "$i+" "$i"
	done
	git diff

.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:40 -07:00
Jonathan Nieder 483bc4f045 Documentation formatting and cleanup
Following what appears to be the predominant style, format
names of commands and commandlines both as `teletype text`.

While we're at it, add articles ("a" and "the") in some
places, italicize the name of the command in the manual page
synopsis line, and add a comma or two where it seems appropriate.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-01 17:20:16 -07:00
Jonathan Nieder b1889c36d8 Documentation: be consistent about "git-" versus "git "
Since the git-* commands are not installed in $(bindir), using
"git-command <parameters>" in examples in the documentation is
not a good idea. On the other hand, it is nice to be able to
refer to each command using one hyphenated word. (There is no
escaping it, anyway: man page names cannot have spaces in them.)

This patch retains the dash in naming an operation, command,
program, process, or action. Complete command lines that can
be entered at a shell (i.e., without options omitted) are
made to use the dashless form.

The changes consist only of replacing some spaces with hyphens
and vice versa. After a "s/ /-/g", the unpatched and patched
versions are identical.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-01 17:20:15 -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
Christian Couder 9e1f0a85c6 documentation: move git(7) to git(1)
As the "git" man page describes the "git" command at the end-user
level, it seems better to move it to man section 1.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-06 11:18:28 -07:00
Lars Hjemli 9a7ea2b1f3 git-branch.txt: compare --contains, --merged and --no-merged
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-20 18:16:46 -07:00
Lars Hjemli e8b404c27e git-branch: add support for --merged and --no-merged
These options filter the output from git branch to only include branches
whose tip is either merged or not merged into HEAD.

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

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

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-20 18:16:46 -07:00
Jay Soffian 572fc81d21 doc: documentation update for the branch track changes
Documents the branch.autosetupmerge=always setting and usage of --track
when branching from a local branch.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19 21:22:29 -08:00
Dan McGee 5162e69732 Documentation: rename gitlink macro to linkgit
Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock
Asciidoc configuration:

@@ -149,7 +153,10 @@
 # Inline macros.
 # Backslash prefix required for escape processing.
 # (?s) re flag for line spanning.
-(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
+
+# Explicit so they can be nested.
+(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
+
 # Anchor: [[[id]]]. Bibliographic anchor.
 (?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3
 # Anchor: [[id,xreflabel]]

This default regex now matches explicit values, and unfortunately in this
case gitlink was being matched by just 'link', causing the wrong inline
macro template to be applied. By renaming the macro, we can avoid being
matched by the wrong regex.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06 18:41:44 -08:00
Junio C Hamano 5fa00a4dcf Merge branch 'jc/branch-contains'
* jc/branch-contains:
  git-branch --contains: doc and test
  git-branch --contains=commit
  parse-options: Allow to hide options from the default usage.
2007-12-01 13:58:54 -08:00
Junio C Hamano d25430c5f8 Merge branch 'maint'
* maint:
  scripts: do not get confused with HEAD in work tree
  Improve description of git-branch -d and -D in man page.
2007-11-28 17:06:57 -08:00
Jan Hudec 1e72a40de9 Improve description of git-branch -d and -D in man page.
Some users expect that deleting a remote-tracking branch would prevent
fetch from creating it again, so be explcit about that it's not the case.
Also be a little more explicit about what fully merged means.

Signed-off-by: Jan Hudec <bulb@ucw.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-28 15:50:59 -08:00
Junio C Hamano 3f7dfe77b7 git-branch --contains: doc and test
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22 22:11:28 -08:00
Junio C Hamano 35865ca245 Merge branch 'maint'
* maint:
  for-each-ref: fix off by one read.
  git-branch: remove mention of non-existent '-b' option
  git-svn: prevent dcommitting if the index is dirty.
  Fix memory leak in traverse_commit_list
2007-11-12 00:14:15 -08:00
Jeff King 53e780c8f6 git-branch: remove mention of non-existent '-b' option
This looks like a cut and paste error from the git-checkout
explanation of --no-track.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-11 23:40:32 -08:00
Jonas Fonseca e0e6c09611 Update manpages to reflect new short and long option aliases
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-29 21:03:31 -07:00
Federico Mena Quintero 46749204e9 Note that git-branch will not automatically checkout the new branch
Signed-off-by: Federico Mena Quintero <federico@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02 17:27:00 -07:00
Federico Mena Quintero 84d176cef6 Add documentation for --track and --no-track to the git-branch docs.
Signed-off-by: Federico Mena Quintero <federico@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02 17:26:52 -07:00
Steve Hoelzer 434e6ef89d Try to be consistent with capitalization in the documentation
Signed-off-by: Steve Hoelzer <shoelzer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-01 18:15:43 -07:00
Francis Moreau 33b1f3d544 Fix git-branch documentation when using remote refs
Signed-off-by: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-16 21:34:44 -07:00
Jeff King 792d2370f9 Documentation: minor cleanups to branch/checkout wording
Change "to made" to "made to", which is a typo. Use "reflog"
instead of "ref log", which is used elsewhere throughout the
documentation.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-02 01:33:45 -07:00
Jeff King 967506bbbd Documentation: quote {non-attributes} for asciidoc
Asciidoc treats {foo} as an attribute to be substituted; if
'foo' doesn't exist as an attribute, then the entire line
gets dropped. When the literal {foo} is desired, \{foo} is
required.

The exceptions to this rule are:
  - inside literal blocks
  - if the 'foo' contains non-alphanumeric characters (e.g.,
    {foo|bar} is assumed not to be an attribute)

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-02 01:33:44 -07:00
Junio C Hamano a6080a0a44 War on whitespace
This uses "git-apply --whitespace=strip" to fix whitespace errors that have
crept in to our source files over time.  There are a few files that need
to have trailing whitespaces (most notably, test vectors).  The results
still passes the test, and build result in Documentation/ area is unchanged.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-07 00:04:01 -07:00
Quy Tonthat 045fe3ccda Documentation/branch: fix small typo in -D example
Signed-off-by: Quy Tonthat <qtonthat@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-14 20:17:00 -07:00
Paolo Bonzini 0746d19a82 git-branch, git-checkout: autosetup for remote branch tracking
In order to track and build on top of a branch 'topic' you track from
your upstream repository, you often would end up doing this sequence:

  git checkout -b mytopic origin/topic
  git config --add branch.mytopic.remote origin
  git config --add branch.mytopic.merge refs/heads/topic

This would first fork your own 'mytopic' branch from the 'topic'
branch you track from the 'origin' repository; then it would set up two
configuration variables so that 'git pull' without parameters does the
right thing while you are on your own 'mytopic' branch.

This commit adds a --track option to git-branch, so that "git
branch --track mytopic origin/topic" performs the latter two actions
when creating your 'mytopic' branch.

If the configuration variable branch.autosetupmerge is set to true, you
do not have to pass the --track option explicitly; further patches in
this series allow setting the variable with a "git remote add" option.
The configuration variable is off by default, and there is a --no-track
option to countermand it even if the variable is set.

Signed-off-by: Paolo Bonzini  <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-10 23:41:58 -08:00
Julian Phillips 5e00f6faf4 git-branch: document new --no-abbrev option
Add the new --no-abbrev option to the man page for the git-branch command.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-02 16:39:18 -08:00
Junio C Hamano c3f0baacad Documentation: sync git.txt command list and manual page title
Also reorders a handful entries to make each list sorted
alphabetically.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-18 15:53:37 -08:00
René Scharfe 23bfbb815d Documentation: a few spelling fixes
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-17 08:44:32 -08:00
Brian Gernhardt f3673988ec Add documentation for git-branch's color configuration.
Added color.branch and color.branch.<slot> to configuration list.
Style copied from color.status and meanings derived from the code.

Moved the color meanings from color.diff.<slot> to color.branch.<slot>
since the latter comes first alphabetically.

Added --color and --no-color to git-branch's usage and documentation.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-03 08:16:02 -08:00
Quy Tonthat 7dda22e317 Documentation/git-branch: new -r to delete remote-tracking branches.
Signed-off-by: Quy Tonthat <qtonthat@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20 20:36:42 -08:00
Lars Hjemli c976d415e5 git-branch: add options and tests for branch renaming
Extend git-branch with the following options:

  git-branch -m|-M [<oldbranch>] newbranch

The -M variation is required to force renaming over an exsisting
branchname.

This also indroduces $GIT_DIR/RENAME_REF which is a "metabranch"
used when renaming branches. It will always hold the original sha1
for the latest renamed branch.

Additionally, if $GIT_DIR/logs/RENAME_REF exists, all branch rename
events are logged there.

Finally, some testcases are added to verify the new options.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-05 23:50:57 -08:00
Lars Hjemli 75e6e21320 Add -v and --abbrev options to git-branch
The new -v option makes git-branch show the abbreviated sha1 + subjectline
for each branch.

Additionally, minimum abbreviation length can be specified with
--abbrev=<length>

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-24 20:52:54 -08:00
Andy Parkins bfcc921430 Add support to git-branch to show local and remote branches
Instead of storing a list of refnames in append_ref, a list of
structures is created.  Each of these stores the refname and a
symbolic constant representing its type.

The creation of the list is filtered based on a command line
switch; no switch means "local branches only", "-r" means "remote
branches only" (as they always did); but now "-a" means "local
branches or remote branches".

As a side effect, the list is now not global, but allocated in
print_ref_list() where it used.

Also a memory leak is plugged, the memory allocated during the
list creation was never freed.

It lays a groundwork to also display tags, but the command being
'git branch' it is not currently used.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-21 21:26:12 -08:00
Junio C Hamano dcaad49c92 Merge branch 'sp/reflog' into next
* sp/reflog:
  Enable ref log creation in git checkout -b.
  Create/delete branch ref logs.
  Include ref log detail in commit, reset, etc.
  Change order of -m option to update-ref.
  Correct force_write bug in refs.c
  Change 'master@noon' syntax to 'master@{noon}'.
  Log ref updates made by fetch.
  Force writing ref if it doesn't exist.
  Added logs/ directory to repository layout.
  General ref log reading improvements.
  Fix ref log parsing so it works properly.
  Support 'master@2 hours ago' syntax
  Log ref updates to logs/refs/<ref>
  Convert update-ref to use ref_lock API.
  Improve abstraction of ref lock/write.
2006-05-23 15:07:47 -07:00
Shawn Pearce 2b1f4247ab Reference git-check-ref-format in git-branch.
Its nice to have git-check-ref-format actually get mentioned in
git-branch's documentation as the syntax of a ref name must conform
to what is described in git-check-ref-format.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-21 02:05:41 -07:00
Shawn Pearce 3a4b3f269c Create/delete branch ref logs.
When crating a new branch offer '-l' as a way for the user to
quickly enable ref logging for the new branch.

When deleting a branch also delete its ref log.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-19 15:03:24 -07:00
Sean Estabrooks 2eaf273d51 Update the git-branch man page to include the "-r" option,
and fix up asciidoc "callouts"

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
2006-04-28 14:31:18 -07:00
Jon Loeliger dd1811199e Call out the two different uses of git-branch and fix a typo.
Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-17 20:42:30 -08:00
Fredrik Kuivinen 7bd7f2804d Remove trailing dot after short description
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-09 11:44:11 -08:00
Fredrik Kuivinen 075dd8ee54 git-branch: Documentation fixes
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-01-29 15:00:46 -08:00
Junio C Hamano 1e2ccd3abc Documentation: more examples.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-12-12 23:24:06 -08:00
Andreas Ericsson d4072c9722 git-branch: Mention -d and -D in man-page.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-14 14:16:37 -08:00
Christian Meder f73ae1fc5d Some typos and light editing of various manpages
Typos, light editing and clarifications.

Signed-off-by: Christian Meder <chris@absolutegiganten.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-05 15:08:26 -07:00
Sergey Vlasov a7154e916c [PATCH] Documentation: Update all files to use the new gitlink: macro
The replacement was performed automatically by these commands:

	perl -pi -e 's/link:(git.+)\.html\[\1\]/gitlink:$1\[1\]/g' \
		README Documentation/*.txt
	perl -pi -e 's/link:git\.html\[git\]/gitlink:git\[7\]/g' \
		README Documentation/*.txt

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-20 15:07:52 -07:00
Junio C Hamano 215a7ad1ef Big tool rename.
As promised, this is the "big tool rename" patch.  The primary differences
since 0.99.6 are:

  (1) git-*-script are no more.  The commands installed do not
      have any such suffix so users do not have to remember if
      something is implemented as a shell script or not.

  (2) Many command names with 'cache' in them are renamed with
      'index' if that is what they mean.

There are backward compatibility symblic links so that you and
Porcelains can keep using the old names, but the backward
compatibility support  is expected to be removed in the near
future.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-07 17:45:20 -07:00
Renamed from Documentation/git-branch-script.txt (Browse further)