Re: [PATCH v4 0/1] receive-pack: optionally deny case clone refs

2014-06-15 Thread David Turner
On Fri, 2014-06-13 at 12:05 -0700, Ronnie Sahlberg wrote:
 Thinking about it more.
 
 I think we want to wait until the ref transaction API work is
 finished. The ref transactions API is in progress and it aims to add
 transactions for ref updates as a first step but then it aims to
 define a public API for all public ref functions. As part of that I
 will also develop support for pluggable ref backends. The first
 backend will be the current files based structure but I also will add
 an optional backend using a TDB database.

OK, in that case I'll shelve this patch for now (except that we'll
probably use it internally)  If for some reason pluggable ref backends
don't work out, we can always revive it.

Thanks to all for the reviews.  You can find the latest version at
https://github.com/dturner-tw/git/tree/case-ref .



--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] gitk: use mktemp -d to avoid predictable temporary directories

2014-06-15 Thread Pat Thoyts
David Aguilar dav...@gmail.com writes:

gitk uses a predictable .gitk-tmp.$PID pattern when generating
a temporary directory.

Use mktemp -d .gitk-tmp.XX to harden gitk against someone
seeding /tmp with files matching the pid pattern.

Signed-off-by: David Aguilar dav...@gmail.com
---
This issue was brought up during the first review of the previous patch
back in 2009.

http://thread.gmane.org/gmane.comp.version-control.git/132609/focus=132748

This is really [PATCH 2/2] and should be applied on top of my previous
gitk patch.

 gitk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gitk b/gitk
index 82293dd..dd2ff63 100755
--- a/gitk
+++ b/gitk
@@ -3502,7 +3502,8 @@ proc gitknewtmpdir {} {
   } else {
   set tmpdir $gitdir
   }
-  set gitktmpdir [file join $tmpdir [format .gitk-tmp.%s [pid]]]
+  set gitktmpformat [file join $tmpdir .gitk-tmp.XX]
+  set gitktmpdir [exec mktemp -d $gitktmpformat]
   if {[catch {file mkdir $gitktmpdir} err]} {
   error_popup [mc Error creating temporary directory %s: 
 $gitktmpdir] $err
   unset gitktmpdir

This is a problem on Windows where we will not have mktemp. In Tcl 8.6
the file command acquired a file tempfile command to help with this
kind of issue (https://www.tcl.tk/man/tcl8.6/TclCmd/file.htm#M39) but
for older versions we should probably stick with the existing pattern at
least on Windows.

-- 
Pat Thoytshttp://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] http-protocol.txt: Basic Auth is RFC 2617, not RFC 2616

2014-06-15 Thread Yi EungJun
Could you change the author to Yi EungJun eungjun...@navercorp.com
if you apply this patch?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] http: fix charset detection of extract_content_type()

2014-06-15 Thread Yi EungJun
Could you change the author to Yi EungJun eungjun...@navercorp.com
if you apply this patch?
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC] git-am: support any number of signatures

2014-06-15 Thread Michael S. Tsirkin
On Fri, Jun 13, 2014 at 10:32:09AM -0700, Junio C Hamano wrote:
 Michael S. Tsirkin m...@redhat.com writes:
 
  On Thu, Jun 12, 2014 at 12:07:03PM -0700, Junio C Hamano wrote:
  Michael S. Tsirkin m...@redhat.com writes:
  ...
   1.  new parameter am.signoff can be used any number
of times:
  
   [am]
signoff = Reviewed-by: Michael S. Tsirkin m...@redhat.com
signoff = Signed-off-by: Michael S. Tsirkin m...@redhat.com
  
if set all signatures are picked up when git am -s is used.
  
  How does this interact with the logic to avoid appending the same
  Signed-off-by: line as the last one the incoming message already
  has?
 
  Not handled if you have multiple signatures.
  That will have to be fixed.
  Do we only care about the last line?
 
  Signed-off-by: A
  Signed-off-by: B
 
  do we want to add
 
  Signed-off-by: A
 
  or would it be better to replace with
  Signed-off-by: B
  Signed-off-by: A
 
  ?
 
  Current git am will add A twice, I wonder if this is
  a feature or a bug.
 
 This is very much deliberate.
 
 Appending A after existing A and B is meant to record that the patch
 originated from A, passed thru B possibly with changes by B, came
 back to A who wants to assert that the result is still under DCO.
 
 The only case we can safely omit appending A's sign-off is when the
 last one in the chain is by A.  Imagine that you had a patch signed
 off by B, which A may have tweaked and forwarded under DCO with A's
 sign-off.  Such a patch would have sign-off chain B-A.
 
 Now A makes further changes to the patch and says the further
 change is also something I am authorized to release as open source
 with the -s option or some other way.  It would not change that A
 can contribute under DCO if we did not add an extra A after existing
 B-A sign-off chain in that case.

OK imagine we have signatures:
A
B

Now A wants to sign this patch.

I think there are two reasonable ways to behave:
1. What you describe above:
A
B
A

2. For things like Tested-by: tags, removing tag from
where it was and adding it at the bottom:

B
A


This probably calls for a separate feature:
maybe adding acks along with signoffs?
acks would be unique, re-adding ack removes it from
the message and adds at the bottom.

-- 
MST
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Is there a reason the credential cache server cowardly refuses to delete/reuse the socket file?

2014-06-15 Thread Jason Pyeron
Whenever my computer crashes, I am left with a socket file. On next git
invocation it tries to conenct to the file, but the daemon is not running so it
barfs until I delete the file.

jpyeron@black /projects/dcarr/saar
$ git push
fatal: unable to connect to cache daemon: No error
Username for xx
^C

jpyeron@black /projects/dcarr/saar
$ ls -al ~/.git-credential-cache/
total 1
drwx--+ 1 jpyeron Domain Users 0 Jun  9 14:09 .
drwxr-xr-x+ 1 jpyeron root 0 Jun  8 22:45 ..
srwxr-xr-x  1 jpyeron Domain Users 0 Jun  9 14:09 socket

jpyeron@black /projects/dcarr/saar
$ rm -f ~/.git-credential-cache/socket

jpyeron@black /projects/dcarr/saar
$ git push
Username for xx
Password for xxx
Counting objects: 27, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (14/14), 2.09 KiB, done.
Total 14 (delta 6), reused 0 (delta 0)
To x
   345112c..48909da  master - master

jpyeron@black /projects/dcarr/saar
$ git --version
git version 1.7.9

jpyeron@black /projects/dcarr/saar
$ cygcheck.exe -V
cygcheck (cygwin) 1.7.30
...

-Jason


--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Is there a reason the credential cache server cowardly refuses to delete/reuse the socket file?

2014-06-15 Thread Jeff King
On Sun, Jun 15, 2014 at 09:48:24AM -0400, Jason Pyeron wrote:

 Whenever my computer crashes, I am left with a socket file. On next git
 invocation it tries to conenct to the file, but the daemon is not running so 
 it
 barfs until I delete the file.

It's supposed to transparently handle this situation. The server always
runs unlink() before binding to clear it out. The client will spawn the
server when it tries to connect and gets either ENOENT or ECONNREFUSED.

But:

 jpyeron@black /projects/dcarr/saar
 $ git push
 fatal: unable to connect to cache daemon: No error

Apparently your errno is 0 after returning an error from
credential-cache.c:send_request?

Could this be a cygwin weirdness? I'd be interested to see the output
of:

  echo url=https://example.com |
  strace -f git credential-cache get

in such a case.

-Peff
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Is there a reason the credential cache server cowardly refuses to delete/reuse the socket file?

2014-06-15 Thread Jason Pyeron
 -Original Message-
 From: Jeff King  
 Sent: Sunday, June 15, 2014 10:08
 
 On Sun, Jun 15, 2014 at 09:48:24AM -0400, Jason Pyeron wrote:
 
  Whenever my computer crashes, I am left with a socket file. 
 On next git
  invocation it tries to conenct to the file, but the daemon 
 is not running so it
  barfs until I delete the file.
 
 It's supposed to transparently handle this situation. The 
 server always
 runs unlink() before binding to clear it out. The client will 
 spawn the
 server when it tries to connect and gets either ENOENT or 
 ECONNREFUSED.
 
 But:
 
  jpyeron@black /projects/dcarr/saar
  $ git push
  fatal: unable to connect to cache daemon: No error
 
 Apparently your errno is 0 after returning an error from
 credential-cache.c:send_request?
 
 Could this be a cygwin weirdness? I'd be interested to see the output
 of:
 
   echo url=https://example.com |
   strace -f git credential-cache get

It paused at:
snip/
   24  797029 [main] git 5112 fhandler_base::close: closing
'/cygdrive/c/home/public/Desktop/projects/dcarr/saar/.git/config' handle 0x2D4
   70  797099 [main] git 5112 close: 0 = close(3)
  899  797998 [main] git 5112 fhandler_pipe::create: name
\\.\pipe\cygwin-c5e39b7a9d22bafb-5112-pipe-0x1, size 65536, mode
PIPE_TYPE_MESSAGE
  316  798314 [main] git 5112 fhandler_pipe::create: pipe read handle 0x2C4
   27  798341 [main] git 5112 fhandler_pipe::create: CreateFile: name
\\.\pipe\cygwin-c5e39b7a9d22bafb-5112-pipe-0x1
   63  798404 [main] git 5112 fhandler_pipe::create: pipe write handle 0x2C0
   35  798439 [main] git 5112 build_fh_pc: fh 0x612ADE68, dev 00C6
   25  798464 [main] git 5112 build_fh_pc: fh 0x612B9B4C, dev 00C5
   24  798488 [main] git 5112 fhandler_base::set_flags: flags 0x1,
supplied_bin 0x0
   23  798511 [main] git 5112 fhandler_base::set_flags: O_TEXT/O_BINARY set in
flags 0x1
   22  798533 [main] git 5112 fhandler_base::set_flags: filemode set to binary
   22  798555 [main] git 5112 fhandler_base::init: created new fhandler_base for
handle 0x2C4, bin 1
   26  798581 [main] git 5112 fhandler_base::set_flags: flags 0x10001,
supplied_bin 0x0
   26  798607 [main] git 5112 fhandler_base::set_flags: O_TEXT/O_BINARY set in
flags 0x1
   22  798629 [main] git 5112 fhandler_base::set_flags: filemode set to binary
   23  798652 [main] git 5112 fhandler_base::init: created new fhandler_base for
handle 0x2C0, bin 1
   23  798675 [main] git 5112 fhandler_pipe::create: 0 = pipe([0x612ADE68,
0x612B9B4C], 65536, 0x1)
   26  798701 [main] git 5112 pipe: 0 = pipe([3, 4])
   28  798729 [main] git 5112 child_info::child_info: subproc_ready 0x2B4
   25  798754 [main] git 5112 fork: entering
  181  798935 [main] git 5112 sig_send: sendsig 0x350, pid 5112, signal -40,
its_me 1
   24  798959 [main] git 5112 sig_send: wakeup 0x2AC
   27  798986 [main] git 5112 sig_send: Waiting for pack.wakeup 0x2AC
6  798992 [sig] git 5112 wait_sig: signalling pack.wakeup 0x2AC
  280  799272 [main] git 5112 sig_send: returning 0x0 from sending signal -40
   39  799311 [main] git 5112 frok::parent: priority class 32
   86  799397 [main] git 5112 frok::parent: stack - bottom 0x23, top
0x207000, addr 0x3, guardsize 0x0
   25  799422 [main] git 5112 frok::parent: CreateProcessW
(C:\cygwin\bin\git.exe, C:\cygwin\bin\git.exe, 0, 0, 1, 0x420, 0, 0, 0x22A8FC,
0x22A8D0)
 2529  801951 [main] git 5112 frok::parent: forked pid 5796
  213  802164 [main] git 5112 child_info::sync: n 2, waiting for
subproc_ready(0x2B4) and child process(0x290)

Should I have changed example.com to something else and should I have run it
inside or outside of a git project directory?


--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[OT] List CC etiquette and my brain just do not seem to work

2014-06-15 Thread Jason Pyeron
rant
Why can the list set the reply to the list and if there is a sender whos email
is not on the list add them to the reply to header as well.

I forget too many times to fix the address lines, and I get beaten with a stick
at work when I use the reply all.
/rant

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Is there a reason the credential cache server cowardly refuses to delete/reuse the socket file?

2014-06-15 Thread Jason Pyeron
 -Original Message-
 From: Jeff King  
 Sent: Sunday, June 15, 2014 10:08
 
 On Sun, Jun 15, 2014 at 09:48:24AM -0400, Jason Pyeron wrote:
 
  Whenever my computer crashes, I am left with a socket file. 
 On next git
  invocation it tries to conenct to the file, but the daemon 
 is not running so it
  barfs until I delete the file.
 
 It's supposed to transparently handle this situation. The 
 server always
 runs unlink() before binding to clear it out. The client will 
 spawn the
 server when it tries to connect and gets either ENOENT or 
 ECONNREFUSED.
 
 But:
 
  jpyeron@black /projects/dcarr/saar
  $ git push
  fatal: unable to connect to cache daemon: No error
 
 Apparently your errno is 0 after returning an error from
 credential-cache.c:send_request?
 
 Could this be a cygwin weirdness? I'd be interested to see the output
 of:
 
   echo url=https://example.com |

   strace -f git credential-cache get

On cygwin things can git a bit weird, I changed it to the actual executable.

I marked the start of interest with lots of ***

jpyeron@black /projects/dcarr
$ echo url=https://example.com | strace -f
/usr/lib/git-core/git-credential-cache get
3   3 [main] git-credential-cache (4308)
**
  111 114 [main] git-credential-cache (4308) Program name:
C:\cygwin\lib\git-core\git-credential-cache.exe (windows pid 4308)
   53 167 [main] git-credential-cache (4308) OS version:   Windows NT-5.2
   50 217 [main] git-credential-cache (4308)
**
  138 355 [main] git-credential-cache (4308) sigprocmask: 0 = sigprocmask
(0, 0x0, 0x61276808)
  364 719 [main] git-credential-cache 4308 open_shared: name shared.5, n 5,
shared 0x60FF (wanted 0x60FF), h 0x368, *m 6
   68 787 [main] git-credential-cache 4308 user_heap_info::init: heap base
0x8000, heap top 0x8000, heap size 0x1800 (402653184)
   73 860 [main] git-credential-cache 4308 open_shared: name $$SID$$.1, n 1,
shared 0x60FE (wanted 0x60FE), h 0x36C, *m 6
   53 913 [main] git-credential-cache 4308 user_info::create: opening user
shared for '$$SID$$' at 0x60FE
   64 977 [main] git-credential-cache 4308 user_info::create: user shared
version AB1FCCE8
   611038 [main] git-credential-cache 4308 wow64_eval_expected_main_stack:
expected allocbase: 0x3, stackbase: 0x23
   681106 [main] git-credential-cache 4308 fhandler_pipe::create: name
\\.\pipe\cygwin-c5e39b7a9d22bafb-4308-sigwait, size 164, mode PIPE_TYPE_MESSAGE
  1101216 [main] git-credential-cache 4308 fhandler_pipe::create: pipe read
handle 0x354
   511267 [main] git-credential-cache 4308 fhandler_pipe::create:
CreateFile: name \\.\pipe\cygwin-c5e39b7a9d22bafb-4308-sigwait
   911358 [main] git-credential-cache 4308 fhandler_pipe::create: pipe write
handle 0x350
   621420 [main] git-credential-cache 4308 dll_crt0_0: finished dll_crt0_0
initialization
  7082128 [main] git-credential-cache 4308 mount_info::conv_to_posix_path:
conv_to_posix_path (C:\home\public\Desktop\projects\dcarr, no-keep-rel,
no-add-slash)
   692197 [main] git-credential-cache 4308 normalize_win32_path:
C:\home\public\Desktop\projects\dcarr = normalize_win32_path
(C:\home\public\Desktop\projects\dcarr)
   452242 [main] git-credential-cache 4308 mount_info::conv_to_posix_path:
/cygdrive/c/home/public/Desktop/projects/dcarr = conv_to_posix_path
(C:\home\public\Desktop\projects\dcarr)
 -1042138 [sig] git-credential-cache 4308 wait_sig: entering ReadFile loop,
my_readsig 0x354, my_sendsig 0x350
  2672405 [main] git-credential-cache 4308 sigprocmask: 0 = sigprocmask (0,
0x0, 0x800180A8)
  2372642 [main] git-credential-cache 4308 _cygwin_istext_for_stdio: fd 0:
not open
   602702 [main] git-credential-cache 4308 _cygwin_istext_for_stdio: fd 1:
not open
   372739 [main] git-credential-cache 4308 _cygwin_istext_for_stdio: fd 2:
not open
  1472886 [main] git-credential-cache (4308) open_shared: name cygpid.4308,
n 4308, shared 0x60FD (wanted 0x60FD), h 0x330, *m 2
   302916 [main] ? (4308) time: 1402843072 = time(0x0)
   422958 [main] git-credential-cache 4308 pinfo::thisproc: myself
dwProcessId 4308
  6453603 [main] git-credential-cache 4308 environ_init:
GetEnvironmentStrings returned 0x494040
   503653 [main] git-credential-cache 4308 environ_init: 0x80028290: !::=::\
   543707 [main] git-credential-cache 4308 environ_init: 0x800282A0: !A:=A:\
   783785 [main] git-credential-cache 4308 environ_init: 0x800282B0: !B:=B:\
   833868 [main] git-credential-cache 4308 environ_init: 0x800282C0: !D:=D:\
   723940 [main] git-credential-cache 4308 environ_init: 0x800282D0: !E:=E:\
   563996 [main] git-credential-cache 4308 environ_init: 0x800282E0: !F:=F:\
   754071 [main] git-credential-cache 4308 environ_init: 0x800282F0: !G:=G:\
   724143 [main] git-credential-cache 4308 

Re: [PATCH] gitk: use mktemp -d to avoid predictable temporary directories

2014-06-15 Thread brian m. carlson
On Sun, Jun 15, 2014 at 08:51:23AM +0100, Pat Thoyts wrote:
 David Aguilar dav...@gmail.com writes:
 --- a/gitk
 +++ b/gitk
 @@ -3502,7 +3502,8 @@ proc gitknewtmpdir {} {
  } else {
  set tmpdir $gitdir
  }
 -set gitktmpdir [file join $tmpdir [format .gitk-tmp.%s [pid]]]
 +set gitktmpformat [file join $tmpdir .gitk-tmp.XX]
 +set gitktmpdir [exec mktemp -d $gitktmpformat]
  if {[catch {file mkdir $gitktmpdir} err]} {
  error_popup [mc Error creating temporary directory %s: 
  $gitktmpdir] $err
  unset gitktmpdir
 
 This is a problem on Windows where we will not have mktemp. In Tcl 8.6
 the file command acquired a file tempfile command to help with this
 kind of issue (https://www.tcl.tk/man/tcl8.6/TclCmd/file.htm#M39) but
 for older versions we should probably stick with the existing pattern at
 least on Windows.

The existing pattern is a security bug on Unix systems. MITRE (CWE-377)
tells me that it is a vulnerability on Windows as well, so you'd
probably want to come up with a better solution than the existing
pattern.

You also probably want to request a CVE for this, which the Red Hat and
Debian security teams can do for you if you like.  Distributions will
likely want to issue security advisories for this.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187


signature.asc
Description: Digital signature


Re: [OT] List CC etiquette and my brain just do not seem to work

2014-06-15 Thread brian m. carlson
On Sun, Jun 15, 2014 at 10:27:21AM -0400, Jason Pyeron wrote:
 rant
 Why can the list set the reply to the list and if there is a sender
 whos email is not on the list add them to the reply to header as well.

https://www.google.com/search?q=reply+to+considered+harmful

 I forget too many times to fix the address lines, and I get beaten
 with a stick at work when I use the reply all.

I have to adjust to different behavior for different lists as well.  On
the Debian lists, you are expected to reply to the list only, unless
someone sets their Mail-Followup-To accordingly, in which case your mail
client should do the right thing and CC them.

On the Git list, you are expected to CC everybody.  I personally prefer
the Debian strategy, as I read the list and don't generally need the
extra copy, but when in Romeā€¦.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187


signature.asc
Description: Digital signature


[PATCH 00/14] Add submodule test harness

2014-06-15 Thread Jens Lehmann
This is the series I sought feedback for some time ago in gmane/$245048. It
took longer than I expected to finish this series because I had to diagnose
the test failures I saw with some of the ten commands I added since then.
They boiled down to four different inconsistencies in Git's handling of new
or removed submodules. Sometimes no empty directory is created for a new
submodule. stash and cherry-pick seem to use wrong submodule ignore settings
(all instead of dirty), so they overlook submodule changes. And merge
behaves strange when a submodule is removed, as it tries to merge new tracked
files with those remaining from the submodule. This series only documents
these issues (which most probably didn't cause any real world problems until
now because adding and removing submodules wasn't well supported anyway).

The first patch adds a simple helper function to the test lib which makes
it easier to test for an empty submodule directory.

The second patch contains the heavy lifting, it adds the test framework for
switching submodules. Currently only transitions without merge conflicts are
tested for, I intend to add others producing merge conflicts in a follow-up
series.

The other twelve patches use the framework to test all relevant work tree
manipulating commands. In addition to the two general problems documented
in the second patch some patches add known failures for problems of some
commands/actions to be fixed in later patches.

The only work tree changing command I didn't cover here is checkout-index, as
that updates the work tree to the content of the index but doesn't remove any
formerly tracked files, which means it doesn't do a full transition from one
commit to another. If I overlooked another command, please speak up so I can
include it too.

Jens Lehmann (14):
  test-lib: add test_dir_is_empty()
  submodules: Add the lib-submodule-update.sh test library
  checkout: call the new submodule update test framework
  apply: add t4137 for submodule updates
  read-tree: add t1013 for submodule updates
  reset: add t7112 for submodule updates
  bisect: add t6041 for submodule updates
  merge: add t7613 for submodule updates
  rebase: add t3426 for submodule updates
  pull: add t5572 for submodule updates
  cherry-pick: add t3512 for submodule updates
  am: add t4255 for submodule updates
  stash: add t3906 for submodule updates
  revert: add t3513 for submodule updates

 t/lib-submodule-update.sh| 670 +++
 t/t1013-read-tree-submodule.sh   |  12 +
 t/t2013-checkout-submodule.sh|   5 +
 t/t3426-rebase-submodule.sh  |  46 +++
 t/t3512-cherry-pick-submodule.sh |  13 +
 t/t3513-revert-submodule.sh  |  32 ++
 t/t3906-stash-submodule.sh   |  24 ++
 t/t4137-apply-submodule.sh   |  20 ++
 t/t4255-am-submodule.sh  |  21 ++
 t/t5572-pull-submodule.sh|  74 +
 t/t6041-bisect-submodule.sh  |  32 ++
 t/t7112-reset-submodule.sh   |  14 +
 t/t7613-merge-submodule.sh   |  19 ++
 t/test-lib-functions.sh  |  11 +
 14 files changed, 993 insertions(+)
 create mode 100755 t/lib-submodule-update.sh
 create mode 100755 t/t1013-read-tree-submodule.sh
 create mode 100755 t/t3426-rebase-submodule.sh
 create mode 100755 t/t3512-cherry-pick-submodule.sh
 create mode 100755 t/t3513-revert-submodule.sh
 create mode 100755 t/t3906-stash-submodule.sh
 create mode 100755 t/t4137-apply-submodule.sh
 create mode 100755 t/t4255-am-submodule.sh
 create mode 100755 t/t5572-pull-submodule.sh
 create mode 100755 t/t6041-bisect-submodule.sh
 create mode 100755 t/t7112-reset-submodule.sh
 create mode 100755 t/t7613-merge-submodule.sh

-- 
2.0.0.275.gc479268

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 01/14] test-lib: add test_dir_is_empty()

2014-06-15 Thread Jens Lehmann
For the upcoming submodule test framework we often need to assert that an
empty directory exists in the work tree. Add the test_dir_is_empty()
function which asserts that the given argument is an empty directory.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/test-lib-functions.sh | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 158e10a..546f0a6 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -489,6 +489,17 @@ test_path_is_dir () {
fi
 }

+# Check if the directory exists and is empty as expected, barf otherwise.
+test_dir_is_empty () {
+   test_path_is_dir $1 
+   if test $(ls -a1 $1 | egrep -v '^\.\.?$')
+   then
+   echo Directory '$1' is not empty, it contains:
+   ls -la $1
+   return 1
+   fi
+}
+
 test_path_is_missing () {
if [ -e $1 ]
then
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 02/14] submodules: Add the lib-submodule-update.sh test library

2014-06-15 Thread Jens Lehmann
Add this test library to simplify covering all combinations of submodule
update scenarios without having to add those to a test of each work tree
manipulating command over and over again.

The functions test_submodule_switch() and test_submodule_forced_switch()
are intended to be called from a test script with a single argument. This
argument is either a work tree manipulating command (including any command
line options) or a function (when more than a single git command is needed
to switch work trees from the current HEAD to another commit). This
command (or function) is passed a target branch as argument. The two new
functions check that each submodule transition is handled as expected,
which currently means that submodule work trees are not affected until
git submodule update is called. The forced variant is for commands
using their '-f' or '--hard' option and expects them to overwrite local
modifications as a result. Each of these two functions contains 14
tests_expect_* calls.

Calling one of these test functions the first time creates a repository
named submodule_update_repo. At first it contains two files, then a
single submodule is added in another commit followed by commits covering
all relevant submodule modifications. This repository is newly cloned into
the submodule_update for each test_expect_* to avoid interference
between different parts of the test functions (some to-be-tested commands
also manipulate refs along with the work tree, e.g. git reset).

Follow-up commits will then call these two test functions for all work
tree manipulating commands (with a combination of all their options
relevant to what they do with the work tree) making sure they work as
expected. Later this test library will be extended to cover merges
resulting in conflicts too. Also it is intended to be easily extendable
for the recursive update functionality, where even more combinations of
submodule modifications have to be tested for.

This version documents two bugs in current Git with expected failures:

*) When a submodule is replaced with a tracked file of the same name the
   submodule work tree including any local modifications (and even the
   whole history if it uses a .git directory instead of a gitfile!) is
   silently removed.

*) Forced work tree updates happily manipulate files in the directory of a
   submodule that has just been removed in the superproject (but is of
   course still present in the work tree due to the way submodules are
   currently handled). This becomes dangerous when files in the submodule
   directory are overwritten by files from the new superproject commit, as
   any modifications to the submodule files will be lost) and is expected
   to also destroy history in the - admittedly unlikely case - the new
   commit adds a file named .git to the submodule directory.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/lib-submodule-update.sh | 630 ++
 1 file changed, 630 insertions(+)
 create mode 100755 t/lib-submodule-update.sh

diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
new file mode 100755
index 000..c6c842a
--- /dev/null
+++ b/t/lib-submodule-update.sh
@@ -0,0 +1,630 @@
+# Create a submodule layout used for all tests below.
+#
+# The following use cases are covered:
+# - New submodule (no_submodule = add_sub1)
+# - Removed submodule (add_sub1 = remove_sub1)
+# - Updated submodule (add_sub1 = modify_sub1)
+# - Submodule updated to invalid commit (add_sub1 = invalid_sub1)
+# - Submodule updated from invalid commit (invalid_sub1 = valid_sub1)
+# - Submodule replaced by tracked files in directory (add_sub1 =
+#   replace_sub1_with_directory)
+# - Directory containing tracked files replaced by submodule
+#   (replace_sub1_with_directory = replace_directory_with_sub1)
+# - Submodule replaced by tracked file with the same name (add_sub1 =
+#   replace_sub1_with_file)
+# - Tracked file replaced by submodule (replace_sub1_with_file =
+#   replace_file_with_sub1)
+#
+#   --O-O
+#  /  ^ replace_directory_with_sub1
+# /   replace_sub1_with_directory
+#/O
+#   / ^
+#  /  modify_sub1
+#  O--O---O
+#  ^  ^\  ^
+#  |  | \ remove_sub1
+#  |  |  -O-O
+#  |  |   \   ^ replace_file_with_sub1
+#  |  |\  replace_sub1_with_file
+#  |   add_sub1 --O-O
+# no_submodule^ valid_sub1
+# invalid_sub1
+#
+create_lib_submodule_repo () {
+   git init submodule_update_repo 
+   (
+   cd submodule_update_repo 
+   echo expect .gitignore 
+   echo actual .gitignore 
+   echo x file1 
+   echo y file2 
+   git add .gitignore file1 file2 
+   git commit -m Base 
+   git branch no_submodule 
+
+   git 

[PATCH 04/14] apply: add t4137 for submodule updates

2014-06-15 Thread Jens Lehmann
Test that the apply command updates the work tree as expected for the
'--index' and the '--3way' options (for submodule changes which don't
result in conflicts).

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/t4137-apply-submodule.sh | 20 
 1 file changed, 20 insertions(+)
 create mode 100755 t/t4137-apply-submodule.sh

diff --git a/t/t4137-apply-submodule.sh b/t/t4137-apply-submodule.sh
new file mode 100755
index 000..a9bd40a
--- /dev/null
+++ b/t/t4137-apply-submodule.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+test_description='git apply handling submodules'
+
+. ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh
+
+apply_index () {
+   git diff --ignore-submodules=dirty ..$1 | git apply --index -
+}
+
+test_submodule_switch apply_index
+
+apply_3way () {
+   git diff --ignore-submodules=dirty ..$1 | git apply --3way -
+}
+
+test_submodule_switch apply_3way
+
+test_done
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 05/14] read-tree: add t1013 for submodule updates

2014-06-15 Thread Jens Lehmann
Test that the read-tree command updates the work tree as expected for
changes which don't result in conflicts with the '-m' and '--reset' flag.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/t1013-read-tree-submodule.sh | 12 
 1 file changed, 12 insertions(+)
 create mode 100755 t/t1013-read-tree-submodule.sh

diff --git a/t/t1013-read-tree-submodule.sh b/t/t1013-read-tree-submodule.sh
new file mode 100755
index 000..20526ae
--- /dev/null
+++ b/t/t1013-read-tree-submodule.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+test_description='read-tree can handle submodules'
+
+. ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh
+
+test_submodule_switch git read-tree -u -m
+
+test_submodule_forced_switch git read-tree -u --reset
+
+test_done
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 06/14] reset: add t7112 for submodule updates

2014-06-15 Thread Jens Lehmann
Test that the reset command updates the work tree as expected for changes
with '--keep', '--merge' (for changes which don't result in conflicts) and
'--hard'.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/t7112-reset-submodule.sh | 14 ++
 1 file changed, 14 insertions(+)
 create mode 100755 t/t7112-reset-submodule.sh

diff --git a/t/t7112-reset-submodule.sh b/t/t7112-reset-submodule.sh
new file mode 100755
index 000..2eda6ad
--- /dev/null
+++ b/t/t7112-reset-submodule.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+test_description='reset can handle submodules'
+
+. ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh
+
+test_submodule_switch git reset --keep
+
+test_submodule_switch git reset --merge
+
+test_submodule_forced_switch git reset --hard
+
+test_done
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 07/14] bisect: add t6041 for submodule updates

2014-06-15 Thread Jens Lehmann
Test that the bisect command updates the work tree as expected. To make
that work with the new submodule test framework a git_bisect helper
function is added. This adds a commit after the one given to be switched
to and makes that one the bad commit. The starting point is then given to
bisect as the good commit which makes bisect change the work tree to the
commit in between, which is the commit given.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/t6041-bisect-submodule.sh | 32 
 1 file changed, 32 insertions(+)
 create mode 100755 t/t6041-bisect-submodule.sh

diff --git a/t/t6041-bisect-submodule.sh b/t/t6041-bisect-submodule.sh
new file mode 100755
index 000..4f37d24
--- /dev/null
+++ b/t/t6041-bisect-submodule.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+test_description='bisect can handle submodules'
+
+. ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh
+
+git_bisect () {
+   git status -su expected 
+   ls -1pR * expected 
+   tar czf $TRASH_DIRECTORY/tmp.tgz * 
+   GOOD=$(git rev-parse --verify HEAD) 
+   git checkout $1 
+   echo foo bar 
+   git add bar 
+   git commit -m bisect bad 
+   BAD=$(git rev-parse --verify HEAD) 
+   git reset --hard HEAD^^ 
+   git submodule update 
+   git bisect start 
+   git bisect good $GOOD 
+   rm -rf * 
+   tar xzf $TRASH_DIRECTORY/tmp.tgz 
+   git status -su actual 
+   ls -1pR * actual 
+   test_cmp expected actual 
+   git bisect bad $BAD
+}
+
+test_submodule_switch git_bisect
+
+test_done
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 08/14] merge: add t7613 for submodule updates

2014-06-15 Thread Jens Lehmann
Test that the merge command updates the work tree as expected (for
submodule changes which don't result in conflicts) when used without
arguments or with the '--ff', '--ff-only' and '--no-ff' flag.

Implement the KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR
switch to expect the known failure that --no-ff merges do not create the
empty submodule directory.

The KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES
switch is also implemented to expect the known failure that --no-ff
merges attempt to merge the new files in the former submodule directory
with those of the removed submodule.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/lib-submodule-update.sh  | 24 +---
 t/t7613-merge-submodule.sh | 19 +++
 2 files changed, 40 insertions(+), 3 deletions(-)
 create mode 100755 t/t7613-merge-submodule.sh

diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index c6c842a..bc9415c 100755
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -275,7 +275,16 @@ test_submodule_switch () {
'
# ... as does removing a directory with tracked files with a
# submodule.
-   test_expect_success $command: replace directory with submodule '
+   if test $KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR = 
1
+   then
+   # Non fast-forward merges fail with Directory sub1 doesn't
+   # exist. sub1 because the empty submodule directory is not
+   # created
+   RESULT=failure
+   else
+   RESULT=success
+   fi
+   test_expect_$RESULT $command: replace directory with submodule '
prolog 
reset_work_tree_to replace_sub1_with_directory 
(
@@ -318,7 +327,16 @@ test_submodule_switch () {
'
# Replacing a submodule with files in a directory must fail as the
# submodule work tree isn't removed ...
-   test_expect_success $command: replace submodule with a directory must 
fail '
+   if test 
$KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES = 1
+   then
+   # Non fast-forward merges attempt to merge the former
+   # submodule files with the newly checked out ones in the
+   # directory of the same name while it shouldn't.
+   RESULT=failure
+   else
+   RESULT=success
+   fi
+   test_expect_$RESULT $command: replace submodule with a directory must 
fail '
prolog 
reset_work_tree_to add_sub1 
(
@@ -330,7 +348,7 @@ test_submodule_switch () {
)
'
# ... especially when it contains a .git directory.
-   test_expect_success $command: replace submodule containing a .git 
directory with a directory must fail '
+   test_expect_$RESULT $command: replace submodule containing a .git 
directory with a directory must fail '
prolog 
reset_work_tree_to add_sub1 
(
diff --git a/t/t7613-merge-submodule.sh b/t/t7613-merge-submodule.sh
new file mode 100755
index 000..d1e9fcc
--- /dev/null
+++ b/t/t7613-merge-submodule.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+test_description='merge can handle submodules'
+
+. ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh
+
+# merges without conflicts
+test_submodule_switch git merge
+
+test_submodule_switch git merge --ff
+
+test_submodule_switch git merge --ff-only
+
+KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
+test_submodule_switch git merge --no-ff
+
+test_done
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 10/14] pull: add t5572 for submodule updates

2014-06-15 Thread Jens Lehmann
Test that the pull command updates the work tree as expected (for
submodule changes which don't result in conflicts) when used without
arguments or with the '--ff', '--ff-only' and '--no-ff' flag each. Add
helper functions to reset the branch to be updated to to the current
HEAD so that pull is doing the transition from HEAD to the given branch.

Set KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES
and KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR to
document that pull has the same --no-ff known failures merge has.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/t5572-pull-submodule.sh | 45 +
 1 file changed, 45 insertions(+)
 create mode 100755 t/t5572-pull-submodule.sh

diff --git a/t/t5572-pull-submodule.sh b/t/t5572-pull-submodule.sh
new file mode 100755
index 000..accfa5c
--- /dev/null
+++ b/t/t5572-pull-submodule.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+test_description='pull can handle submodules'
+
+. ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh
+
+reset_branch_to_HEAD () {
+   git branch -D $1 
+   git checkout -b $1 HEAD 
+   git branch --set-upstream-to=origin/$1 $1
+}
+
+git_pull () {
+   reset_branch_to_HEAD $1 
+   git pull
+}
+
+# pulls without conflicts
+test_submodule_switch git_pull
+
+git_pull_ff () {
+   reset_branch_to_HEAD $1 
+   git pull --ff
+}
+
+test_submodule_switch git_pull_ff
+
+git_pull_ff_only () {
+   reset_branch_to_HEAD $1 
+   git pull --ff-only
+}
+
+test_submodule_switch git_pull_ff_only
+
+git_pull_noff () {
+   reset_branch_to_HEAD $1 
+   git pull --no-ff
+}
+
+KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
+test_submodule_switch git_pull_noff
+
+test_done
-- 
2.0.0.275.gba02dd0


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 09/14] rebase: add t3426 for submodule updates

2014-06-15 Thread Jens Lehmann
Test that the rebase command updates the work tree as expected for
changes which don't result in conflicts. To make that work add two
helper functions that add a commit only touching files and then
revert it. This allows to rebase the target commit over these two
and to compare the result.

Set KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR to
document that replace directory with submodule fails for an
interactive rebase because a directory sub1 already exists.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/t3426-rebase-submodule.sh | 46 +
 1 file changed, 46 insertions(+)
 create mode 100755 t/t3426-rebase-submodule.sh

diff --git a/t/t3426-rebase-submodule.sh b/t/t3426-rebase-submodule.sh
new file mode 100755
index 000..019ce52
--- /dev/null
+++ b/t/t3426-rebase-submodule.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+test_description='rebase can handle submodules'
+
+. ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh
+. $TEST_DIRECTORY/lib-rebase.sh
+
+git_rebase () {
+   git status -su expected 
+   ls -1pR * expected 
+   git checkout -b ours HEAD 
+   echo x file1 
+   git add file1 
+   git commit -m add_x 
+   git revert HEAD 
+   git status -su actual 
+   ls -1pR * actual 
+   test_cmp expected actual 
+   git rebase $1
+}
+
+test_submodule_switch git_rebase
+
+git_rebase_interactive () {
+   git status -su expected 
+   ls -1pR * expected 
+   git checkout -b ours HEAD 
+   echo x file1 
+   git add file1 
+   git commit -m add_x 
+   git revert HEAD 
+   git status -su actual 
+   ls -1pR * actual 
+   test_cmp expected actual 
+   set_fake_editor 
+   echo fake-editor.sh .git/info/exclude
+   git rebase -i $1
+}
+
+KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+# The real reason replace directory with submodule fails is because a
+# directory sub1 exists, but we reuse the suppression added for merge here
+test_submodule_switch git_rebase_interactive
+
+test_done
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 11/14] cherry-pick: add t3512 for submodule updates

2014-06-15 Thread Jens Lehmann
Test that the cherry-pick command updates the work tree as expected (for
submodule changes which don't result in conflicts).

Set KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES
and KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR to
document that cherry-pick has the same --no-ff known failures merge has.

Implement the KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT switch to expect
the known failure that while cherry picking just a SHA-1 update for an
ignored submodule the commit incorrectly fails with The previous
cherry-pick is now empty, possibly due to conflict resolution..

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/lib-submodule-update.sh| 15 ---
 t/t3512-cherry-pick-submodule.sh | 13 +
 2 files changed, 25 insertions(+), 3 deletions(-)
 create mode 100755 t/t3512-cherry-pick-submodule.sh

diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index bc9415c..95e041b 100755
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -392,7 +392,16 @@ test_submodule_switch () {

## Modified submodule #
# Updating a submodule sha1 doesn't update the submodule's work tree
-   test_expect_success $command: modified submodule does not update 
submodule work tree '
+   if test $KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT = 1
+   then
+   # When cherry picking a SHA-1 update for an ignored submodule
+   # the commit incorrectly fails with The previous cherry-pick
+   # is now empty, possibly due to conflict resolution.
+   RESULT=failure
+   else
+   RESULT=success
+   fi
+   test_expect_$RESULT $command: modified submodule does not update 
submodule work tree '
prolog 
reset_work_tree_to add_sub1 
(
@@ -408,7 +417,7 @@ test_submodule_switch () {

# Updating a submodule to an invalid sha1 doesn't update the
# submodule's work tree, subsequent update will fail
-   test_expect_success $command: modified submodule does not update 
submodule work tree to invalid commit '
+   test_expect_$RESULT $command: modified submodule does not update 
submodule work tree to invalid commit '
prolog 
reset_work_tree_to add_sub1 
(
@@ -423,7 +432,7 @@ test_submodule_switch () {
'
# Updating a submodule from an invalid sha1 doesn't update the
# submodule's work tree, subsequent update will succeed
-   test_expect_success $command: modified submodule does not update 
submodule work tree from invalid commit '
+   test_expect_$RESULT $command: modified submodule does not update 
submodule work tree from invalid commit '
prolog 
reset_work_tree_to invalid_sub1 
(
diff --git a/t/t3512-cherry-pick-submodule.sh b/t/t3512-cherry-pick-submodule.sh
new file mode 100755
index 000..6863b7b
--- /dev/null
+++ b/t/t3512-cherry-pick-submodule.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+test_description='cherry-pick can handle submodules'
+
+. ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh
+
+KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1
+KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
+test_submodule_switch git cherry-pick
+
+test_done
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 12/14] am: add t4255 for submodule updates

2014-06-15 Thread Jens Lehmann
Test that the am command updates the work tree as expected (for submodule
changes which don't result in conflicts). To make that work add two
helper functions that use format-patch to create the input for am.

Add the KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES
switch to expect the known failure that --no-ff merges attempt to merge
the new files in the former submodule directory with those of the removed
submodule.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/t4255-am-submodule.sh | 21 +
 1 file changed, 21 insertions(+)
 create mode 100755 t/t4255-am-submodule.sh

diff --git a/t/t4255-am-submodule.sh b/t/t4255-am-submodule.sh
new file mode 100755
index 000..8bde7db
--- /dev/null
+++ b/t/t4255-am-submodule.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+test_description='git am handling submodules'
+
+. ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh
+
+am () {
+   git format-patch --stdout --ignore-submodules=dirty ..$1 | git am -
+}
+
+test_submodule_switch am
+
+am_3way () {
+   git format-patch --stdout --ignore-submodules=dirty ..$1 | git am 
--3way -
+}
+
+KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
+test_submodule_switch am_3way
+
+test_done
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 03/14] checkout: call the new submodule update test framework

2014-06-15 Thread Jens Lehmann
Test that the checkout command updates the work tree as expected with
and without the '-f' flag.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/t2013-checkout-submodule.sh | 5 +
 1 file changed, 5 insertions(+)

diff --git a/t/t2013-checkout-submodule.sh b/t/t2013-checkout-submodule.sh
index 06b18f8..6847f75 100755
--- a/t/t2013-checkout-submodule.sh
+++ b/t/t2013-checkout-submodule.sh
@@ -3,6 +3,7 @@
 test_description='checkout can handle submodules'

 . ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh

 test_expect_success 'setup' '
mkdir submodule 
@@ -62,4 +63,8 @@ test_expect_success 'checkout submodule honors 
submodule.*.ignore from .git/
! test -s actual
 '

+test_submodule_switch git checkout
+
+test_submodule_forced_switch git checkout -f
+
 test_done
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 13/14] stash: add t3906 for submodule updates

2014-06-15 Thread Jens Lehmann
Test that the stash apply command updates the work tree as expected for
changes which don't result in conflicts. To make that work add a helper
function that uses read-tree to apply the changes of the target commit
to the work tree, then stashes these changes and at last applies that
stash.

Implement the KNOWN_FAILURE_STASH_DOES_IGNORE_SUBMODULE_CHANGES switch
and reuse two other already present switches to expect the known
failure that stash does ignore submodule changes.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/lib-submodule-update.sh  | 23 ++-
 t/t3906-stash-submodule.sh | 24 
 2 files changed, 42 insertions(+), 5 deletions(-)
 create mode 100755 t/t3906-stash-submodule.sh

diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index 95e041b..9901b45 100755
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -217,7 +217,14 @@ test_submodule_switch () {
command=$1
# Appearing submodule #
# Switching to a commit letting a submodule appear creates empty dir ...
-   test_expect_success $command: added submodule creates empty directory 
'
+   if test $KNOWN_FAILURE_STASH_DOES_IGNORE_SUBMODULE_CHANGES = 1
+   then
+   # Restoring stash fails to restore submodule index entry
+   RESULT=failure
+   else
+   RESULT=success
+   fi
+   test_expect_$RESULT $command: added submodule creates empty directory 
'
prolog 
reset_work_tree_to no_submodule 
(
@@ -231,7 +238,7 @@ test_submodule_switch () {
)
'
# ... and doesn't care if it already exists ...
-   test_expect_success $command: added submodule leaves existing empty 
directory alone '
+   test_expect_$RESULT $command: added submodule leaves existing empty 
directory alone '
prolog 
reset_work_tree_to no_submodule 
(
@@ -260,7 +267,7 @@ test_submodule_switch () {
'
# Replacing a tracked file with a submodule produces an empty
# directory ...
-   test_expect_success $command: replace tracked file with submodule 
creates empty directory '
+   test_expect_$RESULT $command: replace tracked file with submodule 
creates empty directory '
prolog 
reset_work_tree_to replace_sub1_with_file 
(
@@ -300,7 +307,13 @@ test_submodule_switch () {

 Disappearing submodule ###
# Removing a submodule doesn't remove its work tree ...
-   test_expect_success $command: removed submodule leaves submodule 
directory and its contents in place '
+   if test $KNOWN_FAILURE_STASH_DOES_IGNORE_SUBMODULE_CHANGES = 1
+   then
+   RESULT=failure
+   else
+   RESULT=success
+   fi
+   test_expect_$RESULT $command: removed submodule leaves submodule 
directory and its contents in place '
prolog 
reset_work_tree_to add_sub1 
(
@@ -312,7 +325,7 @@ test_submodule_switch () {
)
'
# ... especially when it contains a .git directory.
-   test_expect_success $command: removed submodule leaves submodule 
containing a .git directory alone '
+   test_expect_$RESULT $command: removed submodule leaves submodule 
containing a .git directory alone '
prolog 
reset_work_tree_to add_sub1 
(
diff --git a/t/t3906-stash-submodule.sh b/t/t3906-stash-submodule.sh
new file mode 100755
index 000..aaee424
--- /dev/null
+++ b/t/t3906-stash-submodule.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+test_description='stash apply can handle submodules'
+
+. ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh
+
+git_stash () {
+   git status -su expected 
+   ls -1pR * expected 
+   git read-tree -u -m $1 
+   git stash 
+   git status -su actual 
+   ls -1pR * actual 
+   test_cmp expected actual 
+   git stash apply
+}
+
+KNOWN_FAILURE_STASH_DOES_IGNORE_SUBMODULE_CHANGES=1
+KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1
+KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+test_submodule_switch git_stash
+
+test_done
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 14/14] revert: add t3513 for submodule updates

2014-06-15 Thread Jens Lehmann
Test that the revert command updates the work tree as expected (for
submodule changes which don't result in conflicts). Add a helper function
to first revert the checked out target commit to make the last revert
produce the to-be-tested work tree.

Set the KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT and
KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR switches to
document that revert has the similar failures.

Signed-off-by: Jens Lehmann jens.lehm...@web.de
---
 t/t3513-revert-submodule.sh | 32 
 1 file changed, 32 insertions(+)
 create mode 100755 t/t3513-revert-submodule.sh

diff --git a/t/t3513-revert-submodule.sh b/t/t3513-revert-submodule.sh
new file mode 100755
index 000..57e2d75
--- /dev/null
+++ b/t/t3513-revert-submodule.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+test_description='revert can handle submodules'
+
+. ./test-lib.sh
+. $TEST_DIRECTORY/lib-submodule-update.sh
+
+# Create a revert that moves from HEAD (including any test modifications to
+# the work tree) to $1 by first checking out $1 and reverting it. Reverting
+# the revert is the transition we test for. We tar the current work tree
+# first so we can restore the work tree test setup after doing the checkout
+# and revert.  We test here that the restored work tree content is identical
+# to that at the beginning. The last revert is then tested by the framework.
+git_revert () {
+   git status -su expected 
+   ls -1pR * expected 
+   tar czf $TRASH_DIRECTORY/tmp.tgz * 
+   git checkout $1 
+   git revert HEAD 
+   rm -rf * 
+   tar xzf $TRASH_DIRECTORY/tmp.tgz 
+   git status -su actual 
+   ls -1pR * actual 
+   test_cmp expected actual 
+   git revert HEAD
+}
+
+KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1
+KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
+test_submodule_switch git_revert
+
+test_done
-- 
2.0.0.275.gc479268


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [OT] List CC etiquette and my brain just do not seem to work

2014-06-15 Thread Jason Pyeron
 -Original Message-
 From: brian m. carlson [mailto:sand...@crustytoothpaste.net] 
 Sent: Sunday, June 15, 2014 12:45
 To: git@vger.kernel.org; Jason Pyeron
 Subject: Re: [OT] List CC etiquette and my brain just do not 
 seem to work
 
 On Sun, Jun 15, 2014 at 10:27:21AM -0400, Jason Pyeron wrote:
  rant
  Why can the list set the reply to the list and if there is a sender
  whos email is not on the list add them to the reply to 
 header as well.
 
 https://www.google.com/search?q=reply+to+considered+harmful

Nice! Coddling the Brain-Dead, Penalizing the Conscientious from the first
result http://www.unicom.com/pw/reply-to-harmful.html

That describes me to a tee, although I strongly disagree with their premise of
It Adds Nothing, it subtracts one message from my inbox.

Btw, nice email address it is what I needed today.

-Jason

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] gitk: use mktemp -d to avoid predictable temporary directories

2014-06-15 Thread David Aguilar
On Sun, Jun 15, 2014 at 04:32:27PM +, brian m. carlson wrote:
 On Sun, Jun 15, 2014 at 08:51:23AM +0100, Pat Thoyts wrote:
  David Aguilar dav...@gmail.com writes:
  --- a/gitk
  +++ b/gitk
  @@ -3502,7 +3502,8 @@ proc gitknewtmpdir {} {
 } else {
 set tmpdir $gitdir
 }
  -  set gitktmpdir [file join $tmpdir [format .gitk-tmp.%s [pid]]]
  +  set gitktmpformat [file join $tmpdir .gitk-tmp.XX]
  +  set gitktmpdir [exec mktemp -d $gitktmpformat]
 if {[catch {file mkdir $gitktmpdir} err]} {
 error_popup [mc Error creating temporary directory %s: 
   $gitktmpdir] $err
 unset gitktmpdir
  
  This is a problem on Windows where we will not have mktemp. In Tcl 8.6
  the file command acquired a file tempfile command to help with this
  kind of issue (https://www.tcl.tk/man/tcl8.6/TclCmd/file.htm#M39) but
  for older versions we should probably stick with the existing pattern at
  least on Windows.
 
 The existing pattern is a security bug on Unix systems. MITRE (CWE-377)
 tells me that it is a vulnerability on Windows as well, so you'd
 probably want to come up with a better solution than the existing
 pattern.
 
 You also probably want to request a CVE for this, which the Red Hat and
 Debian security teams can do for you if you like.  Distributions will
 likely want to issue security advisories for this.

I don't think this requires a CVE since it's basically plugging a hole
that my previous patch introduced by making gitk honor the TMPDIR
variable; it hasn't strictly been in any release yet.

Does Git on Windows use a modern tcl?
I checked, and my (old) existing msysgit installation had tcl
8.5, so I unfortunately using file tempname won't help there.

Hmm.. I guess what I could do is keep the old behavior (having gitk ignore 
TMPDIR)
on Windows and only use the new code path on non-Windows.

That seems like it'd be the simplest implementation (no need to check versions)
and the least harmful to existing users (avoids a tcl upgrade or mkdtemp 
installation
for Windows users).
-- 
David
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] gitk: use mktemp -d to avoid predictable temporary directories

2014-06-15 Thread brian m. carlson
On Sun, Jun 15, 2014 at 02:49:29PM -0700, David Aguilar wrote:
 I don't think this requires a CVE since it's basically plugging a hole
 that my previous patch introduced by making gitk honor the TMPDIR
 variable; it hasn't strictly been in any release yet.

Yeah, that's not needed, then.  I didn't notice it was the immediately
previous patch.  My bad.

 Hmm.. I guess what I could do is keep the old behavior (having gitk
 ignore TMPDIR) on Windows and only use the new code path on
 non-Windows.
 
 That seems like it'd be the simplest implementation (no need to check
 versions) and the least harmful to existing users (avoids a tcl
 upgrade or mkdtemp installation for Windows users).

Yeah, that would be the safest bet.  Maybe a comment to that effect
would be appropriate, so that when Tcl gets upgraded, that change can be
removed.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187


signature.asc
Description: Digital signature


[PATCH] gitk: avoid mkdtemp on Windows

2014-06-15 Thread David Aguilar
105b5d3fbb1c00bb0aeaf9d3e0fbe26a7b1993fc introduced a dependency
on mkdtemp, which is not available on Windows.

Restore the original temporary directory behavior for Windows so
that gitk creates temporary directories in the current
repository.

The Unix code path retains new TMPDIR behavior.

Reported-by: Pat Thoyts pattho...@users.sourceforge.net
Helped-by: brian m. carlson sand...@crustytoothpaste.net
Signed-off-by: David Aguilar dav...@gmail.com
---
 gitk | 21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/gitk b/gitk
index 41e5071..66d8c9e 100755
--- a/gitk
+++ b/gitk
@@ -3496,15 +3496,22 @@ proc gitknewtmpdir {} {
 global diffnum gitktmpdir gitdir env
 
 if {![info exists gitktmpdir]} {
-   if {[info exists env(GITK_TMPDIR)]} {
-   set tmpdir $env(GITK_TMPDIR)
-   } elseif {[info exists env(TMPDIR)]} {
-   set tmpdir $env(TMPDIR)
+   if {$::tcl_platform(platform) eq {windows}} {
+   # Windows does not have mkdtemp so use the current directory
+   # to avoid using an unsafe pattern in a world-writeable
+   # temporary directory.
+   set gitktmpdir [file join $gitdir [format .gitk-tmp.%s [pid]]]
} else {
-   set tmpdir $gitdir
+   if {[info exists env(GITK_TMPDIR)]} {
+   set tmpdir $env(GITK_TMPDIR)
+   } elseif {[info exists env(TMPDIR)]} {
+   set tmpdir $env(TMPDIR)
+   } else {
+   set tmpdir $gitdir
+   }
+   set gitktmpformat [file join $tmpdir .gitk-tmp.XX]
+   set gitktmpdir [exec mktemp -d $gitktmpformat]
}
-   set gitktmpformat [file join $tmpdir .gitk-tmp.XX]
-   set gitktmpdir [exec mktemp -d $gitktmpformat]
if {[catch {file mkdir $gitktmpdir} err]} {
error_popup [mc Error creating temporary directory %s: 
$gitktmpdir] $err
unset gitktmpdir
-- 
2.0.0.257.g75cc6c6

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git rebase --skip stuck in a loop

2014-06-15 Thread brian m. carlson
On Fri, Jun 13, 2014 at 10:15:49AM -0400, Phillip Susi wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 6/13/2014 3:34 AM, Jeff King wrote:
  Thanks for saving the stuck state.
  
  If it's possible to share the whole repo, it might be worth seeing
  (then we can all just run git rebase --continue ourselves). If
  it's too big or is confidential, just tarring up .git/rebase-apply
  and making it available is probably a good first step.
 
 It's the debian parted repo, so nothing confidential.  Here it is:
 
 https://drive.google.com/file/d/0ByOQJBpP4bDXXy13YlN0aE5Fcnc/edit?usp=sharing

Okay.  This is actually a fairly straightforward issue.  In order to
reproduce, you have to use git rebase --merge and two patches in
sequence have to cause conflicts.  In that case, git rebase --skip will
fail to ever update the msgnum value, and it will get caught in a loop.

I should have a patch shortly.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187


signature.asc
Description: Digital signature


[PATCH] rebase--merge: fix --skip with two conflicts in a row

2014-06-15 Thread brian m. carlson
If git rebase --merge encountered a conflict, --skip would not work if the
next commit also conflicted.  The msgnum file would never be updated with
the new patch number, so no patch would actually be skipped, resulting in an
inescapable loop.

Update the msgnum file's value as the first thing in call_merge.  This also
avoids an Already applied message when skipping a commit.  There is no
visible change for the other contexts in which call_merge is invoked, as the
msgnum file's value remains unchanged in those situations.

Signed-off-by: brian m. carlson sand...@crustytoothpaste.net
---
 git-rebase--merge.sh|  5 +++--
 t/t3402-rebase-merge.sh | 15 +++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh
index 6d77b3c..d3fb67d 100644
--- a/git-rebase--merge.sh
+++ b/git-rebase--merge.sh
@@ -53,11 +53,12 @@ continue_merge () {
 }
 
 call_merge () {
-   cmt=$(cat $state_dir/cmt.$1)
+   msgnum=$1
+   echo $msgnum $state_dir/msgnum
+   cmt=$(cat $state_dir/cmt.$msgnum)
echo $cmt  $state_dir/current
hd=$(git rev-parse --verify HEAD)
cmt_name=$(git symbolic-ref HEAD 2 /dev/null || echo HEAD)
-   msgnum=$(cat $state_dir/msgnum)
eval GITHEAD_$cmt='${cmt_name##refs/heads/}~$(($end - $msgnum))'
eval GITHEAD_$hd='$onto_name'
export GITHEAD_$cmt GITHEAD_$hd
diff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh
index be8c1d5..5a27ec9 100755
--- a/t/t3402-rebase-merge.sh
+++ b/t/t3402-rebase-merge.sh
@@ -33,6 +33,7 @@ test_expect_success setup '
tr [a-z] [A-Z] original newfile 
git add newfile 
git commit -a -mside edits further. 
+   git branch second-side 
 
tr [a-m] [A-M] original newfile 
rm -f original 
@@ -41,6 +42,7 @@ test_expect_success setup '
git branch test-rebase side 
git branch test-rebase-pick side 
git branch test-reference-pick side 
+   git branch test-conflicts side 
git checkout -b test-merge side
 '
 
@@ -138,4 +140,17 @@ test_expect_success 'rebase -s funny -Xopt' '
test -f funny.was.run
 '
 
+test_expect_success 'rebase --skip works with two conflicts in a row' '
+   git checkout second-side  
+   tr [A-Z] [a-z] newfile tmp 
+   mv tmp newfile 
+   git commit -a -medit conflicting with side 
+   tr [d-f] [D-F] newfile tmp 
+   mv tmp newfile 
+   git commit -a -manother edit conflicting with side 
+   test_must_fail git rebase --merge test-conflicts 
+   test_must_fail git rebase --skip 
+   git rebase --skip
+'
+
 test_done
-- 
2.0.0

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Cheap Kitchen Units UK

2014-06-15 Thread glagliglu
What a great forum this is really impressed with all the information and
advise.




--
View this message in context: 
http://git.661346.n2.nabble.com/Cheap-Kitchen-Units-UK-tp7613286.html
Sent from the git mailing list archive at Nabble.com.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html