Commit graph

3306 commits

Author SHA1 Message Date
René Scharfe 9b864e730b add strbuf_expand_dict_cb(), a helper for simple cases
The new callback function strbuf_expand_dict_cb() can be used together
with strbuf_expand() if there is only a small number of placeholders
for static replacement texts.  It expects its dictionary as an array of
placeholder+value pairs as context parameter, terminated by an entry
with the placeholder member set to NULL.

The new helper is intended to aid converting the remaining calls of
interpolate().  strbuf_expand() is smaller, more flexible and can be
used to go faster than interpolate(), so it should replace the latter.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:55:47 -08:00
Mark Burton 6fc4a7e546 git-commit.txt - mention that files listed on the command line must be known to git.
Signed-off-by: Mark Burton <markb@ordern.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-18 16:15:12 -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
Christian Couder 6e702c2458 Documentation: tutorial: add information about "git help" at the beginning
Talking about "git help" is useful because it has a few more
features (like when using it without arguments or with "-a") and
it may work on non unix like platforms.

Also add a few links to git-help(1) in "See also" sections.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-17 08:21:34 -08:00
Christian Couder b3d9888792 Documentation: user-manual: add information about "git help" at the beginning
Talking about "git help" is useful because it has a few more
features (like when using it without arguments or with "-a") and
it may work on non unix like platforms.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-17 08:21:31 -08:00
Junio C Hamano c9d8563c81 Merge branch 'bc/maint-keep-pack'
* bc/maint-keep-pack:
  repack: only unpack-unreachable if we are deleting redundant packs
2008-11-16 00:49:02 -08:00
Junio C Hamano ea4f2bd39d Merge branch 'maint'
* maint:
  Documentation: git-svn: fix example for centralized SVN clone
  Documentation: fix links to "everyday.html"
  revision.c: use proper data type in call to sizeof() within xrealloc
2008-11-14 22:12:38 -08:00
Jan Krüger 9e77353e0e Documentation: git-svn: fix example for centralized SVN clone
The example that tells users how to centralize the effort of the initial
git svn clone operation doesn't work properly. It uses rebase but that
only works if HEAD exists. This adds one extra command to create a
somewhat sensible HEAD that should work in all cases.

Signed-off-by: Jan Krüger <jk@jk.gs>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-14 21:49:42 -08:00
Christian Couder de07767fae Documentation: fix links to "everyday.html"
In some places the links are wrong. They should be:
"link:everyday.html", instead of: "linkgit:everyday[7]".
This patch fixes that.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-14 21:48:10 -08:00
Brandon Casey 83d0289df6 repack: only unpack-unreachable if we are deleting redundant packs
The -A option calls pack-objects with the --unpack-unreachable option so
that the unreachable objects in local packs are left in the local object
store loose. But if the -d option to repack was _not_ used, then these
unpacked loose objects are redundant and unnecessary.

Update tests in t7701.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-14 21:39:10 -08:00
Alexander Gavrilov a2df1fb2e5 Documentation: New GUI configuration and command-line options.
Add information on new git-gui and gitk command-line options,
configuration variables, and the encoding attribute.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-14 21:38:11 -08:00
Junio C Hamano e599e7ff1f Update draft release notes to 1.6.1
A large number of topics are merged to prepare for -rc0 now.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12 22:47:15 -08:00
Junio C Hamano 3fdd37fe15 Merge branch 'mk/maint-cg-push'
* mk/maint-cg-push:
  git push: Interpret $GIT_DIR/branches in a Cogito compatible way

Conflicts:
	t/t5516-fetch-push.sh
2008-11-12 22:26:24 -08:00
Junio C Hamano ecbbfb15a4 Merge branch 'bc/maint-keep-pack'
* bc/maint-keep-pack:
  t7700: test that 'repack -a' packs alternate packed objects
  pack-objects: extend --local to mean ignore non-local loose objects too
  sha1_file.c: split has_loose_object() into local and non-local counterparts
  t7700: demonstrate mishandling of loose objects in an alternate ODB
  builtin-gc.c: use new pack_keep bitfield to detect .keep file existence
  repack: do not fall back to incremental repacking with [-a|-A]
  repack: don't repack local objects in packs with .keep file
  pack-objects: new option --honor-pack-keep
  packed_git: convert pack_local flag into a bitfield and add pack_keep
  t7700: demonstrate mishandling of objects in packs with a .keep file
2008-11-12 22:00:43 -08:00
Junio C Hamano a5b2d4ac24 Merge branch 'mv/remote-rename'
* mv/remote-rename:
  git-remote: document the migration feature of the rename subcommand
  git-remote rename: migrate from remotes/ and branches/
  remote: add a new 'origin' variable to the struct
  Implement git remote rename
2008-11-12 22:00:25 -08:00
Junio C Hamano 902a4a252a Merge branch 'jk/deny-push-to-current'
* jk/deny-push-to-current:
  receive-pack: detect push to current branch of non-bare repo
  t5516: refactor oddball tests
2008-11-12 21:56:14 -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
Junio C Hamano 459d60084f Merge branch 'jk/diff-convfilter-test-fix'
* jk/diff-convfilter-test-fix:
  Avoid using non-portable `echo -n` in tests.
  add userdiff textconv tests
  document the diff driver textconv feature
  diff: add missing static declaration

Conflicts:
	Documentation/gitattributes.txt
2008-11-12 21:50:41 -08:00
Junio C Hamano 171d7661ed git.html: Update the links to stale versions
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12 15:04:54 -08:00
Junio C Hamano 6cd3729eae Merge branch 'maint'
* maint:
  Start 1.6.0.5 cycle
  Fix pack.packSizeLimit and --max-pack-size handling
  checkout: Fix "initial checkout" detection
  Remove the period after the git-check-attr summary

Conflicts:
	RelNotes
2008-11-12 15:03:57 -08:00
Junio C Hamano c14639f7b1 Start 1.6.0.5 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12 15:03:03 -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
Matt Kraai 0d641f75d1 Remove the period after the git-check-attr summary
The period at the end of the git-check-attr summary causes there to be
two periods after the summary in the git(1) manual page.

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12 12:20:31 -08:00
Brandon Casey daae062595 pack-objects: extend --local to mean ignore non-local loose objects too
With this patch, --local means pack only local objects that are not already
packed.

Additionally, this fixes t7700 testing whether loose objects in an alternate
object database are repacked.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12 10:29:22 -08:00
Brandon Casey e96fb9b8f9 pack-objects: new option --honor-pack-keep
This adds a new option to pack-objects which will cause it to ignore an
object which appears in a local pack which has a .keep file, even if it
was specified for packing.

This option will be used by the porcelain repack.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12 10:28:10 -08:00
Miklos Vajna 74443f185e git-remote: document the migration feature of the rename subcommand
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11 20:25:49 -08:00
Martin Koegler 18afe101eb git push: Interpret $GIT_DIR/branches in a Cogito compatible way
Current git versions ignore everything after # (called <head> in the
following) when pushing. Older versions (before cf818348f1),
interpret #<head> as part of the URL, which make git bail out.

As branches origin from Cogito, it is the best to correct this by using
the behaviour of cg-push, that is to push HEAD to remote refs/heads/<head>.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11 15:26:40 -08:00
David Symonds 2baf1850ce git-diff: Add --staged as a synonym for --cached.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11 14:55:43 -08:00
Nanako Shiraishi 30c4d7a76a Document "git log --source"
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11 12:55:42 -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 5bcce8494a Documentation: bisect: 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:20:03 -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
Jeff King 986e82396a receive-pack: detect push to current branch of non-bare repo
Pushing into the currently checked out branch of a non-bare
repository can be dangerous; the HEAD then loses sync with
the index and working tree, and it looks in the receiving
repo as if the pushed changes have been reverted in the
index (since they were never there in the first place).

This patch adds a safety valve that checks for this
condition and either generates a warning or denies the
update. We trigger the check only on a non-bare repository,
since a bare repo does not have a working tree (and in fact,
pushing to the HEAD branch is a common workflow for
publishing repositories).

The behavior is configurable via receive.denyCurrentBranch,
defaulting to "warn" so as not to break existing setups
(though it may, after a deprecation period, switch to
"refuse" by default). For users who know what they are doing
and want to silence the warning (e.g., because they have a
post-receive hook that reconciles the HEAD and working
tree), they can turn off the warning by setting it to false
or "ignore".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-09 10:16:50 -08:00
Junio C Hamano bc9c0248a5 Merge branch 'maint'
* maint:
  GIT 1.6.0.4
  Update RPM spec for the new location of git-cvsserver.
  push: fix local refs update if already up-to-date
  do not force write of packed refs

Conflicts:
	builtin-revert.c
2008-11-08 21:33:55 -08:00
Junio C Hamano 7c181d627c GIT 1.6.0.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-08 21:29:22 -08:00
Miklos Vajna bf98421a33 Implement git remote rename
The new rename subcommand does the followings:

1) Renames the remote.foo configuration section to remote.bar

2) Updates the remote.bar.fetch refspecs

3) Updates the branch.*.remote settings

4) Renames the tracking branches: renames the normal refs and rewrites
   the symrefs to point to the new refs.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-05 12:23:48 -08:00
Junio C Hamano 6331adb9c4 Update draft release notes to 1.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-05 12:20:55 -08:00
Junio C Hamano 5508064394 Merge branch 'maint'
* maint:
  format-patch documentation: mention the special case of showing a single commit
2008-11-04 15:11:26 -08:00
Markus Heidelberg b1a46b70b3 Makefile: add install-man rules (quick and normal)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02 20:46:52 -08:00
Junio C Hamano 16088d8870 format-patch documentation: mention the special case of showing a single commit
Even long timers seem to have missed that "format-patch -1 $commit" is a
much simpler and more obvious way to say "format-patch $commit^..$commit"
from the current documentation (and an example "format-patch -3 $commit"
to get three patches).  Add an explicit instruction in a much earlier part
of the documentation to make it easier to find.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02 20:45:55 -08:00
Junio C Hamano 9f8f132621 Update draft release notes to 1.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02 16:37:39 -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
Junio C Hamano 0eb5ebc1d8 Merge branch 'ag/blame-encoding'
* ag/blame-encoding:
  builtin-blame: Reencode commit messages according to git-log rules.
2008-11-02 16:36:30 -08:00
Yann Dirson a5a323f33c Add reference for status letters in documentation.
Also fix error in diff_filepair::status documentation, and point to
the in-code reference as well as the doc.

Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02 15:57:10 -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 02893a8503 Update draft 1.6.0.4 release notes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02 14:35:41 -08:00
Junio C Hamano 6a509a6f7f Update draft release notes to 1.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02 01:56:33 -07:00
Jan Krüger a240de1137 Introduce receive.denyDeletes
Occasionally, it may be useful to prevent branches from getting deleted from
a centralized repository, particularly when no administrative access to the
server is available to undo it via reflog. It also makes
receive.denyNonFastForwards more useful if it is used for access control
since it prevents force-updating by deleting and re-creating a ref.

Signed-off-by: Jan Krüger <jk@jk.gs>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-02 01:54:28 -07:00
Junio C Hamano aebd173ffa Merge branch 'maint'
* maint:
  Start 1.6.0.4 cycle
  add instructions on how to send patches to the mailing list with Gmail
  Documentation/gitattributes: Add subsection header for each attribute
  git send-email: avoid leaking directory file descriptors.
  send-pack: do not send out single-level refs such as refs/stash
  fix overlapping memcpy in normalize_absolute_path
  pack-objects: avoid reading uninitalized data
  correct cache_entry allocation

Conflicts:
	RelNotes
2008-11-02 00:15:22 -07:00