It fed two arguments to override the corresponding global variables,
but the caller always assigned the values to the global variables
first and then passed those global variables to this function.
Stop pretending to be a proper API to confuse people.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* cc/replace:
t6050: check pushing something based on a replaced commit
Documentation: add documentation for "git replace"
Add git-replace to .gitignore
builtin-replace: use "usage_msg_opt" to give better error messages
parse-options: add new function "usage_msg_opt"
builtin-replace: teach "git replace" to actually replace
Add new "git replace" command
environment: add global variable to disable replacement
mktag: call "check_sha1_signature" with the replacement sha1
replace_object: add a test case
object: call "check_sha1_signature" with the replacement sha1
sha1_file: add a "read_sha1_file_repl" function
replace_object: add mechanism to replace objects found in "refs/replace/"
refs: add a "for_each_replace_ref" function
* bc/mailsplit-cr-at-eol:
Allow mailsplit (and hence git-am) to handle mails with CRLF line-endings
builtin-mailsplit.c: remove read_line_with_nul() since it is no longer used
builtin-mailinfo,builtin-mailsplit: use strbufs
strbuf: add new function strbuf_getwholeline()
We skip t7407 because a patch series is cooking that uses is.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This 'ifndef' macro is entered only when __sun__ is not defined. This test
will never fail since it is located inside of the 'else' branch of an 'if'
macro which tests whether __sun__ is defined. It has had no effect since
the merge at 436f66b7.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Use a new color for commits that don't have any previously printed
children. The following command demonstrates the changes:
git log --graph --pretty=tformat:'%h %s%n' -7 481c7a618b0793
Now the two independent lines of development are displayed with
different colors, instead of both using the same color.
Signed-off-by: Adam Simpkins <simpkins@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If SVN_SSH is defined, it will be used. Else value in
GIT_SSH is copied to SVN_SSH & then, only on Windows,
the \s are escaped.
On Windows, the shell-variables must be set as follows
GIT_SSH="C:\Program Files\PuTTY\plink.exe"
SVN_SSH="C:\\Program Files\\PuTTY\\plink.exe"
See http://code.google.com/p/msysgit/issues/detail?id=305
[ew: fixed indentation to use tabs]
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Karthik Rajagopalan <karthikr@fastmail.fm>
And then unescape them when writing to $GIT_CONFIG.
SVN has different rules for repository URLs (usually the root)
and for paths within that repository (below the HTTP layer).
Thus, for the request URI path at the HTTP level, the URI needs
to be encoded. However, in the body of the HTTP request (the
with underlying SVN XML protocol), those paths should not be
URI-encoded[1]. For non-HTTP(S) requests, SVN appears to be
more flexible and will except weird characters in the URL as
well as URI-encoded ones.
Since users are used to using URLs being entirely URI-encoded,
git svn will now attempt to unescape the path portion of URLs
while leaving the actual repository URL untouched.
This change will be reflected in newly-created $GIT_CONFIG files
only. This allows users to switch between svn(+ssh)://, file://
and http(s):// urls without changing the fetch/branches/tags
config keys. This won't affect existing imports at all (since
things didn't work before this commit anyways), and will allow
users to force escaping into repository paths that look like
they're escaped (but are not).
Thanks to Mike Smullin for the original bug report and Björn
Steinbrink for summarizing it into testable cases for me.
[1] Except when committing copies/renames, see
commit 29633bb91c
Signed-off-by: Eric Wong <normalperson@yhbt.net>
The note about interoperating in different timezones and such is about
localtime argument, not parent.
Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
* maint:
filter-branch: make the usage string fit on 80 chars terminals.
filter-branch: add an example how to add ACKs to a range of commits
docs: describe impact of repack on "clone -s"
Make append_remote_object_url() (and by implication,
get_remote_object_url) use end_url_with_slash() to ensure that the url
ends with a slash.
Previously, they assumed that the url did not end with a slash and
as a result appended a slash, sometimes errorneously.
This fixes an issue introduced in 5424bc5 ("http*: add helper methods
for fetching objects (loose)"), where the append_remote_object_url()
implementation in http-push.c, which assumed that urls end with a
slash, was replaced by another one in http.c, which assumed urls did
not end with a slash.
The above issue was raised by Thomas Schlichter:
http://marc.info/?l=git&m=125043105231327
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Tested-by: Thomas Schlichter <thomas.schlichter@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It used to be a single, huge line, badly wrapped by xterm.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When you have to add certain lines like ACKs (or for that matter,
Signed-off-by:s) to a range of commits starting with HEAD, you might
be tempted to use 'git rebase -i -10', but that is a waste of your
time.
It is better to use 'git filter-branch' with an appropriate message
filter, and this commit adds an example how to do so to
filter-branch's man page.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The effects of repacking on a repository with alternates are a bit
subtle. The two main things users will want are:
1. Not to waste disk space by accidentally copying objects which could
be shared.
2. Copying all objects explicitly to break the dependency on the source
repo.
This patch describes both under the "clone -s" documentation. It makes
sense to put it there rather than in git-repack.txt for both cases.
For (1), we are warning the user who is using "clone -s" about what _not_
to do, so we need to get their attention when reading about "clone -s".
For (2), we are telling them how git-repack can be used to accomplish a
task, but until they know that git-repack is the right tool, they have no
reason to look at the repack documentation.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* lt/block-sha1:
block-sha1/sha1.c: silence compiler complaints by casting void * to char *
block-sha1: more good unaligned memory access candidates
block-sha1: support for architectures with memory alignment restrictions
block-sha1: split the different "hacks" to be individually selected
block-sha1: move code around
block-sha1: improve code on large-register-set machines
block-sha1: improved SHA1 hashing
block-sha1: perform register rotation using cpp
block-sha1: get rid of redundant 'lenW' context
block-sha1: Use '(B&C)+(D&(B^C))' instead of '(B&C)|(D&(B|C))' in round 3
block-sha1: macroize the rounds a bit further
block-sha1: re-use the temporary array as we calculate the SHA1
block-sha1: make the 'ntohl()' part of the first SHA1 loop
block-sha1: minor fixups
block-sha1: try to use rol/ror appropriately
block-sha1: undo ctx->size change
Add new optimized C 'block-sha1' routines
* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: Parse arbitrary commit-ish in SHA1 field
gitk: Fix direction of symmetric difference in optimized mode
gitk: New option to hide remote refs
gitk: Do not hard-code "encoding" in attribute lookup functions
In 0392513 (add-interactive: refactor mode hunk handling, 2009-04-16),
we merged the interaction loops for mode changes and hunk staging.
This was fine at the time, because 0beee4c (git-add--interactive:
remove hunk coalescing, 2008-07-02) removed hunk coalescing.
However, in 7a26e65 (Revert "git-add--interactive: remove hunk
coalescing", 2009-05-16), we resurrected it. Since then, the code
would attempt in vain to merge mode changes with diff hunks,
corrupting both in the process.
We add a check to the coalescing loop to ensure it only looks at diff
hunks, thus skipping mode changes.
Noticed-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When trying to stage changes to file which has also pending `chmod +x`,
`git add -p` produces lots of 'Use of uninitialized value ...' warnings
and fails to do the job:
$ echo content >> file
$ chmod +x file
$ git add -p
diff --git a/file b/file
index e69de29..d95f3ad
--- a/file
+++ b/file
old mode 100644
new mode 100755
Stage mode change [y,n,q,a,d,/,j,J,g,?]? y
@@ -0,0 +1 @@
+content
Stage this hunk [y,n,q,a,d,/,K,g,e,?]? y
Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776.
Use of uninitialized value $ofs in numeric le (<=) at .../git-add--interactive line 806.
Use of uninitialized value $o0_ofs in concatenation (.) or string at .../git-add--interactive line 830.
Use of uninitialized value $n0_ofs in concatenation (.) or string at .../git-add--interactive line 830.
Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776.
fatal: corrupt patch at line 5
diff --git a/file b/file
index e69de29..d95f3ad
--- a/file
+++ b/file
@@ -,0 + @@
+content
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Instead of a cleartext password, the CVS pserver expects a scrambled one
in the authentication request. With this patch it is possible to import
CVS repositories only accessible via pserver and user/password.
Signed-off-by: Dirk Hoerner <dirker@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Reduce size of git-favicon.png using a combination of optipng and
pngout. From 164 bytes to 115 bytes (30% reduction). Also reduce
git-logo.png's size by one byte using advcomp.
Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some compilers produce errors when arithmetic is attempted on pointers to
void. We want computations done on byte addresses, so cast them to char *
to work them around.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* 'jn/gitweb-blame' (early part):
gitweb: Use light/dark for class names also in 'blame' view
gitweb: Add author initials in 'blame' view, a la "git gui blame"
gitweb: Mark commits with no "previous" in 'blame' view
gitweb: Use "previous" header of git-blame -p in 'blame' view
gitweb: Mark boundary commits in 'blame' view
gitweb: Make .error style generic
In addition to X86, PowerPC and S390 are capable of unaligned memory
accesses.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We only accepted either SHA1s or heads/tags that have been read. This
meant the user could not, e.g., enter HEAD to go back to the current
commit.
This adds code to call out to git rev-parse --verify if all other
methods of interpreting the string the user entered fail.
(git-rev-parse alone is not enough as we really want a single
revision.)
The error paths change slighly, because we now know from the rev-parse
invocation whether the expression was valid at all. The previous
"unknown" path is now only triggered if the revision does exist, but
is not in the current view display.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
ee66e08 (gitk: Make updates go faster, 2008-05-09) implemented an
optimized mode where gitk parses the arguments with rev-parse, and
manually reads history in chunks. As mentioned in the commit message,
symmetric differences are a problem there:
One wrinkle is that we have to turn symmetric diff arguments (of the
form a...b) back into symmetric diff form so that --left-right still
works, as git rev parse turns a...b into a b ^merge_base(a,b).
However, git-rev-parse returns a...b in the swapped order
b a ^merge_base(a,b)
This has been the case since at least 1f8115b (the state of master at
the time of the abovementioned ee66e08; Merge branch 'maint',
2008-05-08). So gitk flipped the sides of symmetric differences
whenever it was in optimized mode.
Fix this by swapping the sides of the reconstruction code.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
In repositories with lots of remotes, looking at the history in gitk
can be borderline insane with all the red labels for remote refs.
Introduce a new option in the preferences that makes gitk ignore
remote refs entirely, so they don't take up space in the display.
Wished-for-by: Thell Fowler <tbfowler4@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Commit 39ee47e (Clean up file encoding code and add enable/disable option,
2008-10-15) rewrote the attribute lookup functions gitattr and
cache_gitattr, but in the process hard-coded the attribute name "encoding"
instead of using the functions' parameters. This fixes it.
This is not a serious regression because currently all callers look only
for "encoding".
Further note that this fix assumes that future callers will not pass an
attribute name that contains regex special characters.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
It may be convenient for some users to store svn remote tracking
branches outside of the refs/remotes/ heirarchy.
To accomplish this feat, this patch includes the entire path to
the ref in $r->{'refname'} in &read_all_remotes and tries to change
references to this entry so the new value makes sense.
[ew: fixed backwards compatibility, long lines]
Signed-off-by: Adam Brewster <adambrewster@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Since "trunk" is a convention for the main development branch in
the SVN world, try to make that the master branch upon initial
checkout if it exists. This is probably less surprising based
on user requests.
t9135 was the only test which relied on the previous behavior
and thus needed to be modified.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
* maint:
push: point to 'git pull' and 'git push --force' in case of non-fast forward
Documentation: add: <filepattern>... is optional
Change mentions of "git programs" to "git commands"
Documentation: merge: one <remote> is required
help.c: give correct structure's size to memset()
* maint-1.6.3:
Change mentions of "git programs" to "git commands"
Documentation: merge: one <remote> is required
help.c: give correct structure's size to memset()
'git push' failing because of non-fast forward is a very common situation,
and a beginner does not necessarily understand "fast forward" immediately.
Add a new section to the git-push documentation and refer them to it.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
<filepattern>... is optional (e.g. when the --all or --update
options are used) so use square brackets in the synopsis.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>