Merge branch 'maint'
* maint:
t3301-notes: insert a shbang line in ./fake_editor.sh
* maint:
t3301-notes: insert a shbang line in ./fake_editor.sh
Merge branch 'maint-1.6.6' into maint
* maint-1.6.6:
t3301-notes: insert a shbang line in ./fake_editor.sh
* maint-1.6.6:
t3301-notes: insert a shbang line in ./fake_editor.sh
Windows: redirect f[re]open("/dev/null") to f[re]open("nul")
On Windows, the equivalent of "/dev/null" is "nul". This implements
compatibility wrappers around fopen() and freopen() that check for this
particular file name.
The new tests exercise code paths where this is relevant.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
On Windows, the equivalent of "/dev/null" is "nul". This implements
compatibility wrappers around fopen() and freopen() that check for this
particular file name.
The new tests exercise code paths where this is relevant.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t3301-notes: insert a shbang line in ./fake_editor.sh
This is required on Windows because git-notes is now a built-in
rather than a shell script.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This is required on Windows because git-notes is now a built-in
rather than a shell script.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'maint'
* maint:
commit: quote the user name in the example
* maint:
commit: quote the user name in the example
commit: quote the user name in the example
If the user runs
git config --global user.name Your Name
as suggested, user.name will be set to "Your". With this patch, the
suggested command will be
git config --global user.name "Your Name"
which will set user.name to "Your Name" and hopefully help users avoid
the former mistake.
Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If the user runs
git config --global user.name Your Name
as suggested, user.name will be set to "Your". With this patch, the
suggested command will be
git config --global user.name "Your Name"
which will set user.name to "Your Name" and hopefully help users avoid
the former mistake.
Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'ml/maint-grep-doc' into maint
* ml/maint-grep-doc:
grep documentation: clarify what files match
* ml/maint-grep-doc:
grep documentation: clarify what files match
Merge branch 'maint'
* maint:
am: remove rebase-apply directory before gc
rerere: fix memory leak if rerere images can't be read
Documentation: mention conflict marker size argument (%L) for merge driver
* maint:
am: remove rebase-apply directory before gc
rerere: fix memory leak if rerere images can't be read
Documentation: mention conflict marker size argument (%L) for merge driver
am: remove rebase-apply directory before gc
When git am does an automatic gc it doesn't clean up the rebase-apply
directory until after this has finished. This means that if the user
aborts the gc then future am or rebase operations will report that an
existing operation is in progress, which is undesirable and confusing.
Reported by Mark Brown <broonie@debian.org> through
http://bugs.debian.org/570966
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When git am does an automatic gc it doesn't clean up the rebase-apply
directory until after this has finished. This means that if the user
aborts the gc then future am or rebase operations will report that an
existing operation is in progress, which is undesirable and confusing.
Reported by Mark Brown <broonie@debian.org> through
http://bugs.debian.org/570966
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
rerere: fix memory leak if rerere images can't be read
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation: mention conflict marker size argument (%L) for merge driver
23a64c9e (conflict-marker-size: new attribute, 2010-01-16) introduced the
new attribute and also pass the conflict marker size as %L to merge driver
commands. This documents the substitution.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
23a64c9e (conflict-marker-size: new attribute, 2010-01-16) introduced the
new attribute and also pass the conflict marker size as %L to merge driver
commands. This documents the substitution.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'ml/maint-grep-doc'
* ml/maint-grep-doc:
grep documentation: clarify what files match
* ml/maint-grep-doc:
grep documentation: clarify what files match
Merge branch 'tc/maint-transport-ls-remote-with-void'
* tc/maint-transport-ls-remote-with-void:
transport: add got_remote_refs flag
* tc/maint-transport-ls-remote-with-void:
transport: add got_remote_refs flag
Merge branch 'hm/maint-imap-send-crlf'
* hm/maint-imap-send-crlf:
git-imap-send: Convert LF to CRLF before storing patch to draft box
* hm/maint-imap-send-crlf:
git-imap-send: Convert LF to CRLF before storing patch to draft box
Merge branch 'sp/push-sideband'
* sp/push-sideband:
receive-pack: Send internal errors over side-band #2
t5401: Use a bare repository for the remote peer
receive-pack: Send hook output over side band #2
receive-pack: Wrap status reports inside side-band-64k
receive-pack: Refactor how capabilities are shown to the client
send-pack: demultiplex a sideband stream with status data
run-command: support custom fd-set in async
run-command: Allow stderr to be a caller supplied pipe
* sp/push-sideband:
receive-pack: Send internal errors over side-band #2
t5401: Use a bare repository for the remote peer
receive-pack: Send hook output over side band #2
receive-pack: Wrap status reports inside side-band-64k
receive-pack: Refactor how capabilities are shown to the client
send-pack: demultiplex a sideband stream with status data
run-command: support custom fd-set in async
run-command: Allow stderr to be a caller supplied pipe
Merge branch 'jc/checkout-detached'
* jc/checkout-detached:
Reword "detached HEAD" notification
* jc/checkout-detached:
Reword "detached HEAD" notification
Merge branch 'jc/maint-fix-test-perm'
* jc/maint-fix-test-perm:
lib-patch-mode.sh: Fix permission
t6000lib: Fix permission
* jc/maint-fix-test-perm:
lib-patch-mode.sh: Fix permission
t6000lib: Fix permission
Merge branch 'jn/makefile-script-lib'
* jn/makefile-script-lib:
Do not install shell libraries executable
* jn/makefile-script-lib:
Do not install shell libraries executable
Merge branch 'mv/request-pull-modernize'
* mv/request-pull-modernize:
request-pull: avoid mentioning that the start point is a single commit
* mv/request-pull-modernize:
request-pull: avoid mentioning that the start point is a single commit
Merge branch 'maint'
* maint:
git-p4: fix bug in symlink handling
t1450: fix testcases that were wrongly expecting failure
Documentation: Fix indentation problem in git-commit(1)
* maint:
git-p4: fix bug in symlink handling
t1450: fix testcases that were wrongly expecting failure
Documentation: Fix indentation problem in git-commit(1)
git-p4: fix bug in symlink handling
Fix inadvertent breakage from b932705 (git-p4: stream from perforce to
speed up clones, 2009-07-30) in the code that strips the trailing '\n'
from p4 print on a symlink. (In practice, contents is of the form
['target\n', ''].)
Signed-off-by: Evan Powers <evan.powers@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Fix inadvertent breakage from b932705 (git-p4: stream from perforce to
speed up clones, 2009-07-30) in the code that strips the trailing '\n'
from p4 print on a symlink. (In practice, contents is of the form
['target\n', ''].)
Signed-off-by: Evan Powers <evan.powers@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t1450: fix testcases that were wrongly expecting failure
Almost exactly a year ago in 02a6552 (Test fsck a bit harder), I
introduced two testcases that were expecting failure.
However, the only bug was that the testcases wrote *blobs* because I
forgot to pass -t tag to hash-object. Fix this, and then adjust the
rest of the test to properly check the result.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Almost exactly a year ago in 02a6552 (Test fsck a bit harder), I
introduced two testcases that were expecting failure.
However, the only bug was that the testcases wrote *blobs* because I
forgot to pass -t tag to hash-object. Fix this, and then adjust the
rest of the test to properly check the result.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation: Fix indentation problem in git-commit(1)
Ever since the "See linkgit:git-config[1]..." paragraph was added to the
description for --untracked-files (d6293d1), the paragraphs for the
following options were indented at the same level as the "See
linkgit:git-config[1]" paragraph. This problem showed up in the
manpages, but not in the HTML documentation.
While this does fix the alignment of the options following
--untracked-files in the manpage, the "See linkgit..." portion of the
description does not retain its previous indentation level in the
manpages, or HTML documentation.
Signed-off-by: Jacob Helwig <jacob.helwig@gmail.com>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ever since the "See linkgit:git-config[1]..." paragraph was added to the
description for --untracked-files (d6293d1), the paragraphs for the
following options were indented at the same level as the "See
linkgit:git-config[1]" paragraph. This problem showed up in the
manpages, but not in the HTML documentation.
While this does fix the alignment of the options following
--untracked-files in the manpage, the "See linkgit..." portion of the
description does not retain its previous indentation level in the
manpages, or HTML documentation.
Signed-off-by: Jacob Helwig <jacob.helwig@gmail.com>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'maint'
* maint:
rm: fix bug in recursive subdirectory removal
Documentation: describe --thin more accurately
* maint:
rm: fix bug in recursive subdirectory removal
Documentation: describe --thin more accurately
Merge branch 'jk/maint-rmdir-fix' into maint
* jk/maint-rmdir-fix:
rm: fix bug in recursive subdirectory removal
* jk/maint-rmdir-fix:
rm: fix bug in recursive subdirectory removal
rm: fix bug in recursive subdirectory removal
If we remove a path in a/deep/subdirectory, we should try to
remove as many trailing components as possible (i.e.,
subdirectory, then deep, then a). However, the test for the
return value of rmdir was reversed, so we only ever deleted
at most one level.
The fix is in remove_path, so "apply" and "merge-recursive"
also are fixed.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If we remove a path in a/deep/subdirectory, we should try to
remove as many trailing components as possible (i.e.,
subdirectory, then deep, then a). However, the test for the
return value of rmdir was reversed, so we only ever deleted
at most one level.
The fix is in remove_path, so "apply" and "merge-recursive"
also are fixed.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation: describe --thin more accurately
The description for --thin was misleading and downright wrong. Correct
it with some inspiration from the description of index-pack's --fix-thin
and some background information from Nicolas Pitre <nico@fluxnic.net>.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The description for --thin was misleading and downright wrong. Correct
it with some inspiration from the description of index-pack's --fix-thin
and some background information from Nicolas Pitre <nico@fluxnic.net>.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'maint'
* maint:
docs: don't talk about $GIT_DIR/refs/ everywhere
* maint:
docs: don't talk about $GIT_DIR/refs/ everywhere
docs: don't talk about $GIT_DIR/refs/ everywhere
It is misleading to say that we pull refs from $GIT_DIR/refs/*, because we
may also consult the packed refs mechanism. These days we tend to treat
the "refs hierarchy" as more of an abstract namespace that happens to be
represented as $GIT_DIR/refs. At best, this is a minor inaccuracy, but at
worst it can confuse users who then look in $GIT_DIR/refs and find that it
is missing some of the refs they expected to see.
This patch drops most uses of "$GIT_DIR/refs/*", changing them into just
"refs/*", under the assumption that users can handle the concept of an
abstract refs namespace. There are a few things to note:
- most cases just dropped the $GIT_DIR/ portion. But for cases where
that left _just_ the word "refs", I changed it to "refs/" to help
indicate that it was a hierarchy. I didn't do the same for longer
paths (e.g., "refs/heads" remained, instead of becoming
"refs/heads/").
- in some cases, no change was made, as the text was explicitly about
unpacked refs (e.g., the discussion in git-pack-refs).
- In some cases it made sense instead to note the existence of packed
refs (e.g., in check-ref-format and rev-parse).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It is misleading to say that we pull refs from $GIT_DIR/refs/*, because we
may also consult the packed refs mechanism. These days we tend to treat
the "refs hierarchy" as more of an abstract namespace that happens to be
represented as $GIT_DIR/refs. At best, this is a minor inaccuracy, but at
worst it can confuse users who then look in $GIT_DIR/refs and find that it
is missing some of the refs they expected to see.
This patch drops most uses of "$GIT_DIR/refs/*", changing them into just
"refs/*", under the assumption that users can handle the concept of an
abstract refs namespace. There are a few things to note:
- most cases just dropped the $GIT_DIR/ portion. But for cases where
that left _just_ the word "refs", I changed it to "refs/" to help
indicate that it was a hierarchy. I didn't do the same for longer
paths (e.g., "refs/heads" remained, instead of becoming
"refs/heads/").
- in some cases, no change was made, as the text was explicitly about
unpacked refs (e.g., the discussion in git-pack-refs).
- In some cases it made sense instead to note the existence of packed
refs (e.g., in check-ref-format and rev-parse).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'np/fast-import-idx-v2'
* np/fast-import-idx-v2:
fast-import: use the diff_delta() max_delta_size argument
fast-import: honor pack.indexversion and pack.packsizelimit config vars
fast-import: make default pack size unlimited
fast-import: use write_idx_file() instead of custom code
fast-import: use sha1write() for pack data
fast-import: start using struct pack_idx_entry
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* np/fast-import-idx-v2:
fast-import: use the diff_delta() max_delta_size argument
fast-import: honor pack.indexversion and pack.packsizelimit config vars
fast-import: make default pack size unlimited
fast-import: use write_idx_file() instead of custom code
fast-import: use sha1write() for pack data
fast-import: start using struct pack_idx_entry
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Update draft release notes to 1.7.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'maint'
* maint:
Update 1.7.0.1 release notes
* maint:
Update 1.7.0.1 release notes
Update 1.7.0.1 release notes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jk/cherry-pick-reword' into maint
* jk/cherry-pick-reword:
cherry-pick: prettify the advice message
cherry-pick: show commit name instead of sha1
cherry-pick: format help message as strbuf
cherry-pick: refactor commit parsing code
cherry-pick: rewrap advice message
* jk/cherry-pick-reword:
cherry-pick: prettify the advice message
cherry-pick: show commit name instead of sha1
cherry-pick: format help message as strbuf
cherry-pick: refactor commit parsing code
cherry-pick: rewrap advice message
Merge branch 'jk/grep-double-dash' into maint
* jk/grep-double-dash:
accept "git grep -- pattern"
* jk/grep-double-dash:
accept "git grep -- pattern"
Merge branch 'jc/typo' into maint
* jc/typo:
Typofixes outside documentation area
* jc/typo:
Typofixes outside documentation area
gitweb: Protect escaping functions against calling on undef
This is a bit of future-proofing esc_html and friends: when called
with undefined value they would now would return undef... which would
probably mean that error would still occur, but closer to the source
of problem.
This means that we can safely use
esc_html(shift) || "Internal Server Error"
in die_error() instead of
esc_html(shift || "Internal Server Error")
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This is a bit of future-proofing esc_html and friends: when called
with undefined value they would now would return undef... which would
probably mean that error would still occur, but closer to the source
of problem.
This means that we can safely use
esc_html(shift) || "Internal Server Error"
in die_error() instead of
esc_html(shift || "Internal Server Error")
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb: esc_html (short) error message in die_error
The error message (second argument to die_error) is meant to be short,
one-line text description of given error. A few callers call
die_error with error message containing unescaped user supplied data
($hash, $file_name). Instead of forcing callers to escape data,
simply call esc_html on the parameter.
Note that optional third parameter, which contains detailed error
description, is meant to be HTML formatted, and therefore should be
not escaped.
While at it update esc_html synopsis/usage, and bring default error
description to read 'Internal Server Error' (titlecased).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The error message (second argument to die_error) is meant to be short,
one-line text description of given error. A few callers call
die_error with error message containing unescaped user supplied data
($hash, $file_name). Instead of forcing callers to escape data,
simply call esc_html on the parameter.
Note that optional third parameter, which contains detailed error
description, is meant to be HTML formatted, and therefore should be
not escaped.
While at it update esc_html synopsis/usage, and bring default error
description to read 'Internal Server Error' (titlecased).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import: use the diff_delta() max_delta_size argument
This let diff_delta() abort early if it is going to bust the given
size limit. Also, only objects larger than 20 bytes are considered
as objects smaller than that are most certainly going to produce
larger deltas than the original object due to the additional headers.
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This let diff_delta() abort early if it is going to bust the given
size limit. Also, only objects larger than 20 bytes are considered
as objects smaller than that are most certainly going to produce
larger deltas than the original object due to the additional headers.
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import: honor pack.indexversion and pack.packsizelimit config vars
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import: make default pack size unlimited
Now that fast-import is creating packs with index version 2, there is
no point limiting the pack size by default. A pack split will still
happen if off_t is not sufficiently large to hold large offsets.
While updating the doc, let's remove the "packfiles fit on CDs"
suggestion. Pack files created by fast-import are still suboptimal and
a 'git repack -a -f -d' or even 'git gc --aggressive' would be a pretty
good idea before considering storage on CDs.
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Now that fast-import is creating packs with index version 2, there is
no point limiting the pack size by default. A pack split will still
happen if off_t is not sufficiently large to hold large offsets.
While updating the doc, let's remove the "packfiles fit on CDs"
suggestion. Pack files created by fast-import are still suboptimal and
a 'git repack -a -f -d' or even 'git gc --aggressive' would be a pretty
good idea before considering storage on CDs.
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import: use write_idx_file() instead of custom code
This allows for the creation of pack index version 2 with its object
CRC and the possibility for a pack to be larger than 4 GB.
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This allows for the creation of pack index version 2 with its object
CRC and the possibility for a pack to be larger than 4 GB.
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import: use sha1write() for pack data
This is in preparation for using write_idx_file(). Also, by using
sha1write() we get some buffering to reduces the number of write
syscalls, and the written data is SHA1 summed which allows for the extra
data integrity validation check performed in fixup_pack_header_footer()
(details on this in commit abeb40e5aa).
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This is in preparation for using write_idx_file(). Also, by using
sha1write() we get some buffering to reduces the number of write
syscalls, and the written data is SHA1 summed which allows for the extra
data integrity validation check performed in fixup_pack_header_footer()
(details on this in commit abeb40e5aa).
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import: start using struct pack_idx_entry
This is in preparation for using write_idx_file().
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This is in preparation for using write_idx_file().
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep documentation: clarify what files match
Clarify that git-grep(1) searches only tracked files, and that each
<pathspec> is a pathspec, as in any other ordinary git commands.
Add an example to show a simple use case for searching all .c and .h
files in the current directory and below.
Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Clarify that git-grep(1) searches only tracked files, and that each
<pathspec> is a pathspec, as in any other ordinary git commands.
Add an example to show a simple use case for searching all .c and .h
files in the current directory and below.
Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jc/typo'
* jc/typo:
Typofixes outside documentation area
* jc/typo:
Typofixes outside documentation area
Merge branch 'maint'
* maint:
Prepare 1.7.0.1 release notes
Fix use of mutex in threaded grep
dwim_ref: fix dangling symref warning
stash pop: remove 'apply' options during 'drop' invocation
diff: make sure --output=/bad/path is caught
Remove hyphen from "git-command" in two error messages
* maint:
Prepare 1.7.0.1 release notes
Fix use of mutex in threaded grep
dwim_ref: fix dangling symref warning
stash pop: remove 'apply' options during 'drop' invocation
diff: make sure --output=/bad/path is caught
Remove hyphen from "git-command" in two error messages
Prepare 1.7.0.1 release notes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jc/maint-grep-one-thread-mutex-fix' into maint
* jc/maint-grep-one-thread-mutex-fix:
Fix use of mutex in threaded grep
* jc/maint-grep-one-thread-mutex-fix:
Fix use of mutex in threaded grep
Fix use of mutex in threaded grep
The program can decide at runtime not to use threading even if the support
is compiled in. In such a case, mutexes are not necessary and left
uninitialized. But the code incorrectly tried to take and release the
read_sha1_mutex unconditionally.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Fredrik Kuivinen <frekui@gmail.com>
The program can decide at runtime not to use threading even if the support
is compiled in. In such a case, mutexes are not necessary and left
uninitialized. But the code incorrectly tried to take and release the
read_sha1_mutex unconditionally.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Fredrik Kuivinen <frekui@gmail.com>
Merge branch 'maint-1.6.6' into maint
* maint-1.6.6:
dwim_ref: fix dangling symref warning
stash pop: remove 'apply' options during 'drop' invocation
diff: make sure --output=/bad/path is caught
Remove hyphen from "git-command" in two error messages
* maint-1.6.6:
dwim_ref: fix dangling symref warning
stash pop: remove 'apply' options during 'drop' invocation
diff: make sure --output=/bad/path is caught
Remove hyphen from "git-command" in two error messages
Merge branch 'maint-1.6.5' into maint-1.6.6
* maint-1.6.5:
dwim_ref: fix dangling symref warning
stash pop: remove 'apply' options during 'drop' invocation
diff: make sure --output=/bad/path is caught
* maint-1.6.5:
dwim_ref: fix dangling symref warning
stash pop: remove 'apply' options during 'drop' invocation
diff: make sure --output=/bad/path is caught
transport: add got_remote_refs flag
transport_get_remote_refs() in tranport.c checks transport->remote_refs
to determine whether transport->get_refs_list() should be invoked. The
logic is "if it is NULL, we haven't run ls-remote to find out yet".
However, transport->remote_refs could still be NULL while cloning from
an empty repository. This causes get_refs_list() to be run unnecessarily.
Introduce a flag, transport->got_remote_refs, to more explicitly record
if we have run transport->get_refs_list() already.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport_get_remote_refs() in tranport.c checks transport->remote_refs
to determine whether transport->get_refs_list() should be invoked. The
logic is "if it is NULL, we haven't run ls-remote to find out yet".
However, transport->remote_refs could still be NULL while cloning from
an empty repository. This causes get_refs_list() to be run unnecessarily.
Introduce a flag, transport->got_remote_refs, to more explicitly record
if we have run transport->get_refs_list() already.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dwim_ref: fix dangling symref warning
If we encounter a symref that is dangling, in most cases we will warn
about it. The one exception is a dangling HEAD, as that indicates a
branch yet to be born.
However, the check in dwim_ref was not quite right. If we were fed
something like "HEAD^0" we would try to resolve "HEAD", see that it is
dangling, and then check whether the _original_ string we got was
"HEAD" (which it wasn't in this case). And that makes no sense; the
dangling thing we found was not "HEAD^0" but rather "HEAD".
Fixing this squelches a scary warning from "submodule summary HEAD" (and
consequently "git status" with status.submodulesummary set) in an empty
repo, as the submodule script calls "git rev-parse -q --verify HEAD^0".
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If we encounter a symref that is dangling, in most cases we will warn
about it. The one exception is a dangling HEAD, as that indicates a
branch yet to be born.
However, the check in dwim_ref was not quite right. If we were fed
something like "HEAD^0" we would try to resolve "HEAD", see that it is
dangling, and then check whether the _original_ string we got was
"HEAD" (which it wasn't in this case). And that makes no sense; the
dangling thing we found was not "HEAD^0" but rather "HEAD".
Fixing this squelches a scary warning from "submodule summary HEAD" (and
consequently "git status" with status.submodulesummary set) in an empty
repo, as the submodule script calls "git rev-parse -q --verify HEAD^0".
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
stash pop: remove 'apply' options during 'drop' invocation
The 'git stash pop' option parsing used to remove the first argument
in --index mode. At the time this was implemented, this first
argument was always --index. However, since the invention of the -q
option in fcdd0e9 (stash: teach quiet option, 2009-06-17) you can
cause an internal invocation of
git stash drop --index
by running
git stash pop -q --index
which then of course fails because drop doesn't know --index.
To handle this, instead let 'git stash apply' decide what the future
argument to 'drop' should be.
Warning: this means that 'git stash apply' must parse all options that
'drop' can take, and deal with them in the same way. This is
currently true for its only option -q.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The 'git stash pop' option parsing used to remove the first argument
in --index mode. At the time this was implemented, this first
argument was always --index. However, since the invention of the -q
option in fcdd0e9 (stash: teach quiet option, 2009-06-17) you can
cause an internal invocation of
git stash drop --index
by running
git stash pop -q --index
which then of course fails because drop doesn't know --index.
To handle this, instead let 'git stash apply' decide what the future
argument to 'drop' should be.
Warning: this means that 'git stash apply' must parse all options that
'drop' can take, and deal with them in the same way. This is
currently true for its only option -q.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff: make sure --output=/bad/path is caught
The return value from fopen wasn't being checked.
Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The return value from fopen wasn't being checked.
Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Remove hyphen from "git-command" in two error messages
Signed-off-by: Pete Harlan <pgit@pcharlan.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Pete Harlan <pgit@pcharlan.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'maint'
* maint:
fix minor memory leak in get_tree_entry()
* maint:
fix minor memory leak in get_tree_entry()
Merge branch 'maint-1.6.6' into maint
* maint-1.6.6:
fix minor memory leak in get_tree_entry()
* maint-1.6.6:
fix minor memory leak in get_tree_entry()
fix minor memory leak in get_tree_entry()
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'maint'
* maint:
Start 1.7.0 maintenance track
Conflicts:
RelNotes
* maint:
Start 1.7.0 maintenance track
Conflicts:
RelNotes
Merge branch 'rs/git-dir-cleanup'
* rs/git-dir-cleanup:
Resurrect "git grep --no-index"
setenv(GIT_DIR) clean-up
Conflicts:
builtin-grep.c
t/t7002-grep.sh
* rs/git-dir-cleanup:
Resurrect "git grep --no-index"
setenv(GIT_DIR) clean-up
Conflicts:
builtin-grep.c
t/t7002-grep.sh
Merge branch 'jk/cherry-pick-reword'
* jk/cherry-pick-reword:
cherry-pick: prettify the advice message
cherry-pick: show commit name instead of sha1
cherry-pick: format help message as strbuf
cherry-pick: refactor commit parsing code
cherry-pick: rewrap advice message
* jk/cherry-pick-reword:
cherry-pick: prettify the advice message
cherry-pick: show commit name instead of sha1
cherry-pick: format help message as strbuf
cherry-pick: refactor commit parsing code
cherry-pick: rewrap advice message
Merge branch 'jk/grep-double-dash'
* jk/grep-double-dash:
accept "git grep -- pattern"
* jk/grep-double-dash:
accept "git grep -- pattern"
Resurrect "git grep --no-index"
This reverts commit 3c8f6c8 (Revert 30816237 and 7e62265, 2010-02-05) as
the issue has been sorted out.
This reverts commit 3c8f6c8 (Revert 30816237 and 7e62265, 2010-02-05) as
the issue has been sorted out.
Start 1.7.0 maintenance track
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Start 1.7.1 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Git 1.7.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'maint'
* maint:
Fix typo in 1.6.6.2 release notes
Re-fix check-ref-format documentation mark-up
* maint:
Fix typo in 1.6.6.2 release notes
Re-fix check-ref-format documentation mark-up
Fix typo in 1.6.6.2 release notes
Of course, these are changes since 1.6.6.1; changes since 1.6.6.2
would have been nil.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Of course, these are changes since 1.6.6.1; changes since 1.6.6.2
would have been nil.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Re-fix check-ref-format documentation mark-up
It is not double-backslash we forbid; backslashes are forbidden since
a4c2e699 (Disallow '\' in ref names, 2009-05-08)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It is not double-backslash we forbid; backslashes are forbidden since
a4c2e699 (Disallow '\' in ref names, 2009-05-08)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-imap-send: Convert LF to CRLF before storing patch to draft box
When storing a message over IMAP (RFC 3501 6.3.11), the message should be
in the format of an RFC 2822 message; most notably, CRLF must be used as
a line terminator.
Convert "\n" line endings in the payload to CRLF before feeding it to
IMAP APPEND command.
Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When storing a message over IMAP (RFC 3501 6.3.11), the message should be
in the format of an RFC 2822 message; most notably, CRLF must be used as
a line terminator.
Convert "\n" line endings in the payload to CRLF before feeding it to
IMAP APPEND command.
Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive documentation: attributes are taken from the tree by default
By default, git-archive takes attributes from the tree being archived.
People however often wonder why their attempts to affect the way how the
command archives their tree by changing .gitattributes in their work tree
fail.
Add a bit of explanatory note to tell them how to achieve what they want
to do.
Noticed-by: Francois Marier
Signed-off-by: Junio C Hamano <gitster@pobox.com>
By default, git-archive takes attributes from the tree being archived.
People however often wonder why their attempts to affect the way how the
command archives their tree by changing .gitattributes in their work tree
fail.
Add a bit of explanatory note to tell them how to achieve what they want
to do.
Noticed-by: Francois Marier
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation: minor fixes to RelNotes-1.7.0
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bash: support 'git am's new '--continue' option
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'maint'
* maint:
filter-branch: Fix error message for --prune-empty --commit-filter
* maint:
filter-branch: Fix error message for --prune-empty --commit-filter
filter-branch: Fix error message for --prune-empty --commit-filter
Running filter-branch with --prune-empty and --commit-filter reports:
"Cannot set --prune-empty and --filter-commit at the same time".
Change it to use the correct option name: --commit-filter
Signed-off-by: Jacob Helwig <jacob.helwig@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Running filter-branch with --prune-empty and --commit-filter reports:
"Cannot set --prune-empty and --filter-commit at the same time".
Change it to use the correct option name: --commit-filter
Signed-off-by: Jacob Helwig <jacob.helwig@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cherry-pick: prettify the advice message
It's hard to see the "how to commit" part of this message,
which users may want to cut and paste. On top of that,
having it in paragraph form means that a really long commit
name may cause ugly wrapping. Let's make it prettier, like:
Automatic cherry-pick failed. After resolving the conflicts,
mark the corrected paths with 'git add <paths>' or 'git rm <paths>'
and commit the result with:
git commit -c HEAD~23
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It's hard to see the "how to commit" part of this message,
which users may want to cut and paste. On top of that,
having it in paragraph form means that a really long commit
name may cause ugly wrapping. Let's make it prettier, like:
Automatic cherry-pick failed. After resolving the conflicts,
mark the corrected paths with 'git add <paths>' or 'git rm <paths>'
and commit the result with:
git commit -c HEAD~23
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cherry-pick: show commit name instead of sha1
When we have a conflict, we advise the user to do:
git commit -c $sha1
This works fine, but is unnecessarily confusing and annoying
for the user to type, when:
git commit -c $the_thing_you_called_cherry_pick_with
works just as well.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When we have a conflict, we advise the user to do:
git commit -c $sha1
This works fine, but is unnecessarily confusing and annoying
for the user to type, when:
git commit -c $the_thing_you_called_cherry_pick_with
works just as well.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cherry-pick: format help message as strbuf
This gets rid of the fixed-size buffer and an unchecked
sprintf. That sprintf is actually OK as the only
variable-sized thing put in it is an abbreviated sha1, which
is bounded at 40 characters. However, the next patch will
change that to something unbounded.
Note that this function now returns an allocated buffer
instead of a static one; however, it doesn't matter as the
only caller exits immediately.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This gets rid of the fixed-size buffer and an unchecked
sprintf. That sprintf is actually OK as the only
variable-sized thing put in it is an abbreviated sha1, which
is bounded at 40 characters. However, the next patch will
change that to something unbounded.
Note that this function now returns an allocated buffer
instead of a static one; however, it doesn't matter as the
only caller exits immediately.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cherry-pick: refactor commit parsing code
These lines are really just lookup_commit_reference
re-implemented.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
These lines are really just lookup_commit_reference
re-implemented.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cherry-pick: rewrap advice message
The current message overflows on an 80-character terminal.
While we're at it, fix the spelling of 'committing'.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The current message overflows on an 80-character terminal.
While we're at it, fix the spelling of 'committing'.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
am: switch --resolved to --continue
Rebase calls this same function "--continue", which means
users may be trained to type it. There is no reason to
deprecate --resolved (or -r), so we will keep it as a
synonym.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Rebase calls this same function "--continue", which means
users may be trained to type it. There is no reason to
deprecate --resolved (or -r), so we will keep it as a
synonym.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Update draft release notes to 1.7.0 one more time
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sync with 1.6.6.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Git 1.6.6.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'maint-1.6.5' into maint
* maint-1.6.5:
t8003: check exit code of command and error message separately
* maint-1.6.5:
t8003: check exit code of command and error message separately
t8003: check exit code of command and error message separately
Shell reports exit status only from the most downstream command
in a pipeline. In these tests, we want to make sure that the
command fails in a controlled way, and produces a correct error
message.
This issue was known by Jay who submitted the patch, and also was
pointed out by Hannes during the review process, but I forgot to
fix it up before applying. Sorry about that.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Shell reports exit status only from the most downstream command
in a pipeline. In these tests, we want to make sure that the
command fails in a controlled way, and produces a correct error
message.
This issue was known by Jay who submitted the patch, and also was
pointed out by Hannes during the review process, but I forgot to
fix it up before applying. Sorry about that.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'sp/maint-fast-import-large-blob' into maint
* sp/maint-fast-import-large-blob:
fast-import: Stream very large blobs directly to pack
* sp/maint-fast-import-large-blob:
fast-import: Stream very large blobs directly to pack
Merge branch 'gp/maint-cvsserver' into maint
* gp/maint-cvsserver:
git-cvsserver: allow regex metacharacters in CVSROOT
* gp/maint-cvsserver:
git-cvsserver: allow regex metacharacters in CVSROOT
Merge branch 'jc/maint-reflog-bad-timestamp' into maint
* jc/maint-reflog-bad-timestamp:
t0101: use a fixed timestamp when searching in the reflog
Update @{bogus.timestamp} fix not to die()
approxidate_careful() reports errorneous date string
* jc/maint-reflog-bad-timestamp:
t0101: use a fixed timestamp when searching in the reflog
Update @{bogus.timestamp} fix not to die()
approxidate_careful() reports errorneous date string
Merge branch 'il/maint-xmallocz' into maint
* il/maint-xmallocz:
Fix integer overflow in unpack_compressed_entry()
Fix integer overflow in unpack_sha1_rest()
Fix integer overflow in patch_delta()
Add xmallocz()
* il/maint-xmallocz:
Fix integer overflow in unpack_compressed_entry()
Fix integer overflow in unpack_sha1_rest()
Fix integer overflow in patch_delta()
Add xmallocz()
Merge branch 'jh/maint-config-file-prefix' into maint
* jh/maint-config-file-prefix:
builtin-config: Fix crash when using "-f <relative path>" from non-root dir
* jh/maint-config-file-prefix:
builtin-config: Fix crash when using "-f <relative path>" from non-root dir
Merge branch 'nd/include-termios-for-osol' into maint
* nd/include-termios-for-osol:
Add missing #include to support TIOCGWINSZ on Solaris
* nd/include-termios-for-osol:
Add missing #include to support TIOCGWINSZ on Solaris
Merge branch 'jc/maint-1.6.1-checkout-m-custom-merge' into maint
* jc/maint-1.6.1-checkout-m-custom-merge:
checkout -m path: fix recreating conflicts
Conflicts:
t/t7201-co.sh
* jc/maint-1.6.1-checkout-m-custom-merge:
checkout -m path: fix recreating conflicts
Conflicts:
t/t7201-co.sh
Merge branch 'rs/maint-archive-match-pathspec' into maint
* rs/maint-archive-match-pathspec:
archive: complain about path specs that don't match anything
* rs/maint-archive-match-pathspec:
archive: complain about path specs that don't match anything
check-ref-format documentation: fix enumeration mark-up
The last item in the enumerated refname rule was mistakenly made into
a sub-item of the 7th one. It should be the 8th one in the list on its
own.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The last item in the enumerated refname rule was mistakenly made into
a sub-item of the 7th one. It should be the 8th one in the list on its
own.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation: quote braces in {upstream} notation
The lack of quoting made the entire line disappear.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The lack of quoting made the entire line disappear.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'sp/maint-push-sideband' into sp/push-sideband
* sp/maint-push-sideband:
receive-pack: Send internal errors over side-band #2
t5401: Use a bare repository for the remote peer
Conflicts:
builtin-receive-pack.c
t/t5401-update-hooks.sh
* sp/maint-push-sideband:
receive-pack: Send internal errors over side-band #2
t5401: Use a bare repository for the remote peer
Conflicts:
builtin-receive-pack.c
t/t5401-update-hooks.sh
receive-pack: Send internal errors over side-band #2
If the client has requested side-band-64k capability, send any
of the internal error or warning messages in the muxed side-band
stream using the same band as our hook output, band #2. By putting
everything in one stream we ensure all messages are processed by
the side-band demuxer, avoiding interleaving between our own stderr
and the side-band demuxer's stderr buffers.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If the client has requested side-band-64k capability, send any
of the internal error or warning messages in the muxed side-band
stream using the same band as our hook output, band #2. By putting
everything in one stream we ensure all messages are processed by
the side-band demuxer, avoiding interleaving between our own stderr
and the side-band demuxer's stderr buffers.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>