Commit graph

6698 commits

Author SHA1 Message Date
Junio C Hamano aac91b7eea Merge branch 'sp/keep-pack' into np/index-pack
* sp/keep-pack: (29 commits)
  Remove unused variable in receive-pack.
  Teach git-index-pack how to keep a pack file.
  Only repack active packs by skipping over kept packs.
  Allow short pack names to git-pack-objects --unpacked=.
  git-send-email: Read the default SMTP server from the GIT config file
  git-send-email: Document support for local sendmail instead of SMTP server
  Swap the porcelain and plumbing commands in the git man page
  Mention that pull can work locally in the synopsis
  gitweb: Add "next" link to commitdiff view
  gitweb: Move git_get_last_activity subroutine earlier
  Documentation: fix git-format-patch mark-up and link it from git.txt
  Documentation: Update information about <format> in git-for-each-ref
  Bash completion support for aliases
  gitweb: Fix up bogus $stylesheet declarations
  tests: merge-recursive is usable without Python
  gitweb: Check git base URLs before generating URL from it
  Documentation: add git in /etc/services.
  Documentation: add upload-archive service to git-daemon.
  git-cherry: document limit and add diagram
  diff-format.txt: Correct information about pathnames quoting in patch format
  ...
2006-11-02 21:41:47 -08:00
Shawn Pearce 861ed12106 Remove unused variable in receive-pack.
We aren't using this return code variable for anything so lets
just get rid of it to keep this section of code clean.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-30 19:12:29 -08:00
Junio C Hamano 4508dde169 Revert "send-pack --keep: do not explode into loose objects on the receiving end."
This reverts commit c7740a943e.  There should
be a way to make this controllable from the receiver end.
2006-10-30 16:02:07 -08:00
Nicolas Pitre 5ca807842f missing small substitution
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 21:10:26 -08:00
Shawn Pearce b807770924 Teach git-index-pack how to keep a pack file.
To prevent a race condition between `index-pack --stdin` and
`repack -a -d` where the repack deletes the newly created pack
file before any refs are updated to reference objects contained
within it we mark the pack file as one that should be kept.  This
removes it from the list of packs that `repack -a -d` will consider
for removal.

Callers such as `receive-pack` which want to invoke `index-pack`
should use this new --keep option to prevent the newly created pack
and index file pair from being deleted before they have finished any
related ref updates.  Only after all ref updates have been finished
should the associated .keep file be removed.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 13:45:03 -08:00
Junio C Hamano 01cff2d2ca Merge early part of branch 'np/index-pack' into sp/keep-pack 2006-10-29 13:44:54 -08:00
Shawn Pearce ce8590748b Only repack active packs by skipping over kept packs.
During `git repack -a -d` only repack objects which are loose or
which reside in an active (a non-kept) pack.  This allows the user
to keep large packs as-is without continuous repacking and can be
very helpful on large repositories.  It should also help us resolve
a race condition between `git repack -a -d` and the new pack store
functionality in `git-receive-pack`.

Kept packs are those which have a corresponding .keep file in
$GIT_OBJECT_DIRECTORY/pack.  That is pack-X.pack will be kept
(not repacked and not deleted) if pack-X.keep exists in the same
directory when `git repack -a -d` starts.

Currently this feature is not documented and there is no user
interface to keep an existing pack.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:46:21 -08:00
Shawn Pearce d4ff6d92c3 Allow short pack names to git-pack-objects --unpacked=.
This allows us to pass just the file name of a pack rather than
the complete path when we want pack-objects to consider its
contents as though they were loose objects.  This can be helpful
if $GIT_OBJECT_DIRECTORY contains shell metacharacters which make
it cumbersome to pass complete paths safely in a shell script.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:46:21 -08:00
Sergey Vlasov 6dcfa306f2 git-send-email: Read the default SMTP server from the GIT config file
Make the default value for --smtp-server configurable through the
'sendemail.smtpserver' option in .git/config (or $HOME/.gitconfig).

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Ryan Anderson <rda@google.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:45:23 -08:00
Sergey Vlasov 9c572b21dd git-send-email: Document support for local sendmail instead of SMTP server
Fix the --smtp-server option description to match reality.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:41:38 -08:00
Robin Rosenberg b1f33d6265 Swap the porcelain and plumbing commands in the git man page
This makes the documentation less confusing to newcomers.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:36:40 -08:00
Robin Rosenberg ce4231ffa8 Mention that pull can work locally in the synopsis
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 12:36:27 -08:00
Junio C Hamano c7740a943e send-pack --keep: do not explode into loose objects on the receiving end.
This adds "keep-pack" extension to send-pack vs receive pack protocol,
and makes the receiver invoke "index-pack --stdin --fix-thin".

With this, you can ask send-pack not to explode the result into
loose objects on the receiving end.

I've patched has_sha1_file() to re-check for added packs just
like is done in read_sha1_file() for now, but I think the static
"re-prepare" interface for packs was a mistake.  Creation of a
new pack inside a process that needs to read objects in them
back ought to be a rare event, so we are better off making the
callers (such as receive-pack that calls "index-pack --stdin
--fix-thin") explicitly call re-prepare.  That way we do not
have to penalize ordinary users of read_sha1_file() and
has_sha1_file().

We would need to fix this someday.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-29 00:49:17 -07:00
Jakub Narebski 151602df00 gitweb: Add "next" link to commitdiff view
Add a kind of "next" view in the bottom part of navigation bar for
"commitdiff" view.

For commitdiff between two commits:
  (from: _commit_)
For commitdiff for one single parent commit:
  (parent: _commit_)
For commitdiff for one merge commit
  (merge: _commit_ _commit_ ...)
For commitdiff for root (parentless) commit
  (initial)
where _link_ denotes hyperlink. SHA1 is shortened to 7 characters on
display, everything is perhaps unnecessary esc_html on display.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-28 14:26:00 -07:00
Jakub Narebski c60c56cc70 gitweb: Move git_get_last_activity subroutine earlier
This is purely cosmetic.  Having git_get_* between two parse_* subroutines
violated a good convention to group related things together.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-28 14:26:00 -07:00
Junio C Hamano 1dc5e55f2d Documentation: fix git-format-patch mark-up and link it from git.txt
Two asterisks the SYNOPSIS section were mistaken as emphasis,
and the latter backtick in "`<key>`s" were not recognized as
closing backtick.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-28 14:25:41 -07:00
Jakub Narebski ba7545adab Documentation: Update information about <format> in git-for-each-ref
Update information about value of <format> used when it is left
unspecified.  Add information about `%%` and `%xx` interpolation
(URL encoding).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-28 14:23:34 -07:00
Dennis Stosberg 367dce2a5b Bash completion support for aliases
- Add aliases to the list of available git commands.
 - Make completion work for aliased commands.

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-28 13:36:39 -07:00
Petr Baudis 887a612fef gitweb: Fix up bogus $stylesheet declarations
This seems to be a pre-++ residual declaration and it wasn't good for
anything at all besides flooding the webserver errorlog with "omg, our in
the same scope!!" warnings.

[jc: the patch was bogus by defining the variable which defeated a
 later test that checked it with "defined", which I fixed up.]

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-27 17:15:41 -07:00
Nicolas Pitre b89c4e93cc index-pack: minor fixes to comment and function name
Use proper english. Be more exact in one comment.

[jc: I threw in a bit of style clean-up as well]

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-27 15:00:19 -07:00
Nicolas Pitre d9c20ba13d enhance clone and fetch -k experience
Now that index-pack can be streamed with a pack, it is probably a good
idea to use it directly instead of creating a temporary file and running
index-pack afterwards.  This way index-pack can abort early whenever a
corruption is encountered even if the pack has not been fully
downloaded, it can display a progress percentage as it knows how much to
expects, and it is a bit faster since the pack indexing is partially
done as data is received. Using fetch -k doesn't need to disable thin
pack generation on the remote end either.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-27 14:58:31 -07:00
Junio C Hamano 36889a5078 tests: merge-recursive is usable without Python
Many tests still protected themselves with $no_python; there is no need
to do so anymore.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-27 14:29:55 -07:00
Junio C Hamano 019298015b Merge branch 'maint'
* maint:
  gitweb: Check git base URLs before generating URL from it
  Documentation: add git in /etc/services.
  Documentation: add upload-archive service to git-daemon.
  git-cherry: document limit and add diagram
  diff-format.txt: Correct information about pathnames quoting in patch format
2006-10-27 02:16:18 -07:00
Jakub Narebski d6b7e0b98f gitweb: Check git base URLs before generating URL from it
Check if each of git base URLs in @git_base_url_list is true before
appending "/$project" to it to generate project URL.

This fixes the error that for default configuration for gitweb in
Makefile, with GITWEB_BASE_URL empty (and "++GITWEB_BASE_URL++" being
"" in gitweb.cgi), we had URL of "/$project" in the summary view.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-27 02:12:56 -07:00
Christian Couder f8a5da6d94 Documentation: add git in /etc/services.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-27 02:10:52 -07:00
Christian Couder e2b1d1ccdd Documentation: add upload-archive service to git-daemon.
This patch minimaly documents the upload-archive service,
hoping that someone with better knowledge will improve upon.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-27 02:10:41 -07:00
Rene Scharfe a8ebdb90f9 git-cherry: document limit and add diagram
This patch adds the diagram from the long usage string of git-cherry to
its documentation, and documents the third option.  I changed some of
the + to - in order to save the reader from wondering where they might
fit into the picture.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 18:53:18 -07:00
Junio C Hamano ac1a1f9927 Merge branch 'jc/combined' into maint
* jc/combined:
  combine-diff: honour --no-commit-id
  combine-diff: fix hunk_comment_line logic.
  combine-diff: a few more finishing touches.
2006-10-26 18:45:52 -07:00
Jakub Narebski fb8e23fae2 diff-format.txt: Correct information about pathnames quoting in patch format
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 18:34:18 -07:00
Andy Parkins 543551e53a Make filenames line up in git-status output
When all the filenames line up it's much easier to copy and paste them
somewhere else, or to remove the "modified:", "copied:", etc prefix.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 18:30:56 -07:00
Nicolas Pitre 9bee247851 mimic unpack-objects when --stdin is used with index-pack
It appears that git-unpack-objects writes the last part of the input
buffer to stdout after the pack has been parsed.  This looks a bit
suspicious since the last fill() might have filled the buffer up to
the 4096 byte limit and more data might still be pending on stdin,
but since this is about being a drop-in replacement for unpack-objects
let's simply duplicate the same behavior for now.

[jc: with fix-up appeared in Nico's sleep]

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 18:27:44 -07:00
Jakub Narebski 35f401a670 gitweb: Use --no-commit-id in git_commit and git_commitdiff
Use --no-commit-id option to git-diff-tree command in git_commit and
git_commitdiff to filter out commit ID output that git-diff-tree adds
when called with only one <tree-ish> (not only for --stdin). Remove
filtering commit IDs from git-diff-tree output.

This option is in git since at least v1.0.0, so make use of it.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 02:16:30 -07:00
Junio C Hamano af70fa4f48 Merge branch 'jc/combined'
* jc/combined:
  combine-diff: honour --no-commit-id
  combine-diff: fix hunk_comment_line logic.
2006-10-26 02:07:18 -07:00
Junio C Hamano 44152787bc combine-diff: honour --no-commit-id
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 02:05:59 -07:00
Junio C Hamano 7a8ac59f2f combine-diff: fix hunk_comment_line logic.
We forgot that the last element of sline[] is a sentinel without
the actual line.  *BLUSH*

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 02:05:05 -07:00
Junio C Hamano e893f7ad73 Merge branch 'jc/combined'
* jc/combined:
  combine-diff: a few more finishing touches.
  Documentation: clarify refname disambiguation rules.
  diff-format.txt: Combined diff format documentation supplement
  Remove --syslog in git-daemon inetd documentation examples.
  Documentation: updates to "Everyday GIT"
2006-10-26 01:18:55 -07:00
Junio C Hamano d5f6a01af0 combine-diff: a few more finishing touches.
"new file" and "deleted file" were already reported in the
original code, but the logic was not as transparent as it could
have.  This uses a few variables and more comments to clarify
the flow.  The rule is: (1) if a path exists in the merge result
when no parent had it, we report "new" (otherwise it came from
the parents, as opposed to have added by the evil merge). (2) if
the path does not exist in the merge result, it is "deleted".

Since we can say "new" and "deleted", there is no reason not to
follow the /dev/null convention.  This fixes it.

Appending function name after @@@ ... @@@ is trivial, so
implement it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 01:18:49 -07:00
Junio C Hamano 0ac3056850 Documentation: clarify refname disambiguation rules.
Nobody should create ambiguous refs (i.e. have tag "foobar" and branch
"foobar" at the same time) that need to be disambiguated with these
rules to keep sanity, but the rules are there so document them.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 01:15:42 -07:00
Nicolas Pitre 3c9af36646 add progress status to index-pack
This is more interesting to look at when performing a big fetch.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 00:20:13 -07:00
Nicolas Pitre 636171cb80 make index-pack able to complete thin packs.
A new flag, --fix-thin, instructs git-index-pack to append any missing
objects to a thin pack to make it self contained and indexable. Of course
objects missing from the pack must be present elsewhere in the local
repository.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 00:20:07 -07:00
Jakub Narebski 0074aba1c0 diff-format.txt: Combined diff format documentation supplement
Update example combined diff format to the current version
$ git diff-tree -p -c fec9ebf16c
and provide complete first chunk in example.

Document combined diff format headers: how "diff header" look like,
which of "extended diff headers" are used with combined diff and how
they look like, differences in two-line from-file/to-file header from
non-combined diff format, chunk header format.

It should be noted that combined diff format was designed for quick
_content_ inspection and renames would work correctly to pick which
blobs from each tree to compare but otherwise not reflected in the
output (the pathnames are not shown).

[jc: with minimum copyediting]

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-26 00:15:01 -07:00
Christian Couder d9c04ba3dd Remove --syslog in git-daemon inetd documentation examples.
It is useless because --inetd implies --syslog.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-25 22:35:20 -07:00
J. Bruce Fields 119550af0c Documentation: updates to "Everyday GIT"
Remove the introduction: I think it should be obvious why
we have this.  (And if it isn't obvious then we've got other
problems.)

Replace reference to git whatchanged by git log.

Miscellaneous style and grammar fixes.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-25 20:01:57 -07:00
Nicolas Pitre e42797f5b6 enable index-pack streaming capability
A new flag, --stdin, allows for a pack to be received over a stream.
When this flag is provided, the pack content is written to either
the named pack file or directly to the object repository under the
same name as produced by git-repack.  The pack index is written as
well with the corresponding base name, unless the index name is
overriden with -o.

With this patch, git-index-pack could be used instead of
git-unpack-objects when fetching remote objects but only with
non "thin" packs for now.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-25 14:39:07 -07:00
Junio C Hamano eb153837d8 Merge branch 'maint'
* maint:
  Documentation/SubmittingPatches: 3+1 != 6
2006-10-25 14:38:33 -07:00
Junio C Hamano 84ab7b6fc7 Documentation/SubmittingPatches: 3+1 != 6
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-25 14:38:24 -07:00
Junio C Hamano 01fe679a34 Merge branch 'aw/cvsimport'
* aw/cvsimport:
  cvsimport: move over to using git-for-each-ref to read refs.
2006-10-25 14:10:50 -07:00
Junio C Hamano 40eaac5abd Merge branch 'jc/web'
* jc/web:
  gitweb: Print commit message without title in commitdiff only if there is any
  gitweb: Filter out commit ID from @difftree in git_commit and git_commitdiff
  gitweb: Get rid of git_print_simplified_log
  gitweb: Show project's README.html if available
  gitweb: Do not automatically append " git" to custom site name
  gitweb: Make search type a popup menu
  gitweb: Restore object-named links in item lists
  gitweb: use for-each-ref to show the latest activity across branches
2006-10-25 13:30:18 -07:00
Junio C Hamano 9ee93dceb5 Merge for-each-ref to sync gitweb fully with 'next' 2006-10-25 13:29:12 -07:00
Junio C Hamano 8e95026f29 Merge branch 'jc/web-blame'
* jc/web-blame:
  gitweb: spell "blame --porcelain" with -p
  blame: Document and add help text for -f, -n, and -p
  gitweb: blame porcelain: lineno and orig lineno swapped
  Remove git-annotate.perl and create a builtin-alias for git-blame
  gitweb: use blame --porcelain
  git-blame --porcelain
  blame.c: move code to output metainfo into a separate function.
  git-blame: --show-number (and -n)
  git-blame: --show-name (and -f)
  blame.c: whitespace and formatting clean-up.
  Gitweb - provide site headers and footers
  gitweb: blame: Mouse-over commit-8 shows author and date
  gitweb: blame: print commit-8 on the leading row of a commit-block
  Revert 954a618375
  gitweb: prepare for repositories with packed refs.
  gitweb: make leftmost column of blame less cluttered.
2006-10-25 13:18:06 -07:00