Commit Graph

14787 Commits

Author SHA1 Message Date
Miklos Vajna
c16570c42a Revision walking documentation: document most important functions
Unfortunately the list is not complete, but includes the essential ones.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-31 14:32:56 -07:00
Jakub Narebski
6ab69bf253 gitweb: Remove gitweb/test/ directory
Testing if gitweb handles filenames with spaces, filenames with plus
sign ('+') which encodes spaces in CGI parameters (in URLs), and
filenames with Unicode characters should be handled by gitweb tests.

Those files are remainder of the time when gitweb was project on its
own, not a part of git (with its testsuite).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-31 14:18:40 -07:00
Marius Storm-Olsen
aa9349d449 Add shortcut in refresh_cache_ent() for marked entries.
When a cache entry has been marked as CE_VALID, the user has
promised us that any change in the work tree does not matter.
Just mark the entry as up-to-date, and continue.

Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-31 14:18:20 -07:00
Marius Storm-Olsen
b7f685a754 Clearify the documentation for core.ignoreStat
The previous documentation didn't make it clear that the
"assume unchanged" was on per file basis, and not a global
flag.

Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-31 13:09:39 -07:00
Junio C Hamano
291d823e36 checkout: "best effort" checkout
When unpack_trees() returned an error while switching branches, we used to
stop right there, exiting without writing the index out or switching HEAD.

This is Ok when unpack_trees() returned an error because it detected
untracked files or locally modified paths that could be overwritten by
branch switching, because that error return is done before we start to
modify the work tree.  But it is undesirable if unpack_trees() already
started to update the work tree and a failure is returned because some but
not all paths are updated in the work tree, perhaps because a directory
that some files need to go in was read-only by mistake, or a file that
will be overwritten by branch switching had a mandatory lock on it and we
failed to unlink it.

This changes the behaviour upon such an error to complete the branch
switching; the files updated in the work tree will hopefully be much more
consistent with the index and HEAD derived from the switched-to branch.

We still issue error messages, and exit the command with non-zero status,
so scripted callers need to notice it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-29 17:35:22 -07:00
Junio C Hamano
2e2b887d1c unpack_trees(): allow callers to differentiate worktree errors from merge errors
Instead of uniformly returning -1 on any error, this teaches
unpack_trees() to return -2 when the merge itself is Ok but worktree
refuses to get updated.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-29 17:35:21 -07:00
Junio C Hamano
6286a08db3 checkout: consolidate reset_{to_new,clean_to_new}()
These two were very similar functions with only tiny bit of difference.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-29 17:35:10 -07:00
Luciano Rocha
74d3b23fe3 git-init: accept --bare option
It is unfortunate that "git init --bare" does not work and the only reason
why "init" did not learn its own "--bare" option is because "git --bare
init" already does the job (and as an option to the git 'potty', it is
more generic solution).

This teaches "git init" its own "--bare" option, so that both "git --bare init"
and "git init --bare" works mostly the same way.

[jc: rewrote the log message and added test]

Signed-off-by: Luciano Rocha <strange@nsk.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-28 18:31:19 -07:00
Junio C Hamano
84a5750bc5 checkout: make reset_clean_to_new() not die by itself
Instead, have its error percolate up through the callchain and let it be
the exit status of the main command.  No semantic changes yet.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-28 17:38:21 -07:00
Junio C Hamano
d2b3691b61 "git checkout -- paths..." should error out when paths cannot be written
When "git checkout -- paths..." cannot update work tree for whatever
reason, checkout_entry() correctly issued an error message for the path to
the end user, but the command ignored the error, causing the entire
command to succeed.  This fixes it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-28 17:38:20 -07:00
Junio C Hamano
a7052d3521 Documentation: git-cherry uses git-patch-id
Geoffrey Irving noticed that git-cherry talks about comparing commits without
hinting how they are compared.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-28 17:03:46 -07:00
Junio C Hamano
56ae8df5c7 Manual subsection to refer to other pages is SEE ALSO
Consistently say so in all caps as it is customary to do so.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-28 16:59:40 -07:00
Christian Couder
823ea1211c bisect: use "$GIT_DIR/BISECT_START" to check if we are bisecting
It seems simpler and safer to use the BISECT_START file everywhere
to decide if we are bisecting or not, instead of using it in some
places and BISECT_NAMES in other places.

In commit 6459c7c678 (Nov 18 2007,
Bisect: use "$GIT_DIR/BISECT_NAMES" to check if we are bisecting.),
we decided to use BISECT_NAMES but code changed a lot and we now
have to check BISECT_START first in the "bisect_start" function
anyway.

This patch also makes things a little bit safer by creating
the BISECT_START file first and deleting it last, and also by
adding checks in "bisect_clean_state".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-28 11:47:58 -07:00
Dmitry V. Levin
efb98b4453 builtin-fetch.c (store_updated_refs): Honor update_local_ref() return value
Sync with builtin-fetch--tool.c where append_fetch_head()
honors update_local_ref() return value.

This fixes non fast forward fetch exit status,
http://bugzilla.altlinux.org/show_bug.cgi?id=15037

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-28 10:47:12 -07:00
Junio C Hamano
6eec46bdda fix sha1_pack_index_name()
An earlier commit 633f43e (Remove redundant code, eliminate one static
variable, 2008-05-24) had a thinko (perhaps an eyeno) that broke
sha1_pack_index_name() function.  One symptom of this was that the http
walker is now completely broken.

This should fix it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-28 10:24:32 -07:00
Junio C Hamano
d683a0e00c Git::cat_blob: allow using an empty blob to fix git-svn breakage
Recent "git-svn optimization" series introduced Git::cat_blob() subroutine
whose interface was broken in that it returned the size of the blob but
signalled an error by returning 0.  You can never use an empty blob with
such an interface.

This fixes the interface to return a negative value to signal an error.

Reported by Björn Steinbrink.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-27 23:35:55 -07:00
Junio C Hamano
b2a42f55bc t5100: Avoid filename "nul"
There are broken filesystems that cannot have a file whose name is "nul"
anywhere on it.  Rename the test file to make ourselves more portable.

Noticed by Mark Levedahl.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-27 23:12:29 -07:00
Junio C Hamano
b71ce7f3f1 Merge 1.5.5.3 in 2008-05-27 22:34:19 -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
Jeff King
37b78c2547 clone: make sure we support the transport type
If we use an unsupported transport (e.g., http when curl
support is not compiled in), transport_get reports an error
to the user, but we still get a transport object. We need to
manually check and abort the clone process at that point, or
we end up with a segfault.

Noticed by Thomas Rast.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-27 21:30:16 -07:00
Johannes Sixt
cb418b5a38 t5700-clone-reference: Quote $U
The new "trash directory" bites again.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-27 21:29:01 -07:00
Karl Hasselström
40672a1904 Add some tests for git update-ref -d
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-27 20:56:22 -07:00
Junio C Hamano
3beb56bde6 Merge branch 'jc/diff-no-no-index'
* jc/diff-no-no-index:
  git diff --no-index: default to page like other diff frontends
  git-diff: allow  --no-index semantics a bit more
  "git diff": do not ignore index without --no-index
  diff-files: do not play --no-index games
  tests: do not use implicit "git diff --no-index"
2008-05-26 22:38:19 -07:00
Junio C Hamano
b3fde6ccb1 git diff --no-index: default to page like other diff frontends
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-26 22:35:07 -07:00
Junio C Hamano
040366076f git-diff: allow --no-index semantics a bit more
Even when inside a git work tree, if two paths are given and at least one
is clearly outside the work tree, it cannot be a request to diff a tracked
path anyway; allow such an invocation to use --no-index semantics.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-26 21:54:23 -07:00
Junio C Hamano
2fe18392f0 Merge branch 'maint'
* maint:
  Documentation: fix graph in git-rev-parse.txt
  show-branch --current: do not barf on detached HEAD
2008-05-26 19:49:01 -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
Junio C Hamano
2d3cfd77ad Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui:
  git-gui: Vertically align textboxes with labels
  git-gui: Handle workdir detection when CYGWIN=nowinsymlinks
  git-gui: Add a --trace command line option
2008-05-26 19:10:43 -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
Twiinz
95dcfa3633 git-gui: Vertically align textboxes with labels
In git-gui after clicking either on 'Create New Repository' or
'Open Existing Repository' the form elements aren't centered like
they are pretty much everywhere else in the app. At least when ran
on a mac, haven't checked on other platforms.

Using grid instead of pack seems to fix this.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-05-26 21:05:20 -04: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
d3d20b8468 Makefile: fix dependency on wt-status.h
Noticed by Hannes, reported by Dscho.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-26 14:56:19 -07:00
Johannes Schindelin
37a12dda24 hg-to-git: add --verbose option
This patch adds an option to make hg-to-git quiet by default.  Note:
it only suppresses those messages that would be printed when everything
was up-to-date.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-26 10:43:39 -07:00
Junio C Hamano
2d3922dc61 Documentation/git.txt: link to 1.5.5.2 documentation.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 22:43:14 -07:00
Junio C Hamano
8366b7baae Merge branch 'maint'
* maint:
  builtin-fast-export: Only output a single parent per line
  Release Notes for 1.5.5.2

Conflicts:

	RelNotes
2008-05-25 22:43:05 -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
Shawn O. Pearce
fa620f1ac8 Ignore no-op changes in paranoid update hook
If the hook gets invoked with identical old and new ids there
is no change taking place.  We probably should not have been
called, but instead of failing silently allow the no-op.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 20:29:30 -07:00
Shawn O. Pearce
50b7b2ee99 Don't load missing ACL files in paranoid update hook
If a user or group ACL file does not exist in the current tip
revision of the acl repository we will get an error from cat-file
when we ask for that blob as it cannot be resolved.  A quick look
at the history by rev-list can tell us if there is a path there
or not.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 20:29:30 -07:00
Shawn O. Pearce
97561fff32 Don't diff empty tree on branch creation in paranoid update hook
Listing all files in a branch during branch creation is silly;
the user's file-level ACLs probably don't mean anything at this
point.  We now treat the base case of 0{40} as an empty diff,
as this happens only when the user is creating the branch and
there are file level ACLs that diff against the old value of
the branch.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 20:29:30 -07:00
Junio C Hamano
48ded91674 log --pretty: do not accept bogus "--prettyshort"
... nor bogus "format.pretty = '=short'".  Both are syntax errors.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 20:29:07 -07:00
Junio C Hamano
37869f40a8 log --graph: do not accept log --graphbogus
An obvious fix to the argument parser.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 20:28:58 -07:00
Junio C Hamano
f53bc0953f Update draft release notes for 1.5.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 18:28:37 -07:00